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

feat(PLATFORM-1020): support custom volume mounts for certificate files #74

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
6 changes: 5 additions & 1 deletion gremlin/templates/chao-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,12 @@ spec:
{{- end }}
volumes:
- name: gremlin-cert
{{- if .Values.gremlin.secret.certVolume }}
{{ .Values.gremlin.secret.certVolume | toYaml | indent 8 }}
{{- else }}
secret:
secretName: {{ include "gremlin.secretName" . }}
secretName: gremlin-secret
{{- end }}
{{- if .Values.ssl.certFile }}
- name: ssl-cert-file
secret:
Expand Down
4 changes: 4 additions & 0 deletions gremlin/templates/chao-service-account.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ kind: ServiceAccount
metadata:
name: chao
namespace: {{ .Release.Namespace }}
{{ if .Values.chao.serviceAccount.annotations -}}
annotations:
{{ .Values.chao.serviceAccount.annotations | toYaml }}
{{- end }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
Expand Down
6 changes: 5 additions & 1 deletion gremlin/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,12 @@ spec:
path: /proc/sysrq-trigger
{{- if (eq (include "gremlin.secretType" .) "certificate") }}
- name: gremlin-cert
{{- if .Values.gremlin.secret.certVolume }}
{{ .Values.gremlin.secret.certVolume | toYaml | indent 10}}
{{- else }}
secret:
secretName: {{ include "gremlin.secretName" . }}
secretName: gremlin-secret
{{- end }}
{{- end }}
{{- if and .Values.gremlin.podSecurity.seccomp.enabled (eq "localhost/gremlin" .Values.gremlin.podSecurity.seccomp.profile) }}
- name: seccomp-root
Expand Down
4 changes: 4 additions & 0 deletions gremlin/templates/gremlin-service-account.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ kind: ServiceAccount
metadata:
name: gremlin
namespace: {{ .Release.Namespace }}
{{ if .Values.gremlin.serviceAccount.annotations -}}
annotations:
{{ .Values.gremlin.serviceAccount.annotations | toYaml }}
{{- end }}
{{ if .Values.gremlin.podSecurity.podSecurityPolicy.create }}
---
apiVersion: rbac.authorization.k8s.io/v1
Expand Down
13 changes: 13 additions & 0 deletions gremlin/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ gremlin:
# Gremlin's requirements (see gremlin.podSecurity.podSecurityPolicy and
# gremlin.podSecurity.securityContextConstraints)
create: true
annotations: {}

podSecurity:

Expand Down Expand Up @@ -237,6 +238,7 @@ gremlin:
secret:
# Gremlin supports both `certificate` and `secret` types
# To manage secrets with helm, set `managed=true` and fill in either the certificate auth or secret auth sections
name: gremlin-secret
type: certificate
managed: false
# team identifier (e.g. 11111111-1111-1111-1111-111111111111)
Expand All @@ -250,6 +252,14 @@ gremlin:
# team private key (e.g. -----BEGIN EC PRIVATE KEY-----...-----END EC PRIVATE KEY-----)
key:

# Used to define the value of the gremlin-cert volume except the name
# This volume should always contain two files named
# - gremlin.cert
# - gremlin.key
# containing the team certificate and private key used to auth the agents
# to the gremlin API
certVolume: {}

## Secret auth requires: `teamSecret`
# team secret (e.g. 00000000-0000-0000-0000-000000000000)
teamSecret:
Expand All @@ -276,6 +286,9 @@ chao:

affinity: {}

serviceAccount:
annotations: {}

ssl:
# ssl.certFile -
# Add a certificate file to Gremlin's set of certificate authorities. This argument expects a file containing the
Expand Down