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

chore(greenhouse): adds a secret for the UI demo token #862

Closed
wants to merge 8 commits into from
4 changes: 4 additions & 0 deletions charts/dashboard/ci/test-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@
dnsDomain: greenhouse.tld
oidc:
clientID: topSecret!

secrets:
demoUser:
token: test_demo_user_token

Check failure on line 10 in charts/dashboard/ci/test-values.yaml

View workflow job for this annotation

GitHub Actions / helm-lint

10:32 [new-line-at-end-of-file] no new line character at the end of file
6 changes: 5 additions & 1 deletion charts/dashboard/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ spec:
app: dashboard
annotations:
checksum/props-cm: {{ include (print $.Template.BasePath "/dashboard-props-cm.yaml") . | sha256sum }}
checksum/props-secrets: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }}
spec:
# The preStop hook below sleeps 30 seconds, extend the gracePeriod accordingly
terminationGracePeriodSeconds: 60
Expand All @@ -43,7 +44,10 @@ spec:
limits:
cpu: "100m"
memory: "256M"

env:
- name: DEMO_TOKEN
valueFrom: { secretKeyRef: { name: dashboard-app-props, key: demo_token } }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is mixing JSON and YAML syntax, no?


livenessProbe:
httpGet:
path: /
Expand Down
6 changes: 6 additions & 0 deletions charts/dashboard/templates/secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v1
kind: Secret
metadata:
name: dashboard-app-props
data:
demo_token: {{ required ".Values.dashboard.secrets.demoUser.token" .Values.dashboard.secrets.demoUser.token | b64enc }}
Loading