-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provide conversion webhook for CRDs (#49)
Webhook is called, whenever a CR is requested in a specific version. This is enabled from these versions: - `AppDefintion.v1beta8` - `Session.v1beta6` - `Workspace.v1beta3` Older versions are deprecated and no longer in the definition. Move status like fields to status: - `Session.v1beta7`: Move `url`, `lastActivity` and `error` fields from the spec to the status. - `Workspace.v1beta4`: Move the `error` field from the spec to the status. Also add the `error` field to `Workspace.v1beta3` as it was missing Remove `timeout.strategy` from AppDefinition - `AppDefinition.v1beta9`: Removed `timeout.strategy` and `timeout.limit` is now just `timeout`. This was done, as there is only one Strategy left. Contributed on behalf of STMicroelectronics Co-authored-by: Johannes Faltermeier <[email protected]>
- Loading branch information
Showing
14 changed files
with
167 additions
and
43 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
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,16 @@ | ||
# theia-cloud-crds | ||
|
||
   | ||
|
||
A Helm chart for the custom resource definitions (CRDs) of Theia Cloud | ||
|
||
## Values | ||
|
||
| Key | Type | Default | Description | | ||
|-----|------|---------|-------------| | ||
| clusterIssuer | string | `"theia-cloud-selfsigned-issuer"` | The cluster issuer to use for the certificate | | ||
| conversion.certMountPath | string | `"/etc/webhook/certs"` | The location of where the certificates are mounted into the container (needs to match with application.properties) | | ||
| conversion.image | string | `"theiacloud/theia-cloud-conversion-webhook:0.10.0-next"` | The image of the webhook container | | ||
|
||
---------------------------------------------- | ||
Autogenerated from chart metadata using [helm-docs v1.12.0](https://github.com/norwoodj/helm-docs/releases/v1.12.0) |
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
13 changes: 13 additions & 0 deletions
13
charts/theia-cloud-crds/templates/conversion-webhook-certificate.yaml
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,13 @@ | ||
apiVersion: cert-manager.io/v1 | ||
kind: Certificate | ||
metadata: | ||
name: conversion-webhook-certificate | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
commonName: crd.conversion.cert | ||
secretName: conversion-webhook-cert-secret | ||
dnsNames: | ||
- "conversion-webhook-service.{{ .Release.Namespace }}.svc" | ||
issuerRef: | ||
name: {{ .Values.clusterIssuer }} | ||
kind: ClusterIssuer |
31 changes: 31 additions & 0 deletions
31
charts/theia-cloud-crds/templates/conversion-webhook-deployment.yaml
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,31 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: conversion-webhook | ||
labels: | ||
app: conversion-webhook | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: conversion-webhook | ||
template: | ||
metadata: | ||
labels: | ||
app: conversion-webhook | ||
spec: | ||
containers: | ||
- name: conversion-webhook-container | ||
image: {{ .Values.conversion.image }} | ||
ports: | ||
- name: tls | ||
containerPort: 443 | ||
volumeMounts: | ||
- name: certificates | ||
mountPath: {{ .Values.conversion.certMountPath }} | ||
readOnly: true | ||
volumes: | ||
- name: certificates | ||
secret: | ||
secretName: conversion-webhook-cert-secret |
13 changes: 13 additions & 0 deletions
13
charts/theia-cloud-crds/templates/conversion-webhook-service.yaml
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,13 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: conversion-webhook-service | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
ports: | ||
- name: tls | ||
port: 443 | ||
targetPort: 8443 | ||
selector: | ||
app: conversion-webhook | ||
type: ClusterIP |
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
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,8 @@ | ||
conversion: | ||
# -- The image of the webhook container | ||
image: theiacloud/theia-cloud-conversion-webhook:0.10.0-next | ||
# -- The location of where the certificates are mounted into the container (needs to match with application.properties) | ||
certMountPath: /etc/webhook/certs | ||
|
||
# -- The cluster issuer to use for the certificate | ||
clusterIssuer: theia-cloud-selfsigned-issuer |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# theia-cloud | ||
|
||
   | ||
   | ||
|
||
A Helm chart for Theia.cloud | ||
|
||
|
@@ -31,8 +31,7 @@ A Helm chart for Theia.cloud | |
| image.imagePullPolicy | string | `nil` | Optional: Override the imagePullPolicy for the main application's docker image. If this is omitted or empty, the root at .Values.imagePullPolicy is used. | | ||
| image.name | string | `"theiacloud/theia-cloud-demo:0.10.0-next"` | The name of docker image to be used | | ||
| image.pullSecret | string | `""` | the image pull secret. Leave empty if registry is public | | ||
| image.timeoutLimit | string | `"30"` | Limit in minutes | | ||
| image.timeoutStrategy | string | `"FIXEDTIME"` | Configures how sessions will be stopped. This defines the strategy and the limit in minutes and will override any specification from an appDefinition. Possible values for strategy: - FIXEDTIME Sessions will be stopped after a fixed limit | | ||
| image.timeout | string | `"30"` | Limit in minutes | | ||
| imagePullPolicy | string | `"Always"` | The default imagePullPolicy for containers of theia cloud. Can be overridden for individual components by specifying the imagePullPolicy variable there. Possible values: - Always - IfNotPresent - Never | | ||
| ingress | object | (see details below) | Values to influence the ingresses | | ||
| ingress.clusterIssuer | string | `"letsencrypt-prod"` | The cluster issuer to use | | ||
|
@@ -41,8 +40,6 @@ A Helm chart for Theia.cloud | |
| ingress.theiaCloudCommonName | bool | `false` | When set to true the cert-manager.io/common-name annotation will be set. This is only required when the issued certificate by the cert-manager misses a common-name | | ||
| issuer | object | (see details below) | Values related to certificates/Cert-manager | | ||
| issuer.email | string | `"[email protected]"` | EMail address of the certificate issuer. | | ||
| issuerprod.name | string | `"letsencrypt-prod"` | | | ||
| issuerstaging.name | string | `"theia-cloud-selfsigned-issuer"` | | | ||
| keycloak | object | (see details below) | Values related to Keycloak | | ||
| keycloak.authUrl | string | `"https://keycloak.url/auth/"` | Key cloak auth URL. Only has to be specified when enable: true | | ||
| keycloak.clientId | string | `"theia-cloud"` | The client-id. Only has to be specified when enable: true | | ||
|
@@ -90,4 +87,4 @@ A Helm chart for Theia.cloud | |
| servicerole.name | string | `"service-api-access"` | | | ||
|
||
---------------------------------------------- | ||
Autogenerated from chart metadata using [helm-docs v1.11.3](https://github.com/norwoodj/helm-docs/releases/v1.11.3) | ||
Autogenerated from chart metadata using [helm-docs v1.12.0](https://github.com/norwoodj/helm-docs/releases/v1.12.0) |
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
Oops, something went wrong.