Skip to content

Commit

Permalink
Merge pull request #1904 from bakito/extend-helm-chart
Browse files Browse the repository at this point in the history
feat(deploy) Allow setting additional values in operator chart
  • Loading branch information
rksharma95 authored Jan 3, 2025
2 parents 2023897 + 3110da7 commit f390269
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
5 changes: 5 additions & 0 deletions deployments/helm/KubeArmorOperator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ helm upgrade --install kubearmor-operator . -n kubearmor --create-namespace
| kubearmorOperator.image.repository | string | kubearmor/kubearmor-operator | image repository to pull KubeArmorOperator from |
| kubearmorOperator.image.tag | string | latest | KubeArmorOperator image tag |
| kubearmorOperator.imagePullPolicy | string | IfNotPresent | pull policy for operator image |
| kubearmorOperator.podLabels | object | {} | additional pod labels |
| kubearmorOperator.podAnnotations | object | {} | additional pod annotations |
| kubearmorOperator.resources | object | {} | operator container resources |
| kubearmorOperator.podSecurityContext | object | {} | pod security context |
| kubearmorOperator.securityContext | object | {} | operator container security context |
| kubearmorConfig | object | [values.yaml](values.yaml) | KubeArmor default configurations |
| autoDeploy | bool | false | Auto deploy KubeArmor with default configurations |

Expand Down
19 changes: 19 additions & 0 deletions deployments/helm/KubeArmorOperator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,18 @@ spec:
metadata:
labels:
kubearmor-app: {{ .Values.kubearmorOperator.name }}
{{- with .Values.kubearmorOperator.podLabels }}
{{- . | toYaml | nindent 8 }}
{{- end }}
{{- with .Values.kubearmorOperator.podAnnotations }}
annotations:
{{- . | toYaml | nindent 8 }}
{{- end }}
spec:
{{- with .Values.kubearmorOperator.podSecurityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: {{ .Values.kubearmorOperator.name }}
env:
Expand All @@ -35,6 +46,14 @@ spec:
{{- toYaml .Values.kubearmorOperator.args | trim | nindent 8 }}
{{- end }}
{{- end }}
{{- with .Values.kubearmorOperator.securityContext }}
securityContext:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with .Values.kubearmorOperator.resources }}
resources:
{{- toYaml . | nindent 10 }}
{{- end }}

serviceAccountName: {{ .Values.kubearmorOperator.name }}

6 changes: 6 additions & 0 deletions deployments/helm/KubeArmorOperator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ kubearmorOperator:
args:
- "--initDeploy=true"

resources: {}
podLabels: {}
podAnnotations: {}
podSecurityContext: {}
securityContext: {}

kubearmorConfig:
defaultCapabilitiesPosture: audit
defaultFilePosture: audit
Expand Down

0 comments on commit f390269

Please sign in to comment.