Skip to content

Commit

Permalink
Add securityContext's to your manager’s Deployment
Browse files Browse the repository at this point in the history
This is related to upgrade operator-sdk to v1.6.0:

https://sdk.operatorframework.io/docs/upgrading-sdk-version/v1.6.0/

operator-framework/operator-sdk#4655

Signed-off-by: Wayne Sun <gsun@redhat.com>
  • Loading branch information
waynesun09 committed Apr 22, 2021
1 parent ce5c1d0 commit 185c455
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
16 changes: 16 additions & 0 deletions bundle/manifests/reportportal-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -575,8 +575,22 @@ spec:
- name: ANSIBLE_GATHERING
value: explicit
image: quay.io/waynesun09/rp5-operator:v0.0.7
livenessProbe:
httpGet:
path: /healthz
port: 6789
initialDelaySeconds: 15
periodSeconds: 20
name: manager
readinessProbe:
httpGet:
path: /readyz
port: 6789
initialDelaySeconds: 5
periodSeconds: 10
resources: {}
securityContext:
allowPrivilegeEscalation: false
- args:
- --secure-listen-address=0.0.0.0:8443
- --upstream=http://127.0.0.1:8080/
Expand All @@ -588,6 +602,8 @@ spec:
- containerPort: 8443
name: https
resources: {}
securityContext:
runAsNonRoot: true
terminationGracePeriodSeconds: 10
permissions:
- rules:
Expand Down
4 changes: 4 additions & 0 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ spec:
labels:
control-plane: controller-manager
spec:
securityContext:
runAsNonRoot: true
containers:
- name: manager
args:
Expand All @@ -30,6 +32,8 @@ spec:
env:
- name: ANSIBLE_GATHERING
value: explicit
securityContext:
allowPrivilegeEscalation: false
image: controller:latest
livenessProbe:
httpGet:
Expand Down

0 comments on commit 185c455

Please sign in to comment.