Skip to content

Commit 84628ec

Browse files
feat(helm): add advanced values (#210)
Signed-off-by: Oliver Bähler <[email protected]>
1 parent ce5415a commit 84628ec

File tree

4 files changed

+79
-8
lines changed

4 files changed

+79
-8
lines changed

charts/sops-operator/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ The following Values are available for this chart.
6161
| args.extraArgs | list | `[]` | A list of extra arguments to add to the sops-operator |
6262
| args.logLevel | int | `4` | Log Level |
6363
| args.pprof | bool | `false` | Enable Profiling |
64+
| env | list | `[]` | Environment variables |
6465
| fullnameOverride | string | `""` | |
6566
| image.pullPolicy | string | `"IfNotPresent"` | Set the image pull policy. |
6667
| image.registry | string | `"ghcr.io"` | Set the image registry |
@@ -70,7 +71,8 @@ The following Values are available for this chart.
7071
| livenessProbe | object | `{"httpGet":{"path":"/healthz","port":10080}}` | Configure the liveness probe using Deployment probe spec |
7172
| nameOverride | string | `""` | |
7273
| nodeSelector | object | `{}` | Set the node selector |
73-
| podAnnotations | object | `{}` | Annotations to add |
74+
| podAnnotations | object | `{}` | Annotations to add to pod |
75+
| podLabels | object | `{}` | Annotations to add to pod |
7476
| podSecurityContext | object | `{"enabled":true,"seccompProfile":{"type":"RuntimeDefault"}}` | Set the securityContext |
7577
| priorityClassName | string | `""` | Set the priority class name of the Capsule pod |
7678
| rbac.enabled | bool | `true` | Enable bootstraping of RBAC resources |
@@ -85,6 +87,8 @@ The following Values are available for this chart.
8587
| serviceAccount.name | string | `""` | The name of the service account to use. |
8688
| tolerations | list | `[]` | Set list of tolerations |
8789
| topologySpreadConstraints | list | `[]` | Set topology spread constraints |
90+
| volumeMounts | list | `[{"mountPath":"/tmp","name":"sops-volume"}]` | VolumeMounts |
91+
| volumes | list | `[{"emptyDir":{"sizeLimit":"500Mi"},"name":"sops-volume"}]` | Volumes |
8892

8993
### Monitoring Parameters
9094

charts/sops-operator/templates/deployment.yaml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ spec:
1717
{{- end }}
1818
labels:
1919
{{- include "helm.selectorLabels" . | nindent 8 }}
20+
{{- with .Values.podLabels }}
21+
{{- toYaml . | nindent 8 }}
22+
{{- end }}
2023
spec:
2124
{{- with .Values.imagePullSecrets }}
2225
imagePullSecrets:
@@ -26,10 +29,10 @@ spec:
2629
{{- if $.Values.podSecurityContext.enabled }}
2730
securityContext: {{- omit $.Values.podSecurityContext "enabled" | toYaml | nindent 8 }}
2831
{{- end }}
32+
{{- with .Values.volumes }}
2933
volumes:
30-
- name: sops-volume
31-
emptyDir:
32-
sizeLimit: 500Mi
34+
{{- toYaml . | nindent 8 }}
35+
{{- end }}
3336
containers:
3437
- name: {{ .Chart.Name }}
3538
{{- if $.Values.securityContext.enabled }}
@@ -48,6 +51,9 @@ spec:
4851
valueFrom:
4952
fieldRef:
5053
fieldPath: metadata.namespace
54+
{{- with .Values.env }}
55+
{{- toYaml . | nindent 10 }}
56+
{{- end }}
5157
ports:
5258
{{- if .Values.args.pprof }}
5359
- name: pprof
@@ -65,9 +71,10 @@ spec:
6571
{{- toYaml .Values.readinessProbe | nindent 12}}
6672
resources:
6773
{{- toYaml .Values.resources | nindent 12 }}
74+
{{- with .Values.volumeMounts }}
6875
volumeMounts:
69-
- mountPath: /tmp
70-
name: sops-volume
76+
{{- toYaml . | nindent 10 }}
77+
{{- end }}
7178
priorityClassName: {{ .Values.priorityClassName }}
7279
{{- with .Values.nodeSelector }}
7380
nodeSelector:

charts/sops-operator/values.schema.json

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@
4444
}
4545
}
4646
},
47+
"env": {
48+
"description": "Environment variables",
49+
"type": "array"
50+
},
4751
"fullnameOverride": {
4852
"type": "string"
4953
},
@@ -364,7 +368,11 @@
364368
"type": "object"
365369
},
366370
"podAnnotations": {
367-
"description": "Annotations to add",
371+
"description": "Annotations to add to pod",
372+
"type": "object"
373+
},
374+
"podLabels": {
375+
"description": "Annotations to add to pod",
368376
"type": "object"
369377
},
370378
"podSecurityContext": {
@@ -494,6 +502,41 @@
494502
"topologySpreadConstraints": {
495503
"description": "Set topology spread constraints",
496504
"type": "array"
505+
},
506+
"volumeMounts": {
507+
"description": "VolumeMounts",
508+
"type": "array",
509+
"items": {
510+
"type": "object",
511+
"properties": {
512+
"mountPath": {
513+
"type": "string"
514+
},
515+
"name": {
516+
"type": "string"
517+
}
518+
}
519+
}
520+
},
521+
"volumes": {
522+
"description": "Volumes",
523+
"type": "array",
524+
"items": {
525+
"type": "object",
526+
"properties": {
527+
"emptyDir": {
528+
"type": "object",
529+
"properties": {
530+
"sizeLimit": {
531+
"type": "string"
532+
}
533+
}
534+
},
535+
"name": {
536+
"type": "string"
537+
}
538+
}
539+
}
497540
}
498541
}
499542
}

charts/sops-operator/values.yaml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,10 @@ serviceAccount:
109109
# -- The name of the service account to use.
110110
name: ""
111111

112-
# -- Annotations to add
112+
# -- Annotations to add to pod
113+
podLabels: {}
114+
115+
# -- Annotations to add to pod
113116
podAnnotations: {}
114117

115118
# -- Set the securityContext
@@ -165,6 +168,20 @@ affinity: {}
165168
# -- Set topology spread constraints
166169
topologySpreadConstraints: []
167170

171+
# -- Environment variables
172+
env: []
173+
174+
# -- VolumeMounts
175+
volumeMounts:
176+
- mountPath: /tmp
177+
name: sops-volume
178+
179+
# -- Volumes
180+
volumes:
181+
- name: sops-volume
182+
emptyDir:
183+
sizeLimit: 500Mi
184+
168185
# Monitoring Values
169186
monitoring:
170187
# -- Enable Monitoring of the Operator

0 commit comments

Comments
 (0)