Skip to content

Commit

Permalink
Merge pull request #8 from thealtoclef/update-doris-operator-security…
Browse files Browse the repository at this point in the history
…-context

✨ chore: update doris-operator Helm chart configuration
  • Loading branch information
buu-nguyen authored Dec 16, 2024
2 parents f91a80f + 9f9d64a commit 90979d9
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 6 deletions.
2 changes: 1 addition & 1 deletion helm-charts/doris-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ maintainers:
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.6.1
version: 1.6.2-rc.1

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
11 changes: 6 additions & 5 deletions helm-charts/doris-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ spec:
# values:
# - linux
securityContext:
runAsNonRoot: true
{{- toYaml .Values.dorisOperator.podSecurityContext | nindent 8 }}
# TODO(user): For common cases that do not require escalating privileges
# it is recommended to ensure that all your Pods/Containers are restrictive.
# More info: https://kubernetes.io/docs/concepts/security/pod-security-standards/#restricted
Expand All @@ -87,10 +87,7 @@ spec:
{{- end }}
name: dorisoperator
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- "ALL"
{{- toYaml .Values.dorisOperator.securityContext | nindent 12 }}
env:
- name: ENABLE_WEBHOOK
value: "{{ template "webhook.enable" . }}"
Expand Down Expand Up @@ -119,7 +116,11 @@ spec:
# TODO(user): Configure the resources accordingly based on the project requirements.
# More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
resources:
{{- if .Values.dorisOperator.resources -}}
{{- toYaml .Values.dorisOperator.resources | nindent 12 }}
{{- else -}}
{{- include "operator.default.resource" . | indent 8 }}
{{- end -}}
volumeMounts:
- mountPath: /tmp/k8s-webhook-server/serving-certs
name: cert
Expand Down
14 changes: 14 additions & 0 deletions helm-charts/doris-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,17 @@ dorisOperator:
# values:
# - target-host-name
enableWebhook: false
podSecurityContext:
runAsNonRoot: true
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- "ALL"
resources: {}
# requests:
# cpu: 1
# memory: 2Gi
# limits:
# cpu: 2
# memory: 4Gi

0 comments on commit 90979d9

Please sign in to comment.