Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend landing page configuration options for logo and texts #58

Merged
merged 1 commit into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- [theia-cloud-crds] Add option field to CRDs and increase version to `Session.v1beta8`, `Workspace.v1beta5` and `AppDefinition.v1beta10` [#55](https://github.com/eclipsesource/theia-cloud-helm/pull/55) | [#293](https://github.com/eclipsesource/theia-cloud/pull/293)
- [theia-cloud] Add configurable image preloading [#56](https://github.com/eclipsesource/theia-cloud-helm/pull/56)
- [theia-cloud] Add landing page configuration options for logo file extension, loading text, user info title & text [#58](https://github.com/eclipsesource/theia-cloud-helm/pull/58) - contributed on behalf of STMicroelectronics

## [0.10.0] - 2024-04-02

Expand Down
2 changes: 1 addition & 1 deletion charts/theia.cloud/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ 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.11.0-next.1
version: 0.11.0-next.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
Expand Down
16 changes: 14 additions & 2 deletions charts/theia.cloud/templates/landing-page-config-map.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- $logoFileExtension := tpl (.Values.app.logoFileExtension | toString) . -}}
apiVersion: v1
kind: ConfigMap
metadata:
Expand Down Expand Up @@ -27,12 +28,23 @@ data:
},
{{- end }}
],
logoFileExtension: "{{ $logoFileExtension }}",
disableInfo: {{ tpl (.Values.landingPage.disableInfo | toString) . }},
{{- if .Values.landingPage.infoText }}
infoText: "{{ tpl (.Values.landingPage.infoText | toString) . }}",
{{- end }}
{{- if .Values.landingPage.infoTitle }}
infoTitle: "{{ tpl (.Values.landingPage.infoTitle | toString) . }}",
{{- end }}
{{- if .Values.landingPage.loadingText }}
loadingText: "{{ tpl (.Values.landingPage.loadingText | toString) . }}",
{{- end }}
};
binaryData:
{{- if .Values.app.logoData }}
{{ print "logo.svg: "}}{{ .Values.app.logoData }}
{{ printf "logo.%s: " $logoFileExtension }}{{ .Values.app.logoData }}
{{- else }}
{{- range $path, $bytes := .Files.Glob (printf "%s" .Values.app.logo)}}
{{ print "logo.svg: "}}{{ $.Files.Get $path | b64enc }}
{{ printf "logo.%s: " $logoFileExtension }}{{ $.Files.Get $path | b64enc }}
{{ end }}
{{- end }}
5 changes: 3 additions & 2 deletions charts/theia.cloud/templates/landing-page.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- $logoFileName := printf "logo.%s" (tpl (.Values.app.logoFileExtension | toString) .) -}}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down Expand Up @@ -37,8 +38,8 @@ spec:
mountPath: /usr/share/nginx/html/config.js
subPath: config.js
- name: landing-page-config
mountPath: /usr/share/nginx/html/logo.svg
subPath: logo.svg
mountPath: {{ printf "/usr/share/nginx/html/%s" $logoFileName }}
subPath: {{ $logoFileName }}
{{- if .Values.landingPage.imagePullSecret }}
imagePullSecrets:
- name: {{ tpl (.Values.landingPage.imagePullSecret | toString) . }}
Expand Down
20 changes: 20 additions & 0 deletions charts/theia.cloud/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ app:
# Another way is to directly add the base64 string to the values file.
logoData:

# -- The file extension of the logo. Must be set to match the logo respectively the logoData.
# This is required because browsers cannot show a binary image (e.g. png) with a svg ending
# and vice-versa.
logoFileExtension: 'svg'

# -- Values related to certificates/Cert-manager
# @default -- (see details below)
issuer:
Expand Down Expand Up @@ -143,6 +148,21 @@ landingPage:
# further-app-definition:
# label: "Further App Definition"

# -- Should showing info title and text below the launch button be disabled
# true hides the info title and text
# false shows the info title and text
disableInfo: false
# -- Optional: If specified with a value, this overrides the info text shown on the landing page.
# Empty values are ignored. Use `disableInfo` to deactivate showing the info completely.
infoText:
# -- Optional: If specified with a value, this overrides the title of the info text shown on the landing page.
# Empty values are ignored. Use `disableInfo` to deactivate showing the info completely.
infoTitle:

# -- Optional: If specified with a value, this overrides the message shown to the user while the session is started.
# Empty values are ignored and the default text is used.
loadingText:

# -- Values related to Keycloak
# @default -- (see details below)
keycloak:
Expand Down