File tree Expand file tree Collapse file tree 4 files changed +77
-0
lines changed
deploy/charts/venafi-kubernetes-agent Expand file tree Collapse file tree 4 files changed +77
-0
lines changed Original file line number Diff line number Diff line change 74
74
- name : credentials
75
75
mountPath : " /etc/venafi/agent/key"
76
76
readOnly : true
77
+ {{- with .Values.volumeMounts }}
78
+ {{- toYaml . | nindent 12 }}
79
+ {{- end }}
77
80
{{- with .Values.nodeSelector }}
78
81
nodeSelector :
79
82
{{- toYaml . | nindent 8 }}
95
98
secret :
96
99
secretName : {{ default "agent-credentials" .Values.authentication.secretName }}
97
100
optional : false
101
+ {{- with .Values.volumes }}
102
+ {{- toYaml . | nindent 8 }}
103
+ {{- end }}
Original file line number Diff line number Diff line change @@ -74,3 +74,31 @@ tests:
74
74
- contains :
75
75
path : spec.template.spec.containers[0].command
76
76
content : notpreflight
77
+
78
+ # Check the volumes and volumeMounts works correctly
79
+ - it : Volumes and VolumeMounts added correctly
80
+ set :
81
+ config.organisation : test_org
82
+ config.cluster : test_cluster
83
+ values :
84
+ - ./values/custom-volumes.yaml
85
+ asserts :
86
+ - isKind :
87
+ of : Deployment
88
+ - equal :
89
+ # In template this comes after credentials and agent config volumeMounts
90
+ path : spec.template.spec.containers[0].volumeMounts[?(@.name == "cabundle")]
91
+ value :
92
+ name : cabundle
93
+ mountPath : /etc/ssl/certs/ca-certificates.crt
94
+ subPath : ca-certificates.crt
95
+ readOnly : true
96
+ - equal :
97
+ path : spec.template.spec.volumes[?(@.name == "cabundle")].configMap
98
+ value :
99
+ name : cabundle
100
+ optional : false
101
+ defaultMode : 0644
102
+ items :
103
+ - key : cabundle
104
+ path : ca-certificates.crt
Original file line number Diff line number Diff line change
1
+ volumes :
2
+ - name : cabundle
3
+ configMap :
4
+ name : cabundle
5
+ optional : false
6
+ defaultMode : 0644
7
+ items :
8
+ - key : cabundle
9
+ path : ca-certificates.crt
10
+
11
+ volumeMounts :
12
+ - name : cabundle
13
+ mountPath : /etc/ssl/certs/ca-certificates.crt
14
+ subPath : ca-certificates.crt
15
+ readOnly : true
Original file line number Diff line number Diff line change @@ -90,6 +90,34 @@ command: []
90
90
# For example `["--strict", "--oneshot"]`
91
91
extraArgs : []
92
92
93
+ # -- Additional volumes to add to the Venafi Kubernetes Agent container. This is
94
+ # useful for mounting a custom CA bundle. For example:
95
+ #
96
+ # volumes:
97
+ # - name: cabundle
98
+ # configMap:
99
+ # name: cabundle
100
+ # optional: false
101
+ # defaultMode: 0644
102
+ #
103
+ # In order to create the ConfigMap, you can use the following command:
104
+ #
105
+ # kubectl create configmap cabundle \
106
+ # --from-file=cabundle=./your/custom/ca/bundle.pem
107
+ volumes : []
108
+
109
+ # -- Additional volume mounts to add to the Venafi Kubernetes Agent container.
110
+ # This is useful for mounting a custom CA bundle. Any PEM certificate mounted
111
+ # under /etc/ssl/certs will be loaded by the Venafi Kubernetes Agent. For
112
+ # example:
113
+ #
114
+ # volumeMounts:
115
+ # - name: cabundle
116
+ # mountPath: /etc/ssl/certs/cabundle
117
+ # subPath: cabundle
118
+ # readOnly: true
119
+ volumeMounts : []
120
+
93
121
# -- Authentication details for the Venafi Kubernetes Agent
94
122
authentication :
95
123
# -- Name of the secret containing the private key
You can’t perform that action at this time.
0 commit comments