Skip to content

Commit

Permalink
fix(helm-chart): securityContext/resources configurable for kube-rbac…
Browse files Browse the repository at this point in the history
… proxy (#38)

* fix(helm-chart): securityContext/resources configurable for kube-rbac proxy

* refactor: remove trailing spaces
  • Loading branch information
raffis authored Jun 5, 2023
1 parent 69d51c0 commit a26ab0c
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 7 deletions.
2 changes: 1 addition & 1 deletion chart/k8sdb-controller/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ keywords:
name: k8sdb-controller
sources:
- https://github.com/DoodleScheduling/k8sdb-controller
version: 0.2.2
version: 0.2.3
11 changes: 5 additions & 6 deletions chart/k8sdb-controller/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,9 @@ spec:
name: https
protocol: TCP
resources:
limits:
cpu: 500m
memory: 128Mi
requests:
cpu: 5m
memory: 64Mi
{{- toYaml .Values.kubeRBACProxy.resources | nindent 10 }}
securityContext:
{{- toYaml .Values.kubeRBACProxy.securityContext | nindent 10 }}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
{{- end }}
Expand All @@ -114,6 +111,8 @@ spec:
secret:
secretName: {{ .secretName }}
{{- end }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
affinity:
{{- toYaml .Values.affinity | nindent 8 }}
imagePullSecrets:
Expand Down
16 changes: 16 additions & 0 deletions chart/k8sdb-controller/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ securityContext:
capabilities:
drop: ["all"]
readOnlyRootFilesystem: true

podSecurityContext:
runAsGroup: 10000
runAsNonRoot: true
runAsUser: 10000
Expand Down Expand Up @@ -121,4 +123,18 @@ prometheusRule:
kubeRBACProxy:
enabled: true

securityContext:
allowPrivilegeEscalation: false
capabilities:
drop: ["all"]
readOnlyRootFilesystem: true

resources: {}
# limits:
# cpu: 500m
# memory: 128Mi
# requests:
# cpu: 5m
# memory: 64Mi

tolerations: []

0 comments on commit a26ab0c

Please sign in to comment.