Skip to content

Commit 4b8e114

Browse files
committed
Now option to give public key explicitly through values.yaml
1 parent 15b07a6 commit 4b8e114

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#Only applied if sshPublicKey provided in values.yaml, if not assumes you have run publish-keys.sh prior to helm release
2+
{{ if .Values.sshPublicKey }}
3+
apiVersion: v1
4+
kind: ConfigMap
5+
metadata:
6+
name: helm-authorized-keys-configmap
7+
data:
8+
authorized_keys: {{ .Values.sshPublicKey }}
9+
{{ end }}

slurm-cluster-chart/templates/login-deployment.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,11 @@ spec:
8080
defaultMode: 0400
8181
- name: authorized-keys
8282
configMap:
83-
name: {{ .Values.configmaps.authorizedKeys }}
83+
{{ if .Values.sshPublicKey }}
84+
name: helm-authorized-keys-configmap
85+
{{ else }}
86+
name: authorized-keys-configmap
87+
{{ end }}
8488
- name: cluster-config
8589
configMap:
8690
name: cluster-config

slurm-cluster-chart/values.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@ sqlImage: mariadb:10.10
1313
databaseStorage: 100Mi
1414

1515
configmaps:
16-
authorizedKeys: authorized-keys-configmap
1716
slurmConf: slurm-conf-configmap
1817
slurmdbdConf: slurmdbd-conf-configmap
1918
sshdConfig: sshd-config-configmap
2019

20+
# If let undefined, assumes you have run publish-keys.sh to publish your public key prior to deployment
21+
sshPublicKey:
22+
2123
secrets:
2224
databaseAuth: database-auth-secret
2325
mungeKey: munge-key-secret

0 commit comments

Comments
 (0)