Skip to content

Commit

Permalink
chore: add crds.podLabels for helm hook jobs (#962)
Browse files Browse the repository at this point in the history
* add crds.podLabels and consume labels in each hook Job object
make template spacing consistent

* adding new value to README configuration table
  • Loading branch information
BryanStenson-okta authored May 28, 2022
1 parent 8f1020a commit 5ddc969
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 10 deletions.
1 change: 1 addition & 0 deletions manifest_staging/charts/secrets-store-csi-driver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ The following table lists the configurable parameters of the csi-secrets-store-p
| `linux.crds.image.repository` | Linux crds image repository | `k8s.gcr.io/csi-secrets-store/driver-crds` |
| `linux.crds.image.pullPolicy` | Linux crds image pull policy | `IfNotPresent` |
| `linux.crds.image.tag` | Linux crds image tag | `v1.1.2` |
| `linux.crds.podLabels` | Linux *Pod* labels appended to CRD helm hook job pods | `{}` |
| `linux.affinity` | Linux affinity | `key: type; operator: NotIn; values: [virtual-kubelet]` |
| `linux.driver.resources` | The resource request/limits for the linux secrets-store container image | `limits: 200m CPU, 200Mi; requests: 50m CPU, 100Mi` |
| `linux.enabled` | Install secrets store csi driver on linux nodes | true |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,11 @@ spec:
name: {{ template "sscd.fullname" . }}-upgrade-crds
{{- if .Values.linux.crds.annotations }}
annotations:
{{ toYaml .Values.linux.crds.annotations}}
{{ toYaml .Values.linux.crds.annotations }}
{{- end }}
{{- if .Values.linux.crds.podLabels }}
labels:
{{ toYaml .Values.linux.crds.podLabels }}
{{- end }}
spec:
serviceAccountName: {{ template "sscd.fullname" . }}-upgrade-crds
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ spec:
- Ephemeral
{{- if and (semverCompare ">=1.20-0" .Capabilities.KubeVersion.Version) .Values.tokenRequests }}
tokenRequests:
{{- toYaml .Values.tokenRequests | nindent 2}}
{{- toYaml .Values.tokenRequests | nindent 2 }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ spec:
annotations:
{{ toYaml .Values.linux.crds.annotations}}
{{- end }}
{{- if .Values.linux.crds.podLabels }}
labels:
{{ toYaml .Values.linux.crds.podLabels }}
{{- end }}
spec:
serviceAccountName: {{ template "sscd.fullname" . }}-keep-crds
{{- if .Values.imagePullSecrets }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.windows.enabled}}
{{- if .Values.windows.enabled }}
kind: DaemonSet
apiVersion: apps/v1
metadata:
Expand Down Expand Up @@ -132,7 +132,7 @@ spec:
{{- end }}
{{- end }}
{{- if .Values.windows.volumeMounts }}
{{- toYaml .Values.windows.volumeMounts | nindent 12}}
{{- toYaml .Values.windows.volumeMounts | nindent 12 }}
{{- end }}
{{- with .Values.windows.driver.resources }}
resources:
Expand Down Expand Up @@ -185,7 +185,7 @@ spec:
{{- end }}
{{- end }}
{{- if .Values.windows.volumes }}
{{- toYaml .Values.windows.volumes | nindent 8}}
{{- toYaml .Values.windows.volumes | nindent 8 }}
{{- end }}
nodeSelector:
kubernetes.io/os: windows
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.linux.enabled}}
{{- if .Values.linux.enabled }}
kind: DaemonSet
apiVersion: apps/v1
metadata:
Expand Down Expand Up @@ -135,7 +135,7 @@ spec:
{{- end }}
{{- end }}
{{- if .Values.linux.volumeMounts }}
{{- toYaml .Values.linux.volumeMounts | nindent 12}}
{{- toYaml .Values.linux.volumeMounts | nindent 12 }}
{{- end }}
{{- with .Values.linux.driver.resources }}
resources:
Expand Down Expand Up @@ -185,10 +185,10 @@ spec:
hostPath:
path: "{{ $path }}"
type: DirectoryOrCreate
{{- end}}
{{- end }}
{{- end }}
{{- if .Values.linux.volumes }}
{{- toYaml .Values.linux.volumes | nindent 8}}
{{- toYaml .Values.linux.volumes | nindent 8 }}
{{- end }}
nodeSelector:
kubernetes.io/os: linux
Expand Down
3 changes: 2 additions & 1 deletion manifest_staging/charts/secrets-store-csi-driver/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ linux:
tag: v1.1.2
pullPolicy: IfNotPresent
annotations: {}
podLabels: {}

## Prevent the CSI driver from being scheduled on virtual-kubelet nodes
affinity:
Expand Down Expand Up @@ -68,7 +69,7 @@ linux:

kubeletRootDir: /var/lib/kubelet
providersDir: /var/run/secrets-store-csi-providers
additionalProvidersDirs:
additionalProvidersDirs:
- /etc/kubernetes/secrets-store-csi-providers
nodeSelector: {}
tolerations: []
Expand Down

0 comments on commit 5ddc969

Please sign in to comment.