Skip to content

Commit 8d87a58

Browse files
feat(PLATFORM-1020): support custom volume mounts for certificate files
This opens up supporting the use case of reading certificate files from volumes created by the Secrets Store CSI driver for k8s.
1 parent 0116f63 commit 8d87a58

File tree

5 files changed

+24
-4
lines changed

5 files changed

+24
-4
lines changed

gremlin/templates/chao-deployment.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,7 @@ spec:
116116
{{- end }}
117117
volumes:
118118
- name: gremlin-cert
119-
secret:
120-
secretName: {{ include "gremlin.secretName" . }}
119+
{{ .Values.gremlin.secret.certVolume | toYaml | indent 8}}
121120
{{- if .Values.ssl.certFile }}
122121
- name: ssl-cert-file
123122
secret:

gremlin/templates/chao-service-account.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ kind: ServiceAccount
44
metadata:
55
name: chao
66
namespace: {{ .Release.Namespace }}
7+
{{ if .Values.chao.serviceAccount.annotations -}}
8+
annotations:
9+
{{ .Values.chao.serviceAccount.annotations | toYaml }}
10+
{{- end }}
711
---
812
apiVersion: rbac.authorization.k8s.io/v1
913
kind: ClusterRole

gremlin/templates/daemonset.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,7 @@ spec:
174174
path: /proc/sysrq-trigger
175175
{{- if (eq (include "gremlin.secretType" .) "certificate") }}
176176
- name: gremlin-cert
177-
secret:
178-
secretName: {{ include "gremlin.secretName" . }}
177+
{{ .Values.gremlin.secret.certVolume | toYaml | indent 10}}
179178
{{- end }}
180179
{{- if and .Values.gremlin.podSecurity.seccomp.enabled (eq "localhost/gremlin" .Values.gremlin.podSecurity.seccomp.profile) }}
181180
- name: seccomp-root

gremlin/templates/gremlin-service-account.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ kind: ServiceAccount
55
metadata:
66
name: gremlin
77
namespace: {{ .Release.Namespace }}
8+
{{ if .Values.gremlin.serviceAccount.annotations -}}
9+
annotations:
10+
{{ .Values.gremlin.serviceAccount.annotations | toYaml }}
11+
{{- end }}
812
{{ if .Values.gremlin.podSecurity.podSecurityPolicy.create }}
913
---
1014
apiVersion: rbac.authorization.k8s.io/v1

gremlin/values.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ gremlin:
110110
# Gremlin's requirements (see gremlin.podSecurity.podSecurityPolicy and
111111
# gremlin.podSecurity.securityContextConstraints)
112112
create: true
113+
annotations: {}
113114

114115
podSecurity:
115116

@@ -250,6 +251,16 @@ gremlin:
250251
# team private key (e.g. -----BEGIN EC PRIVATE KEY-----...-----END EC PRIVATE KEY-----)
251252
key:
252253

254+
# Used to define the value of the gremlin-cert volume except the name
255+
# This volume should always contain two files named
256+
# - gremlin.cert
257+
# - gremlin.key
258+
# containing the team certificate and private key used to auth the agents
259+
# to the gremlin API
260+
certVolume:
261+
secret:
262+
secretName: gremlin-cert
263+
253264
## Secret auth requires: `teamSecret`
254265
# team secret (e.g. 00000000-0000-0000-0000-000000000000)
255266
teamSecret:
@@ -276,6 +287,9 @@ chao:
276287

277288
affinity: {}
278289

290+
serviceAccount:
291+
annotations: {}
292+
279293
ssl:
280294
# ssl.certFile -
281295
# Add a certificate file to Gremlin's set of certificate authorities. This argument expects a file containing the

0 commit comments

Comments
 (0)