Skip to content

Commit

Permalink
Ability to specify additional CA using a secret name/key (#215)
Browse files Browse the repository at this point in the history
  • Loading branch information
divolgin authored Oct 16, 2024
1 parent 30c841e commit 317c7c4
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ vet:

.PHONY: build-ttl.sh
build-ttl.sh:
docker buildx build . -t ttl.sh/${USER}/replicated-sdk:24h -f deploy/Dockerfile
docker buildx build . -t ttl.sh/${USER}/replicated-sdk:24h -f deploy/Dockerfile --load
docker push ttl.sh/${USER}/replicated-sdk:24h

make -C chart build-ttl.sh
Expand Down
14 changes: 13 additions & 1 deletion chart/templates/replicated-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,14 @@ spec:
configMap:
defaultMode: 420
name: {{ .Values.privateCAConfigmap }}
{{- else if .Values.privateCASecret }}
- name: additional-certs
secret:
defaultMode: 420
secretName: {{ .Values.privateCASecret.name }}
items:
- key: {{ .Values.privateCASecret.key }}
path: ca.crt
{{- end }}
containers:
- name: replicated
Expand All @@ -74,12 +82,16 @@ spec:
{{- if .Values.privateCAConfigmap }}
- mountPath: /certs
name: additional-certs
{{- else if .Values.privateCASecret }}
- mountPath: /certs/ca.crt
subPath: ca.crt
name: additional-certs
{{- end }}
env:
{{- with .Values.extraEnv }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.privateCAConfigmap }}
{{- if or .Values.privateCAConfigmap .Values.privateCASecret }}
- name: SSL_CERT_DIR
value: /certs
{{- end }}
Expand Down
1 change: 1 addition & 0 deletions chart/values.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ service:
port: 3000

privateCAConfigmap: ~
privateCASecret: ~

extraEnv: []

Expand Down

0 comments on commit 317c7c4

Please sign in to comment.