Skip to content

Commit

Permalink
Merge pull request #22 from eth-cscs/chart-update
Browse files Browse the repository at this point in the history
Move proxy auth token to a external secret
  • Loading branch information
rsarm authored Aug 5, 2024
2 parents 0405c28 + 7fad7f5 commit 2c76823
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 9 deletions.
4 changes: 2 additions & 2 deletions chart/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ apiVersion: v2
name: f7t4jhub
description: A Helm chart to Deploy JupyterHub with the FirecREST Spawner
type: application
version: 0.7.0
version: 0.8.0
appVersion: "4.1.5"
dependencies:
- name: f7t4jhub
version: 0.7.0
version: 0.8.0
repository: "file://./f7t4jhub"
- name: reloader
version: v1.0.51
Expand Down
2 changes: 1 addition & 1 deletion chart/f7t4jhub/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apiVersion: v2
name: f7t4jhub
description: A Helm chart to Deploy JupyterHub with the FirecREST Spawner
type: application
version: 0.7.0
version: 0.8.0
appVersion: "4.1.5"
18 changes: 13 additions & 5 deletions chart/f7t4jhub/templates/deployment-hub.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,6 @@ spec:
secretKeyRef:
name: {{ .Release.Name }}-secret
key: authTokenUrl
- name: CONFIGPROXY_AUTH_TOKEN
valueFrom:
secretKeyRef:
name: {{ .Release.Name }}-secret
key: configProxyAuthToken
{{- if .Values.vault.keycloak.enabled }}
- name: KC_CLIENT_ID
valueFrom:
Expand All @@ -73,6 +68,19 @@ spec:
name: {{ .Release.Name }}-common-secrets
key: kc_client_secret
{{- end }}
{{- if .Values.vault.configProxyAuthToken.enabled }}
- name: CONFIGPROXY_AUTH_TOKEN
valueFrom:
secretKeyRef:
name: {{ .Release.Name }}-common-secrets
key: configProxyAuthToken
{{- else }}
- name: CONFIGPROXY_AUTH_TOKEN
valueFrom:
secretKeyRef:
name: {{ .Release.Name }}-secret
key: configProxyAuthToken
{{- end }}
volumeMounts:
- name: db-pvc
mountPath: /home/juhu
Expand Down
8 changes: 8 additions & 0 deletions chart/f7t4jhub/templates/deployment-proxy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,16 @@ spec:
ports:
- containerPort: {{ .Values.network.appPort }}
env:
{{- if .Values.vault.configProxyAuthToken.enabled }}
- name: CONFIGPROXY_AUTH_TOKEN
valueFrom:
secretKeyRef:
name: {{ .Release.Name }}-common-secrets
key: configProxyAuthToken
{{- else }}
- name: CONFIGPROXY_AUTH_TOKEN
valueFrom:
secretKeyRef:
name: {{ .Release.Name }}-secret
key: configProxyAuthToken
{{- end }}
6 changes: 5 additions & 1 deletion chart/f7t4jhub/templates/external-secret.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.vault.keycloak.enabled }}
{{- if or .Values.vault.keycloak.enabled .Values.vault.configProxyAuthToken.secretPath }}
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
Expand All @@ -20,4 +20,8 @@ spec:
remoteRef:
key: {{ .Values.vault.keycloak.secretPath }}
property: kc_client_id
- secretKey: configProxyAuthToken
remoteRef:
key: {{ .Values.vault.configProxyAuthToken.secretPath }}
property: config_proxy_auth_token
{{- end }}
2 changes: 2 additions & 0 deletions chart/f7t4jhub/templates/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ type: Opaque
stringData:
firecrestUrl: {{ .Values.setup.firecrestUrl }}
authTokenUrl: {{ .Values.setup.authTokenUrl}}
{{- if not .Values.vault.configProxyAuthToken.enabled }}
configProxyAuthToken: {{ $token }}
{{- end }}
8 changes: 8 additions & 0 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,14 @@ f7t4jhub:
# Secret path in Vault (replace with your own secret path)
secretPath: 'secret/path/containers'

# proxy authentication token
configProxyAuthToken:
# Enable or disable Vault integration
enabled: false

# Secret path in Vault (replace with your own secret path)
secretPath: 'secret/path/proxy'

metricbeat:
# Enable or disable annotations for metric beat monitoring
enabled: false
Expand Down

0 comments on commit 2c76823

Please sign in to comment.