Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ spec:
- name: credentials
mountPath: "/etc/venafi/agent/key"
readOnly: true
{{- with .Values.volumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand All @@ -95,3 +98,6 @@ spec:
secret:
secretName: {{ default "agent-credentials" .Values.authentication.secretName }}
optional: false
{{- with .Values.volumes }}
{{- toYaml . | nindent 8 }}
{{- end }}
28 changes: 28 additions & 0 deletions deploy/charts/venafi-kubernetes-agent/tests/deployment_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,31 @@ tests:
- contains:
path: spec.template.spec.containers[0].command
content: notpreflight

# Check the volumes and volumeMounts works correctly
- it: Volumes and VolumeMounts added correctly
set:
config.organisation: test_org
config.cluster: test_cluster
values:
- ./values/custom-volumes.yaml
asserts:
- isKind:
of: Deployment
- equal:
# In template this comes after credentials and agent config volumeMounts
path: spec.template.spec.containers[0].volumeMounts[?(@.name == "cabundle")]
value:
name: cabundle
mountPath: /etc/ssl/certs/ca-certificates.crt
subPath: ca-certificates.crt
readOnly: true
- equal:
path: spec.template.spec.volumes[?(@.name == "cabundle")].configMap
value:
name: cabundle
optional: false
defaultMode: 0644
items:
- key: cabundle
path: ca-certificates.crt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
volumes:
- name: cabundle
configMap:
name: cabundle
optional: false
defaultMode: 0644
items:
- key: cabundle
path: ca-certificates.crt

volumeMounts:
- name: cabundle
mountPath: /etc/ssl/certs/ca-certificates.crt
subPath: ca-certificates.crt
readOnly: true
28 changes: 28 additions & 0 deletions deploy/charts/venafi-kubernetes-agent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,34 @@ command: []
# For example `["--strict", "--oneshot"]`
extraArgs: []

# -- Additional volumes to add to the Venafi Kubernetes Agent container. This is
# useful for mounting a custom CA bundle. For example:
#
# volumes:
# - name: cabundle
# configMap:
# name: cabundle
# optional: false
# defaultMode: 0644
#
# In order to create the ConfigMap, you can use the following command:
#
# kubectl create configmap cabundle \
# --from-file=cabundle=./your/custom/ca/bundle.pem
volumes: []

# -- Additional volume mounts to add to the Venafi Kubernetes Agent container.
# This is useful for mounting a custom CA bundle. Any PEM certificate mounted
# under /etc/ssl/certs will be loaded by the Venafi Kubernetes Agent. For
# example:
#
# volumeMounts:
# - name: cabundle
# mountPath: /etc/ssl/certs/cabundle
# subPath: cabundle
# readOnly: true
volumeMounts: []

# -- Authentication details for the Venafi Kubernetes Agent
authentication:
# -- Name of the secret containing the private key
Expand Down