-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[werft] Install gitpod in k3s ws cluster #4664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| import * as shell from 'shelljs'; | ||
|
|
||
| function buildRequiredFlags(pathToKubeConfig: string): string { | ||
| if (pathToKubeConfig != "") { | ||
| return ` --kubeconfig=${pathToKubeConfig}` | ||
| } | ||
| return "" | ||
| } | ||
|
|
||
| export function buildGpctlBinary() { | ||
| shell.exec(`cd /workspace/dev/gpctl && go build && cd -`) | ||
| } | ||
|
|
||
| export function printClustersList(pathToKubeConfig: string): string { | ||
| let cmd = `/workspace/dev/gpctl/gpctl clusters list` + buildRequiredFlags(pathToKubeConfig) | ||
| const result = shell.exec(cmd).trim() | ||
| return result | ||
| } | ||
|
|
||
| export function uncordonCluster(pathToKubeConfig: string, name: string): string { | ||
| let cmd = `/workspace/dev/gpctl/gpctl clusters uncordon --name=${name}` + buildRequiredFlags(pathToKubeConfig) | ||
| const result = shell.exec(cmd).trim() | ||
| return result | ||
| } | ||
|
|
||
| export function registerCluster(pathToKubeConfig: string, name: string, url: string): string { | ||
| let cmd = `/workspace/dev/gpctl/gpctl clusters register \ | ||
| --name ${name} \ | ||
| --hint-cordoned \ | ||
| --hint-govern \ | ||
| --tls-path ./wsman-tls \ | ||
| --url ${url}` + buildRequiredFlags(pathToKubeConfig) | ||
|
|
||
| const result = shell.exec(cmd).trim() | ||
| return result | ||
| } | ||
|
|
||
| export function getClusterTLS(pathToKubeConfig: string): string { | ||
| let cmd = `/workspace/dev/gpctl/gpctl clusters get-tls-config` + buildRequiredFlags(pathToKubeConfig) | ||
| const result = shell.exec(cmd).trim() | ||
| return result | ||
| } | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,175 @@ | ||
| installation: | ||
| stage: devstaging | ||
| tenant: gitpod-core | ||
| region: europe-west1 | ||
| cluster: "00" | ||
| shortname: "k3s" | ||
| hostname: staging.gitpod-dev.com | ||
| imagePrefix: eu.gcr.io/gitpod-core-dev/build/ | ||
| certificatesSecret: | ||
| secretName: proxy-config-certificates | ||
| version: not-set | ||
| imagePullPolicy: Always | ||
| affinity: | ||
| nodeAffinity: | ||
| requiredDuringSchedulingIgnoredDuringExecution: | ||
| nodeSelectorTerms: | ||
| - matchExpressions: | ||
| - key: gitpod.io/workload_services | ||
| operator: In | ||
| values: | ||
| - "true" | ||
| authProviders: [] | ||
| tracing: | ||
| endoint: http://jaeger-collector:14268/api/traces | ||
| samplerType: const | ||
| samplerParam: "1" | ||
|
|
||
| components: | ||
| wsManagerBridge: | ||
| disabled: true | ||
|
|
||
| agentSmith: | ||
| name: "agent-smith" | ||
| disabled: false | ||
| # in preview envs, we never want DaemonSets not to be scheduled (because they don't trigger scaleup) | ||
| resources: | ||
| cpu: 1m | ||
| memory: 32Mi | ||
|
|
||
| registryFacade: | ||
| daemonSet: true | ||
| # in preview envs, we never want DaemonSets not to be scheduled (because they don't trigger scaleup) | ||
| resources: | ||
| cpu: 1m | ||
| memory: 32Mi | ||
|
|
||
| contentService: | ||
| remoteStorage: | ||
| blobQuota: 1073741824 # 1 GiB | ||
|
|
||
| workspace: | ||
| # configure GCP registry | ||
| pullSecret: | ||
| secretName: gcp-sa-registry-auth | ||
| affinity: | ||
| default: "gitpod.io/workload_workspace" | ||
| templates: | ||
| default: | ||
| spec: | ||
| dnsConfig: | ||
| nameservers: | ||
| - 1.1.1.1 | ||
| - 8.8.8.8 | ||
| dnsPolicy: None # do NOT query against K8s DNS (https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/) | ||
| env: | ||
| - name: THEIA_PREVENT_METADATA_ACCESS | ||
| value: true | ||
| regular: | ||
| spec: | ||
| containers: | ||
| - name: "workspace" | ||
| env: | ||
| - name: THEIA_RATELIMIT_LOG | ||
| value: "50" | ||
| - name: SUPERVISOR_DEBUG_ENABLE | ||
| value: "true" | ||
| prebuild: | ||
| spec: | ||
| containers: | ||
| - name: workspace | ||
| # Intended to reduce the density for prebuilds | ||
| resources: | ||
| limits: | ||
| cpu: "5" | ||
| memory: 12Gi | ||
| requests: | ||
| cpu: 1m | ||
| ephemeral-storage: 5Gi | ||
| memory: 4608Mi # = 2 * 2304Mi | ||
|
|
||
| # Enable events trace | ||
| wsManager: | ||
| eventTraceLogLocation: "/tmp/evts.json" | ||
|
|
||
| wsDaemon: | ||
| hostWorkspaceArea: /mnt/disks/ssd0/workspaces | ||
| volumes: | ||
| - name: gcloud-tmp | ||
| hostPath: | ||
| path: /mnt/disks/ssd0/sync-tmp | ||
| type: DirectoryOrCreate | ||
| volumeMounts: | ||
| - mountPath: /mnt/sync-tmp | ||
| name: gcloud-tmp | ||
| userNamespaces: | ||
| fsShift: fuse | ||
| shiftfsModuleLoader: | ||
| enabled: false | ||
| seccompProfileInstaller: | ||
| enabled: true | ||
| # in preview envs, we never want DaemonSets not to be scheduled (because they don't trigger scaleup) | ||
| resources: | ||
| cpu: 1m | ||
| memory: 32Mi | ||
|
|
||
| wsScheduler: | ||
| scaler: | ||
| enabled: true | ||
| controller: | ||
| kind: "constant" | ||
| constant: | ||
| setpoint: 1 | ||
|
|
||
| # Enable ws-proxy in dev | ||
| wsProxy: | ||
| useHTTPS: true | ||
| hostHeader: Host | ||
| name: "ws-proxy" | ||
| disabled: false | ||
| replicas: 1 | ||
| serviceType: "LoadBalancer" | ||
| wsManagerProxy: | ||
| enabled: true | ||
| ports: | ||
| wsManagerProxy: | ||
| expose: true | ||
| containerPort: 8081 | ||
| servicePort: 8081 | ||
| httpsProxy: | ||
| expose: true | ||
| containerPort: 9090 | ||
| servicePort: 443 | ||
| httpProxy: | ||
| expose: true | ||
| containerPort: 8080 | ||
| servicePort: 80 | ||
|
|
||
| imageBuilder: | ||
| disabled: true | ||
| hostDindData: "/mnt/disks/ssd0/builder" | ||
| # configure GCP registry | ||
| registry: | ||
| name: eu.gcr.io/gitpod-core-dev/registry | ||
| secretName: gcp-sa-registry-auth | ||
| path: gcp-sa-registry-auth | ||
| registryCerts: [] | ||
|
|
||
|
|
||
| # configure GCP registry | ||
| docker-registry: | ||
| enabled: false | ||
|
|
||
| rabbitmq: | ||
| # ensure shovels are configured on boot | ||
| disabled: true | ||
| enabled: false | ||
|
|
||
| cert-manager: | ||
| enabled: true | ||
|
|
||
| dbMigrations: | ||
| disabled: true | ||
|
|
||
| db: | ||
| autoMigrate: false | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.