Skip to content

Commit

Permalink
#200: Add status support for crash loop detection(#39)
Browse files Browse the repository at this point in the history
- Add status to all crds.
- Extend operator role to allow editing status for our crds
- Increase chart versions and use new app version

Part of eclipse-theia/theia-cloud#200
  • Loading branch information
lucas-koehler authored and jfaltermeier committed Aug 30, 2023
1 parent b91e146 commit 903ee07
Show file tree
Hide file tree
Showing 8 changed files with 185 additions and 14 deletions.
4 changes: 2 additions & 2 deletions charts/theia-cloud-crds/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.8.1-v001
version: 0.8.1-v002

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "0.8.1.OSWeek23-v1"
appVersion: "0.8.1.OSWeek23-v3"
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,82 @@ spec:
singular: appdefinition
scope: Namespaced
versions:
- name: v6beta
- name: v7beta
served: true
storage: true
# subresources describes the subresources for custom resources.
subresources:
# status enables the status subresource.
status: {}
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
properties:
name:
type: string
image:
type: string
imagePullPolicy:
type: string
enum: ["Always", "IfNotPresent", "Never"]
pullSecret:
type: string
uid:
type: integer
port:
type: integer
ingressname:
type: string
minInstances:
type: integer
maxInstances:
type: integer
timeout:
type: object
properties:
strategy:
type: string
limit:
type: integer
requestsMemory:
type: string
requestsCpu:
type: string
limitsMemory:
type: string
limitsCpu:
type: string
downlinkLimit:
type: integer
uplinkLimit:
type: integer
mountPath:
type: string
monitor:
type: object
properties:
port:
type: integer
activityTracker:
type: object
properties:
timeoutAfter:
type: integer
notifyAfter:
type: integer
status:
type: object
properties:
operatorStatus:
type: string
operatorMessage:
type: string
- name: v6beta
served: true
storage: false
schema:
openAPIV3Schema:
type: object
Expand Down
51 changes: 50 additions & 1 deletion charts/theia-cloud-crds/templates/session-spec-resource.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,58 @@ spec:
singular: session
scope: Namespaced
versions:
- name : v4beta
- name : v5beta
served: true
storage: true
# subresources describes the subresources for custom resources.
subresources:
# status enables the status subresource.
status: {}
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
properties:
name:
type: string
workspace:
type: string
appDefinition: # cached from workspace
type: string
user: # cached from workspace
type: string
url:
type: string
error:
type: string
sessionSecret:
type: string
lastActivity:
type: integer
envVars:
type: object
additionalProperties:
x-kubernetes-int-or-string: true
envVarsFromConfigMaps:
type: array
items:
type: string
envVarsFromSecrets:
type: array
items:
type: string
status:
type: object
properties:
operatorStatus:
type: string
operatorMessage:
type: string
- name : v4beta
served: true
storage: false
schema:
openAPIV3Schema:
type: object
Expand Down
48 changes: 47 additions & 1 deletion charts/theia-cloud-crds/templates/workspace-spec-resource.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,55 @@ spec:
singular: workspace
scope: Namespaced
versions:
- name : v1beta
- name : v2beta
served: true
storage: true
# subresources describes the subresources for custom resources.
subresources:
# status enables the status subresource.
status: {}
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
properties:
name:
type: string
label:
type: string
appDefinition: # last app definition that ran on this workspace
type: string
user: # user who created the workspace
type: string
storage:
type: string
status:
type: object
properties:
operatorStatus:
type: string
operatorMessage:
type: string
volumeClaim:
type: object
properties:
status:
type: string
message:
type: string
volumeAttach:
type: object
properties:
status:
type: string
message:
type: string

- name : v1beta
served: true
storage: false
schema:
openAPIV3Schema:
type: object
Expand Down
4 changes: 2 additions & 2 deletions charts/theia.cloud-base/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.8.1-v002
version: 0.8.1-v003

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "0.8.1.OSWeek23-v1"
appVersion: "0.8.1.OSWeek23-v3"
3 changes: 3 additions & 0 deletions charts/theia.cloud-base/templates/operator-role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@ rules:
resources:
- customresourcedefinitions
- appdefinitions
- appdefinitions/status
- workspaces
- workspaces/status
- ingresses
- sessions
- sessions/status
- persistentvolumes
- persistentvolumeclaims
- services
Expand Down
4 changes: 2 additions & 2 deletions charts/theia.cloud/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.8.1-v005
version: 0.8.1-v006

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "0.8.1.OSWeek23-v2"
appVersion: "0.8.1.OSWeek23-v3"
10 changes: 5 additions & 5 deletions charts/theia.cloud/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ issuer:
# Docker image of the main application
image:
# The name of docker image to be used
name: theiacloud/theia-cloud-demo:0.8.1.OSWeek23-v2
name: theiacloud/theia-cloud-demo:0.8.1.OSWeek23-v3

# Optional: Override the imagePullPolicy for the main application's docker image.
# If this is omitted or empty, the root at .Values.imagePullPolicy is used.
Expand Down Expand Up @@ -93,7 +93,7 @@ hosts:
# Values related to the landing page
landingPage:
# the landing page image to use
image: theiacloud/theia-cloud-landing-page:0.8.1.OSWeek23-v2
image: theiacloud/theia-cloud-landing-page:0.8.1.OSWeek23-v3

# Optional: Override the imagePullPolicy for the landing page's docker image.
# If this is omitted or empty, the root at .Values.imagePullPolicy is used.
Expand Down Expand Up @@ -147,7 +147,7 @@ keycloak:
# Values related to the operator
operator:
# The operator image
image: theiacloud/theia-cloud-operator:0.8.1.OSWeek23-v2
image: theiacloud/theia-cloud-operator:0.8.1.OSWeek23-v3

# Optional: Override the imagePullPolicy for the operator's docker image.
# If this is omitted or empty, the root at .Values.imagePullPolicy is used.
Expand Down Expand Up @@ -176,7 +176,7 @@ operator:
bandwidthLimiter: "K8SANNOTATION"

# If bandwidthLimiter is set to WONDERSHAPER or K8SANNOTATIONANDWONDERSHAPER this image will be used for the wondershaper init container
wondershaperImage: theiacloud/theia-cloud-wondershaper:0.8.1.OSWeek23-v2
wondershaperImage: theiacloud/theia-cloud-wondershaper:0.8.1.OSWeek23-v3

# Set the number of active sessions a single user can launch
sessionsPerUser: "1"
Expand Down Expand Up @@ -207,7 +207,7 @@ operator:
# Values of the Theia.cloud REST service
service:
# The image to use
image: theiacloud/theia-cloud-service:0.8.1.OSWeek23-v2
image: theiacloud/theia-cloud-service:0.8.1.OSWeek23-v3

# Optional: Override the imagePullPolicy for the service's docker image.
# If this is omitted or empty, the root at .Values.imagePullPolicy is used.
Expand Down

0 comments on commit 903ee07

Please sign in to comment.