Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions helm-charts/secrets-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ type: application
# 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: v0.10.13
version: v0.10.14
# 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
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "v0.10.13"
appVersion: "v0.10.14"
4 changes: 2 additions & 2 deletions helm-charts/secrets-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ spec:
}}
securityContext: {{- toYaml .Values.controllerManager.manager.containerSecurityContext
| nindent 10 }}
securityContext:
runAsNonRoot: true
securityContext: {{- toYaml .Values.controllerManager.podSecurityContext | nindent
8 }}
serviceAccountName: {{ include "secrets-operator.serviceAccountName" . }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
Expand Down
4 changes: 3 additions & 1 deletion helm-charts/secrets-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,16 @@ controllerManager:
readOnlyRootFilesystem: true
image:
repository: infisical/kubernetes-operator
tag: v0.10.13
tag: v0.10.14
resources:
limits:
cpu: 500m
memory: 128Mi
requests:
cpu: 10m
memory: 64Mi
podSecurityContext:
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
replicas: 1
Expand Down
25 changes: 0 additions & 25 deletions scripts/generate-helm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -278,22 +278,6 @@ if [ -f "${HELM_DIR}/templates/deployment.yaml" ]; then
continue
fi

# check if this is the problematic pod securityContext line
if [[ "$line" =~ securityContext.*Values.controllerManager.podSecurityContext ]] && [ "$securityContext_replaced" -eq 0 ]; then
# Replace with our custom securityContext
echo " securityContext:" >> "${HELM_DIR}/templates/deployment.yaml.new"
echo " runAsNonRoot: true" >> "${HELM_DIR}/templates/deployment.yaml.new"
securityContext_replaced=1
continue
fi

# skip the line if it's just the trailing part of the replacement
if [[ "$securityContext_replaced" -eq 1 ]] && [[ "$line" =~ ^[[:space:]]*[0-9]+[[:space:]]*\}\} ]]; then
# this is the trailing part of the template expression, skip it
securityContext_replaced=0
continue
fi

# skip the simplified args line that replaced our custom one
if [[ "$line" =~ args:.*Values.controllerManager.manager.args ]]; then
continue
Expand Down Expand Up @@ -424,15 +408,6 @@ if [ -f "${HELM_DIR}/values.yaml" ]; then
in_resources_section=1
fi

if [[ "$line" =~ podSecurityContext: ]]; then
# skip this line and continue to the next line
continue
fi

if [[ "$line" =~ runAsNonRoot: ]] && [ "$in_resources_section" -eq 1 ]; then
# also skip this line and continue to the next line
continue
fi

if [[ "$line" =~ ^[[:space:]]*serviceAccount: ]]; then
# set the flag to 1 so we can continue to print the associated lines later
Expand Down
Loading