Skip to content

Commit ac662ea

Browse files
authored
Rename Theia.Cloud to Theia Cloud and Improve Ingress/Host configuration (#59)
* Update Theia.Cloud to Theia Cloud * move hosts.tls to ingress.tls * move hosts.paths.tlsSecretName to ingress.addTLSSecretName * default is set to true which is a change for path based installs * move hosts.paths to hosts.configuration * remove hosts.useServicePortInHostname * no replacement * move hosts.servicePort to service.port * move hosts.serviceProtocol to service.protocol * removed hosts.service * hosts.configuration.service + hosts.configuration.baseHost * removed hosts.landing * hosts.configuration.landing + hosts.configuration.baseHost * removed hosts.instance * hosts.configuration.instance + hosts.configuration.baseHost Contributed on behalf of STMicroelectronics
1 parent 81d7102 commit ac662ea

38 files changed

+127
-114
lines changed

CHANGELOG.md

+14
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,20 @@
1111
- [theia-cloud] Add `hosts.paths.tlsSecretName` to values which allows to optionally set the tls secretName on the ingress tls section when using paths [#57](https://github.com/eclipsesource/theia-cloud-helm/pull/57)
1212
- [theia-cloud] Add `ingress.certManagerAnnotations` to values which allows to configure whether cert manager annotations will be added to the ingresses [#57](https://github.com/eclipsesource/theia-cloud-helm/pull/57)
1313

14+
### Breaking Changes in 0.11.0
15+
16+
In preparation for a first major release we will introduce some breaking changes in order to make the helm chart configuration easier to understand.
17+
18+
- [theia-cloud] move `hosts.tls` to `ingress.tls` [#59](https://github.com/eclipsesource/theia-cloud-helm/pull/59)
19+
- [theia-cloud] move `hosts.paths.tlsSecretName` to `ingress.addTLSSecretName` (default is set to `true` which is a change for path based installs) [#59](https://github.com/eclipsesource/theia-cloud-helm/pull/59)
20+
- [theia-cloud] move `hosts.paths` to `hosts.configuration` [#59](https://github.com/eclipsesource/theia-cloud-helm/pull/59)
21+
- [theia-cloud] remove `hosts.useServicePortInHostname` (no replacement) [#59](https://github.com/eclipsesource/theia-cloud-helm/pull/59)
22+
- [theia-cloud] move `hosts.servicePort` to `service.port` [#59](https://github.com/eclipsesource/theia-cloud-helm/pull/59)
23+
- [theia-cloud] move `hosts.serviceProtocol` to `service.protocol` [#59](https://github.com/eclipsesource/theia-cloud-helm/pull/59)
24+
- [theia-cloud] removed `hosts.service` (now `hosts.configuration.service` + `hosts.configuration.baseHost`) [#59](https://github.com/eclipsesource/theia-cloud-helm/pull/59)
25+
- [theia-cloud] removed `hosts.landing` (now `hosts.configuration.landing` + `hosts.configuration.baseHost`) [#59](https://github.com/eclipsesource/theia-cloud-helm/pull/59)
26+
- [theia-cloud] removed `hosts.instance` (now `hosts.configuration.instance` + `hosts.configuration.baseHost`) [#59](https://github.com/eclipsesource/theia-cloud-helm/pull/59)
27+
1428
## [0.10.0] - 2024-04-02
1529

1630
- [theia-cloud-crds] Provide conversion webhook for newer versions of CRDs [#49](https://github.com/eclipsesource/theia-cloud-helm/pull/49) | [#283](https://github.com/eclipsesource/theia-cloud/pull/283) - contributed on behalf of STMicroelectronics
File renamed without changes.
File renamed without changes.

charts/theia.cloud/.project renamed to charts/theia-cloud/.project

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<projectDescription>
3-
<name>theia.cloud-helm</name>
3+
<name>theia-cloud-helm</name>
44
<comment></comment>
55
<projects>
66
</projects>

charts/theia.cloud/Chart.yaml renamed to charts/theia-cloud/Chart.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v2
22
name: theia-cloud
3-
description: A Helm chart for Theia.cloud
3+
description: A Helm chart for Theia Cloud
44

55
# A chart can be either an 'application' or a 'library' chart.
66
#
@@ -15,7 +15,7 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 0.11.0-next.3
18+
version: 0.11.0-next.4
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to

charts/theia.cloud/README.md renamed to charts/theia-cloud/README.md

+15-19
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# theia-cloud
22

3-
![Version: 0.11.0-next.3](https://img.shields.io/badge/Version-0.11.0--next.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.11.0-next](https://img.shields.io/badge/AppVersion-0.11.0--next-informational?style=flat-square)
3+
![Version: 0.11.0-next.4](https://img.shields.io/badge/Version-0.11.0--next.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.11.0-next](https://img.shields.io/badge/AppVersion-0.11.0--next-informational?style=flat-square)
44

5-
A Helm chart for Theia.cloud
5+
A Helm chart for Theia Cloud
66

77
## Values
88

@@ -26,28 +26,22 @@ A Helm chart for Theia.cloud
2626
| demoApplication.pullSecret | string | `""` | the image pull secret. Leave empty if registry is public |
2727
| demoApplication.timeout | string | `"30"` | Limit in minutes |
2828
| hosts | object | (see details below) | You may adjust the hostname below. |
29-
| hosts.allWildcardInstances | list | `["*.webview."]` | all additional wildcard hostnames that may be required in the launched Theia-applications, e.g. "*.webview." which leads to "*.webview.ws.192.168.39.173.nip.io" to expose webviews. Please note that this means that this usually means that all "ingressHostnamePrefixes" patterns from all app definitions need to be added. These are required to configure TLS (if enabled via hosts.tls == true) |
30-
| hosts.instance | string | `"ws.192.168.39.173.nip.io"` | hostname for the launched Theia-applications |
31-
| hosts.landing | string | `"theia.cloud.192.168.39.173.nip.io"` | hostname of the landing page |
32-
| hosts.paths | object | (see details below) | Only needed when usePaths == true. Contains the baseHost and paths for all services |
33-
| hosts.paths.baseHost | string | `"192.168.39.173.nip.io"` | baseHost configures the host for all services when usePaths == true. Otherwise the explicit host definitions of the services are used. |
34-
| hosts.paths.instance | string | `"instances"` | path for deployed instances |
35-
| hosts.paths.landing | string | `"trynow"` | path of the landing page |
36-
| hosts.paths.service | string | `"servicex"` | path of the REST service |
37-
| hosts.paths.tlsSecretName | bool | `false` | whether the default Theia Cloud tls secret names should be used. If false no tls secret name will be set on the ingress only needed when hosts.usePaths == true and hosts.tls == true |
38-
| hosts.service | string | `"service.192.168.39.173.nip.io"` | hostname of the REST-API |
39-
| hosts.servicePort | int | `8081` | service port (default: 8081) |
40-
| hosts.serviceProtocol | string | `"https"` | protocol of the REST-API |
41-
| hosts.tls | bool | `true` | Does Theia Cloud expect TLS connections (true) or is TLS terminated outside of Theia Cloud (e.g. via a Load Balancer) (false) |
29+
| hosts.allWildcardInstances | list | `["*.webview."]` | all additional wildcard hostnames that may be required in the launched Theia-applications, e.g. "*.webview." which leads to "*.webview.ws.192.168.39.173.nip.io" to expose webviews. Please note that this means that this usually means that all "ingressHostnamePrefixes" patterns from all app definitions need to be added. These are required to configure TLS (if enabled via ingress.tls == true) |
30+
| hosts.configuration | object | (see details below) | Configuration for the hostnames. Contains the baseHost and afixes for all services |
31+
| hosts.configuration.baseHost | string | `"192.168.39.173.nip.io"` | baseHost configures the host for all services. Depending on hosts.usePaths the services will be prepended as a subdomain or appended as a path |
32+
| hosts.configuration.instance | string | `"instances"` | afix for deployed instances |
33+
| hosts.configuration.landing | string | `"trynow"` | afix of the landing page |
34+
| hosts.configuration.service | string | `"servicex"` | afix of the REST service |
4235
| hosts.usePaths | bool | `false` | Use paths configures that all services should run on the same host but on different paths. true uses paths false uses an explicit host for each service |
43-
| hosts.useServicePortInHostname | bool | `false` | whether the service port needs to be part of the service URL (default: false) |
4436
| 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 |
4537
| ingress | object | (see details below) | Values to influence the ingresses |
46-
| ingress.certManagerAnnotations | bool | `true` | When set to true the cert-manager.io annotations will be set. When false certificate management is handled outside of Theia Cloud. |
38+
| ingress.addTLSSecretName | bool | `true` | whether the default Theia Cloud tls secret names should be used. If false no tls secret name will be set on the ingress only needed when ingress.tls == true |
39+
| ingress.certManagerAnnotations | bool | `true` | When set to true the cert-manager.io annotations will be set. Only used when ingress.addTLSSecretName === true When false certificate management is handled outside of Theia Cloud. |
4740
| ingress.clusterIssuer | string | `"letsencrypt-prod"` | The cluster issuer to use Only needed when ingress.certManagerAnnotations is true |
48-
| ingress.instanceName | string | `"theia-cloud-demo-ws-ingress"` | The name of the ingress which will be updated to publish new theia application. If this is not existing it will be created. You may chose to set the ingress up yourself and point theia.cloud to the ingress via the name |
41+
| ingress.instanceName | string | `"theia-cloud-demo-ws-ingress"` | The name of the ingress which will be updated to publish new theia application. If this is not existing it will be created. You may chose to set the ingress up yourself and point Theia Cloud to the ingress via the name |
4942
| ingress.proxyBodySize | string | `"1m"` | Sets the maximum allowed size of the client request body inside the application (e.g. file uploads in Theia). Defaults to 1m. Setting size to 0 disables checking of client request body size. |
5043
| 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 Only needed when ingress.certManagerAnnotations is true |
44+
| ingress.tls | bool | `true` | Does Theia Cloud expect TLS connections (true) or is TLS terminated outside of Theia Cloud (e.g. via a Load Balancer) (false) |
5145
| issuer | object | (see details below) | Values related to certificates/Cert-manager |
5246
| issuer.email | string | `"[email protected]"` | EMail address of the certificate issuer. |
5347
| keycloak | object | (see details below) | Values related to Keycloak |
@@ -95,10 +89,12 @@ A Helm chart for Theia.cloud
9589
| preloading.enable | bool | `true` | Is image preloading enabled. |
9690
| preloading.imagePullPolicy | string | `nil` | Optional: Override the imagePullPolicy for the image preloading containers. If this is omitted or empty, the root at .Values.imagePullPolicy is used. |
9791
| preloading.images | list | `[]` | Images to preload. Images must support running /bin/sh. If the list is empty and demoApplication.install == true, demoApplication.name is automatically added. |
98-
| service | object | (see details below) | Values of the Theia.cloud REST service |
92+
| service | object | (see details below) | Values of the Theia Cloud REST service |
9993
| service.image | string | `"theiacloud/theia-cloud-service:0.11.0-next"` | The image to use |
10094
| service.imagePullPolicy | string | `nil` | Optional: Override the imagePullPolicy for the service's docker image. If this is omitted or empty, the root at .Values.imagePullPolicy is used. |
10195
| service.imagePullSecret | string | `nil` | Optional: the image pull secret |
96+
| service.port | int | `8081` | service port (default: 8081) |
97+
| service.protocol | string | `"https"` | protocol of the REST-API |
10298
| servicerole.name | string | `"service-api-access"` | |
10399

104100
----------------------------------------------

charts/theia.cloud/templates/instances-ingress-path-based.yaml renamed to charts/theia-cloud/templates/instances-ingress-path-based.yaml

+9-9
Original file line numberDiff line numberDiff line change
@@ -5,42 +5,42 @@ metadata:
55
name: {{ tpl (.Values.ingress.instanceName | toString) . }}
66
namespace: {{ .Release.Namespace }}
77
annotations:
8-
{{- if not .Values.hosts.tls }}
8+
{{- if not .Values.ingress.tls }}
99
nginx.ingress.kubernetes.io/ssl-redirect: "false"
1010
{{- end }}
1111
nginx.ingress.kubernetes.io/proxy-buffer-size: "128k"
1212
nginx.ingress.kubernetes.io/rewrite-target: /$2
1313
nginx.ingress.kubernetes.io/configuration-snippet: |
1414
proxy_set_header 'X-Forwarded-Uri' $request_uri;
1515
nginx.ingress.kubernetes.io/proxy-body-size: {{ tpl (.Values.ingress.proxyBodySize | toString) . }}
16-
{{- if .Values.hosts.paths.tlsSecretName }}
16+
{{- if .Values.ingress.addTLSSecretName }}
1717
{{- if .Values.ingress.certManagerAnnotations }}
1818
cert-manager.io/cluster-issuer: {{ tpl (.Values.ingress.clusterIssuer | toString) . }}
1919
{{- if .Values.ingress.theiaCloudCommonName }}
20-
cert-manager.io/common-name: "Theia.Cloud"
20+
cert-manager.io/common-name: "Theia Cloud"
2121
{{- end }}
2222
acme.cert-manager.io/http01-ingress-class: nginx
2323
{{- end }}
2424
{{- end }}
2525
spec:
2626
ingressClassName: nginx
27-
{{- if .Values.hosts.tls }}
27+
{{- if .Values.ingress.tls }}
2828
tls:
2929
- hosts:
30-
- {{ tpl (.Values.hosts.paths.baseHost | toString) . }}
30+
- {{ tpl (.Values.hosts.configuration.baseHost | toString) . }}
3131
{{- range .Values.hosts.allWildcardInstances }}
32-
- {{ printf "'%s%s'" . $.Values.hosts.paths.baseHost }}
32+
- {{ printf "'%s%s'" . $.Values.hosts.configuration.baseHost }}
3333
{{- end }}
34-
{{- if .Values.hosts.paths.tlsSecretName }}
34+
{{- if .Values.ingress.addTLSSecretName }}
3535
secretName: ws-cert-secret
3636
{{- end }}
3737
{{- end }}
3838
{{- if not (lookup "networking.k8s.io/v1" "Ingress" .Release.Namespace (tpl (.Values.ingress.instanceName | toString) .) ) }}
3939
rules:
40-
- host: {{ tpl (.Values.hosts.paths.baseHost | toString) . }}
40+
- host: {{ tpl (.Values.hosts.configuration.baseHost | toString) . }}
4141
http:
4242
{{- range .Values.hosts.allWildcardInstances }}
43-
- host: {{ printf "'%s%s'" . $.Values.hosts.paths.baseHost }}
43+
- host: {{ printf "'%s%s'" . $.Values.hosts.configuration.baseHost }}
4444
http:
4545
{{- end }}
4646
{{- else }}

charts/theia.cloud/templates/instances-ingress.yaml renamed to charts/theia-cloud/templates/instances-ingress.yaml

+11-7
Original file line numberDiff line numberDiff line change
@@ -5,38 +5,42 @@ metadata:
55
name: {{ tpl (.Values.ingress.instanceName | toString) . }}
66
namespace: {{ .Release.Namespace }}
77
annotations:
8-
{{- if not .Values.hosts.tls }}
8+
{{- if not .Values.ingress.tls }}
99
nginx.ingress.kubernetes.io/ssl-redirect: "false"
1010
{{- end }}
11+
{{- if .Values.ingress.addTLSSecretName }}
1112
{{- if .Values.ingress.certManagerAnnotations }}
1213
cert-manager.io/cluster-issuer: {{ tpl (.Values.ingress.clusterIssuer | toString) . }}
1314
{{- if .Values.ingress.theiaCloudCommonName }}
14-
cert-manager.io/common-name: "Theia.Cloud"
15+
cert-manager.io/common-name: "Theia Cloud"
1516
{{- end }}
1617
acme.cert-manager.io/http01-ingress-class: nginx
1718
{{- end }}
19+
{{- end }}
1820
nginx.ingress.kubernetes.io/proxy-buffer-size: "128k"
1921
nginx.ingress.kubernetes.io/rewrite-target: /$2
2022
nginx.ingress.kubernetes.io/configuration-snippet: |
2123
proxy_set_header 'X-Forwarded-Uri' $request_uri;
2224
nginx.ingress.kubernetes.io/proxy-body-size: {{ tpl (.Values.ingress.proxyBodySize | toString) . }}
2325
spec:
2426
ingressClassName: nginx
25-
{{- if .Values.hosts.tls }}
27+
{{- if .Values.ingress.tls }}
2628
tls:
2729
- hosts:
28-
- {{ tpl (.Values.hosts.instance | toString) . }}
30+
- {{ tpl (printf "%s.%s" .Values.hosts.configuration.instance .Values.hosts.configuration.baseHost | toString) . }}
2931
{{- range .Values.hosts.allWildcardInstances }}
30-
- {{ printf "'%s%s'" . $.Values.hosts.instance }}
32+
- {{ printf "'%s%s.%s'" . $.Values.hosts.configuration.instance $.Values.hosts.configuration.baseHost }}
3133
{{- end }}
34+
{{- if .Values.ingress.addTLSSecretName }}
3235
secretName: ws-cert-secret
36+
{{- end }}
3337
{{- end }}
3438
{{- if not (lookup "networking.k8s.io/v1" "Ingress" .Release.Namespace (tpl (.Values.ingress.instanceName | toString) .) ) }}
3539
rules:
36-
- host: {{ tpl (.Values.hosts.instance | toString) . }}
40+
- host: {{ tpl (printf "%s.%s" .Values.hosts.configuration.instance .Values.hosts.configuration.baseHost | toString) . }}
3741
http:
3842
{{- range .Values.hosts.allWildcardInstances }}
39-
- host: {{ printf "'%s%s'" . $.Values.hosts.instance }}
43+
- host: {{ printf "'%s%s.%s'" . $.Values.hosts.configuration.instance $.Values.hosts.configuration.baseHost }}
4044
http:
4145
{{- end }}
4246
{{- else }}

charts/theia.cloud/templates/landing-page-config-map.yaml renamed to charts/theia-cloud/templates/landing-page-config-map.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ data:
1515
keycloakRealm: "{{ tpl (.Values.keycloak.realm | toString) . }}",
1616
keycloakClientId: "{{ tpl (.Values.keycloak.clientId | toString) . }}",
1717
{{- if .Values.hosts.usePaths }}
18-
serviceUrl: "{{ tpl (.Values.hosts.serviceProtocol | toString) . }}://{{ tpl (.Values.hosts.paths.baseHost | toString) . }}/{{ tpl (.Values.hosts.paths.service | toString) . }}",
18+
serviceUrl: "{{ tpl (.Values.service.protocol | toString) . }}://{{ tpl (.Values.hosts.configuration.baseHost | toString) . }}/{{ tpl (.Values.hosts.configuration.service | toString) . }}",
1919
{{- else }}
20-
serviceUrl: "{{ tpl (.Values.hosts.serviceProtocol | toString) . }}://{{ tpl (.Values.hosts.service | toString) . }}{{ if .Values.hosts.useServicePortInHostname }}:{{ tpl (.Values.hosts.servicePort | toString) . }}{{ end }}",
20+
serviceUrl: "{{ tpl (.Values.service.protocol | toString) . }}://{{ tpl (.Values.hosts.configuration.service | toString) . }}.{{ tpl (.Values.hosts.configuration.baseHost | toString) . }}",
2121
{{- end }}
2222
appDefinition: "{{ tpl (.Values.landingPage.appDefinition | toString) . }}",
2323
additionalApps: [

charts/theia.cloud/templates/landing-page-ingress-path-based.yaml renamed to charts/theia-cloud/templates/landing-page-ingress-path-based.yaml

+8-8
Original file line numberDiff line numberDiff line change
@@ -4,41 +4,41 @@ kind: Ingress
44
metadata:
55
name: landing-page-ingress
66
annotations:
7-
{{- if not .Values.hosts.tls }}
7+
{{- if not .Values.ingress.tls }}
88
nginx.ingress.kubernetes.io/ssl-redirect: "false"
99
{{- end }}
10-
{{- if .Values.hosts.paths.landing }}
10+
{{- if .Values.hosts.configuration.landing }}
1111
nginx.ingress.kubernetes.io/rewrite-target: /$2
1212
{{- end }}
1313
# Rewrite all URLs not ending with a segment containing . or ? with a trailing slash
1414
# This is necessary to correctly resolve relative paths (e.g. for css files) from the landing page.
1515
nginx.ingress.kubernetes.io/configuration-snippet: |
1616
rewrite ^([^.?]*[^/])$ $1/ redirect;
17-
{{- if .Values.hosts.paths.tlsSecretName }}
17+
{{- if .Values.ingress.addTLSSecretName }}
1818
{{- if .Values.ingress.certManagerAnnotations }}
1919
cert-manager.io/cluster-issuer: {{ tpl (.Values.ingress.clusterIssuer | toString) . }}
2020
{{- end }}
2121
{{- end }}
2222
namespace: {{ .Release.Namespace }}
2323
spec:
2424
ingressClassName: nginx
25-
{{- if .Values.hosts.tls }}
25+
{{- if .Values.ingress.tls }}
2626
tls:
2727
- hosts:
28-
- {{ tpl (.Values.hosts.paths.baseHost | toString) . }}
29-
{{- if .Values.hosts.paths.tlsSecretName }}
28+
- {{ tpl (.Values.hosts.configuration.baseHost | toString) . }}
29+
{{- if .Values.ingress.addTLSSecretName }}
3030
secretName: landing-page-cert-secret
3131
{{- end }}
3232
{{- end }}
3333
rules:
34-
- host: {{ tpl (.Values.hosts.paths.baseHost | toString) . }}
34+
- host: {{ tpl (.Values.hosts.configuration.baseHost | toString) . }}
3535
http:
3636
paths:
3737
- backend:
3838
service:
3939
name: landing-page-service
4040
port:
4141
number: 80
42-
path: /{{ if .Values.hosts.paths.landing }}{{ tpl (.Values.hosts.paths.landing | toString) . }}(/|$)(.*){{ end }}
42+
path: /{{ if .Values.hosts.configuration.landing }}{{ tpl (.Values.hosts.configuration.landing | toString) . }}(/|$)(.*){{ end }}
4343
pathType: Prefix
4444
{{- end }}

0 commit comments

Comments
 (0)