Skip to content

Commit

Permalink
Added the securityContext and resources into the operator deployment (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
houshengbo authored Oct 3, 2024
1 parent 63fc7e4 commit d8d2f37
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 14 additions & 0 deletions config/manager/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ spec:
containers:
- name: knative-operator
image: ko://knative.dev/operator/cmd/operator
resources:
requests:
cpu: 100m
memory: 100Mi
limits:
cpu: 1000m
memory: 1000Mi
imagePullPolicy: IfNotPresent
env:
- name: POD_NAME
Expand All @@ -55,6 +62,13 @@ spec:
value: config-observability
- name: KUBERNETES_MIN_VERSION
value: ""
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
runAsNonRoot: true
capabilities:
drop:
- ALL
ports:
- name: metrics
containerPort: 9090
2 changes: 1 addition & 1 deletion config/webhook/webhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ spec:
runAsNonRoot: true
capabilities:
drop:
- all
- ALL

ports:
- name: metrics
Expand Down

0 comments on commit d8d2f37

Please sign in to comment.