-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[server][ws-manager] Allow setting customTimeoutAnnotation for headle…
…ss workspace pods
- Loading branch information
1 parent
35a6e02
commit f6731ea
Showing
4 changed files
with
316 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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 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
1 change: 1 addition & 0 deletions
1
components/ws-manager/pkg/manager/testdata/timeout_prebuild_customTimeout.golden
This file contains 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 @@ | ||
{} |
303 changes: 303 additions & 0 deletions
303
components/ws-manager/pkg/manager/testdata/timeout_prebuild_customTimeout.json
This file contains 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,303 @@ | ||
{ | ||
"creationDelta": "100m", | ||
"wso": { | ||
"pod": { | ||
"metadata": { | ||
"name": "ws-foobas", | ||
"namespace": "default", | ||
"selfLink": "/api/v1/namespaces/default/pods/ws-foobas", | ||
"uid": "486e5f88-4354-11e9-aee4-080027861af1", | ||
"resourceVersion": "64956", | ||
"creationTimestamp": "2019-03-10T16:48:08Z", | ||
"labels": { | ||
"gpwsman": "true", | ||
"headless": "true", | ||
"owner": "foobar", | ||
"metaID": "metameta", | ||
"workspaceID": "foobas", | ||
"workspaceType": "prebuild" | ||
}, | ||
"annotations": { | ||
"gitpod/id": "foobas", | ||
"gitpod/ready": "true", | ||
"gitpod/servicePrefix": "foobas", | ||
"gitpod/url": "http://10.0.0.114:8082", | ||
"gitpod/customTimeout": "2h", | ||
"prometheus.io/path": "/metrics", | ||
"prometheus.io/port": "23000", | ||
"prometheus.io/scrape": "true" | ||
} | ||
}, | ||
"spec": { | ||
"volumes": [ | ||
{ | ||
"name": "vol-this-workspace", | ||
"hostPath": { | ||
"path": "/tmp/workspaces/foobas", | ||
"type": "DirectoryOrCreate" | ||
} | ||
}, | ||
{ | ||
"name": "vol-this-theia", | ||
"hostPath": { | ||
"path": "/tmp/theia/theia-xyz", | ||
"type": "Directory" | ||
} | ||
}, | ||
{ | ||
"name": "vol-sync-tmp", | ||
"hostPath": { | ||
"path": "/tmp/workspaces/sync-tmp", | ||
"type": "DirectoryOrCreate" | ||
} | ||
}, | ||
{ | ||
"name": "default-token-6qnvx", | ||
"secret": { | ||
"secretName": "default-token-6qnvx", | ||
"defaultMode": 420 | ||
} | ||
} | ||
], | ||
"containers": [ | ||
{ | ||
"name": "workspace", | ||
"image": "nginx:latest", | ||
"ports": [ | ||
{ | ||
"containerPort": 23000, | ||
"protocol": "TCP" | ||
} | ||
], | ||
"env": [ | ||
{ | ||
"name": "THEIA_WORKSPACE_ROOT", | ||
"value": "/workspace" | ||
}, | ||
{ | ||
"name": "GITPOD_THEIA_PORT", | ||
"value": "23000" | ||
}, | ||
{ | ||
"name": "GITPOD_HOST", | ||
"value": "gitpod.io" | ||
}, | ||
{ | ||
"name": "GITPOD_INTERVAL", | ||
"value": "30" | ||
}, | ||
{ | ||
"name": "GITPOD_WSSYNC_APITOKEN", | ||
"value": "c17a7eaf-e5de-4e9d-815a-7919379e2bf8" | ||
}, | ||
{ | ||
"name": "GITPOD_WSSYNC_APIPORT", | ||
"value": "44444" | ||
}, | ||
{ | ||
"name": "GITPOD_REPO_ROOT", | ||
"value": "/workspace" | ||
}, | ||
{ | ||
"name": "GITPOD_CLI_APITOKEN", | ||
"value": "690516e2-c416-4a28-ba74-e36f125922aa" | ||
}, | ||
{ | ||
"name": "GITPOD_WORKSPACE_ID", | ||
"value": "foobas" | ||
}, | ||
{ | ||
"name": "GITPOD_GIT_USER_NAME", | ||
"value": "usernameGoesHere" | ||
}, | ||
{ | ||
"name": "GITPOD_GIT_USER_EMAIL", | ||
"value": "[email protected]" | ||
} | ||
], | ||
"resources": { | ||
"limits": { | ||
"cpu": "100m", | ||
"memory": "100Mi" | ||
}, | ||
"requests": { | ||
"cpu": "100m", | ||
"memory": "100Mi" | ||
} | ||
}, | ||
"volumeMounts": [ | ||
{ | ||
"name": "vol-this-workspace", | ||
"mountPath": "/workspace" | ||
}, | ||
{ | ||
"name": "vol-this-theia", | ||
"readOnly": true, | ||
"mountPath": "/theia" | ||
}, | ||
{ | ||
"name": "default-token-6qnvx", | ||
"readOnly": true, | ||
"mountPath": "/var/run/secrets/kubernetes.io/serviceaccount" | ||
} | ||
], | ||
"terminationMessagePath": "/dev/termination-log", | ||
"terminationMessagePolicy": "File", | ||
"imagePullPolicy": "Always" | ||
} | ||
], | ||
"restartPolicy": "Always", | ||
"terminationGracePeriodSeconds": 30, | ||
"dnsPolicy": "ClusterFirst", | ||
"serviceAccountName": "default", | ||
"serviceAccount": "default", | ||
"nodeName": "minikube", | ||
"securityContext": {}, | ||
"schedulerName": "default-scheduler", | ||
"tolerations": [ | ||
{ | ||
"key": "node.kubernetes.io/not-ready", | ||
"operator": "Exists", | ||
"effect": "NoExecute", | ||
"tolerationSeconds": 300 | ||
}, | ||
{ | ||
"key": "node.kubernetes.io/unreachable", | ||
"operator": "Exists", | ||
"effect": "NoExecute", | ||
"tolerationSeconds": 300 | ||
} | ||
] | ||
}, | ||
"status": { | ||
"phase": "Running", | ||
"conditions": [ | ||
{ | ||
"type": "Initialized", | ||
"status": "True", | ||
"lastProbeTime": null, | ||
"lastTransitionTime": "2019-03-10T16:48:08Z" | ||
}, | ||
{ | ||
"type": "Ready", | ||
"status": "True", | ||
"lastProbeTime": null, | ||
"lastTransitionTime": "2019-03-10T16:48:13Z" | ||
}, | ||
{ | ||
"type": "PodScheduled", | ||
"status": "True", | ||
"lastProbeTime": null, | ||
"lastTransitionTime": "2019-03-10T16:48:08Z" | ||
} | ||
], | ||
"hostIP": "10.0.2.15", | ||
"podIP": "172.17.0.5", | ||
"startTime": "2019-03-10T16:48:08Z", | ||
"containerStatuses": [ | ||
{ | ||
"name": "sync", | ||
"state": { | ||
"running": { | ||
"startedAt": "2019-03-10T16:48:13Z" | ||
} | ||
}, | ||
"lastState": {}, | ||
"ready": true, | ||
"restartCount": 0, | ||
"image": "csweichel/noop:latest", | ||
"imageID": "docker-pullable://csweichel/noop@sha256:aaa6b993f4c853fac7101aa7fc087926f829004e62cbce6e1852e5a3aac87c52", | ||
"containerID": "docker://9961f75ea72f36bb0ba1e42b3b2da98eb44a9dc12e7c7e8edfb52512b3b04016" | ||
}, | ||
{ | ||
"name": "workspace", | ||
"state": { | ||
"running": { | ||
"startedAt": "2019-03-10T16:48:12Z" | ||
} | ||
}, | ||
"lastState": {}, | ||
"ready": true, | ||
"restartCount": 0, | ||
"image": "nginx:latest", | ||
"imageID": "docker-pullable://nginx@sha256:98efe605f61725fd817ea69521b0eeb32bef007af0e3d0aeb6258c6e6fe7fc1a", | ||
"containerID": "docker://e7080b843a47db414d6c94cfda7f657b99d8aa5bbf7c9c118ec98c0eefb6c0df" | ||
} | ||
], | ||
"qosClass": "Guaranteed" | ||
} | ||
}, | ||
"theiaService": { | ||
"metadata": { | ||
"name": "foobas-theia", | ||
"namespace": "default", | ||
"selfLink": "/api/v1/namespaces/default/services/foobas-theia", | ||
"uid": "48687212-4354-11e9-aee4-080027861af1", | ||
"resourceVersion": "64923", | ||
"creationTimestamp": "2019-03-10T16:48:08Z", | ||
"labels": { | ||
"gpwsman": "true", | ||
"headless": "false", | ||
"owner": "foobar", | ||
"metaID": "metameta", | ||
"workspaceID": "foobas" | ||
} | ||
}, | ||
"spec": { | ||
"ports": [ | ||
{ | ||
"name": "theia", | ||
"protocol": "TCP", | ||
"port": 23000, | ||
"targetPort": 23000 | ||
} | ||
], | ||
"selector": { | ||
"gpwsman": "true", | ||
"headless": "false", | ||
"owner": "foobar", | ||
"workspaceID": "foobas" | ||
}, | ||
"clusterIP": "10.103.194.121", | ||
"type": "ClusterIP", | ||
"sessionAffinity": "None" | ||
}, | ||
"status": { | ||
"loadBalancer": {} | ||
} | ||
}, | ||
"portsService": { | ||
"metadata": { | ||
"name": "foobas-ports", | ||
"namespace": "default", | ||
"selfLink": "/api/v1/namespaces/default/services/foobas-ports", | ||
"uid": "486cb304-4354-11e9-aee4-080027861af1", | ||
"resourceVersion": "64926", | ||
"creationTimestamp": "2019-03-10T16:48:08Z", | ||
"labels": { | ||
"gpwsman": "true", | ||
"workspaceID": "foobas" | ||
} | ||
}, | ||
"spec": { | ||
"ports": [ | ||
{ | ||
"protocol": "TCP", | ||
"port": 8080, | ||
"targetPort": 8080 | ||
} | ||
], | ||
"selector": { | ||
"gpwsman": "true", | ||
"workspaceID": "foobas" | ||
}, | ||
"clusterIP": "10.110.184.222", | ||
"type": "ClusterIP", | ||
"sessionAffinity": "None" | ||
}, | ||
"status": { | ||
"loadBalancer": {} | ||
} | ||
} | ||
} | ||
} |