Skip to content

Commit

Permalink
Fix theia-cloud helm chart not being updateable (#69)
Browse files Browse the repository at this point in the history
Properly quote the `rules.host` when loading from cluster on `helm upgrade`.
This is required, as a `*` is a special char in yaml and will break the parsing on `upgrade`.
`*` is a common wildcard character for host names so it should be supported.
With this the upgrading should work again.
Also add a note to the values file, that updating the `allWildcardInstances` will not work with `helm upgrade`, which is intended for now.
  • Loading branch information
sgraband authored Aug 9, 2024
1 parent 646abbc commit a94916e
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
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.12.0-next.0
version: 0.11.2

# 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.12.0-next"
appVersion: "0.11.1"
4 changes: 2 additions & 2 deletions charts/theia-cloud/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# theia-cloud

![Version: 0.12.0-next.0](https://img.shields.io/badge/Version-0.12.0--next.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.12.0-next](https://img.shields.io/badge/AppVersion-0.12.0--next-informational?style=flat-square)
![Version: 0.11.2](https://img.shields.io/badge/Version-0.11.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.11.1](https://img.shields.io/badge/AppVersion-0.11.1-informational?style=flat-square)

A Helm chart for Theia Cloud

Expand All @@ -23,7 +23,7 @@ A Helm chart for Theia Cloud
| demoApplication.pullSecret | string | `""` | the image pull secret. Leave empty if registry is public |
| demoApplication.timeout | string | `"30"` | Limit in minutes |
| hosts | object | (see details below) | You may adjust the hostname below. |
| 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) |
| 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. IMPORTANT: If this gets updated, the helm chart needs to be re-installed because helm upgrade will not properly update this at the moment. These are required to configure TLS (if enabled via ingress.tls == true) |
| hosts.configuration | object | (see details below) | Configuration for the hostnames. Contains the baseHost and afixes for all services |
| 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 |
| hosts.configuration.instance | string | `"instances"` | afix for deployed instances |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ spec:
{{- else }}
rules:
{{ range $rule := (lookup "networking.k8s.io/v1" "Ingress" .Release.Namespace (tpl (.Values.ingress.instanceName | toString) .)).spec.rules }}
- host: {{ .host }}
- host: {{ .host | quote }}
{{ if .http }}
http:
paths:
Expand Down
2 changes: 1 addition & 1 deletion charts/theia-cloud/templates/instances-ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ spec:
{{- else }}
rules:
{{ range $rule := (lookup "networking.k8s.io/v1" "Ingress" .Release.Namespace (tpl (.Values.ingress.instanceName | toString) .)).spec.rules }}
- host: {{ .host }}
- host: {{ .host | quote }}
{{ if .http }}
http:
paths:
Expand Down
2 changes: 2 additions & 0 deletions charts/theia-cloud/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ hosts:
# "*.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.
# IMPORTANT: If this gets updated, the helm chart needs to be re-installed because
# helm upgrade will not properly update this at the moment.
# These are required to configure TLS (if enabled via ingress.tls == true)
allWildcardInstances: ["*.webview."]

Expand Down

0 comments on commit a94916e

Please sign in to comment.