Skip to content

Commit 232d05b

Browse files
authored
[MTSRE-1280] ADO comply with "restricted" PSA enforcement (#383)
* chore: [mtsre-1280] ADO comply with restricted PSA enforcement Signed-off-by: Ankit152 <akurmi@redhat.com> * chore: updated user to 1001 Signed-off-by: Ankit152 <akurmi@redhat.com> --------- Signed-off-by: Ankit152 <akurmi@redhat.com>
1 parent aa2ae1f commit 232d05b

6 files changed

Lines changed: 27 additions & 4 deletions

config/deploy/deployment.yaml.tpl

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ spec:
3838
name: trusted-ca-bundle
3939
optional: true
4040
name: trusted-ca-bundle
41+
securityContext:
42+
runAsNonRoot: true
43+
seccompProfile:
44+
type: RuntimeDefault
4145
containers:
4246
- name: metrics-relay-server
4347
image: quay.io/openshift/origin-kube-rbac-proxy:4.10.0
@@ -72,6 +76,11 @@ spec:
7276
requests:
7377
cpu: 100m
7478
memory: 30Mi
79+
securityContext:
80+
allowPrivilegeEscalation: false
81+
capabilities:
82+
drop:
83+
- ALL
7584
- name: manager
7685
image: quay.io/openshift/addon-operator:latest
7786
args:
@@ -99,3 +108,8 @@ spec:
99108
requests:
100109
cpu: 100m
101110
memory: 300Mi
111+
securityContext:
112+
allowPrivilegeEscalation: false
113+
capabilities:
114+
drop:
115+
- ALL

config/deploy/webhook/deployment.yaml.tpl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ spec:
4242
key: node-role.kubernetes.io/infra
4343
- effect: NoSchedule
4444
key: node-role.kubernetes.io/master
45+
securityContext:
46+
runAsNonRoot: true
47+
seccompProfile:
48+
type: RuntimeDefault
4549
containers:
4650
- name: webhook
4751
image: quay.io/openshift/addon-operator-webhook:latest
@@ -70,6 +74,11 @@ spec:
7074
requests:
7175
cpu: 100m
7276
memory: 30Mi
77+
securityContext:
78+
allowPrivilegeEscalation: false
79+
capabilities:
80+
drop:
81+
- ALL
7382
volumes:
7483
- name: tls
7584
secret:

config/docker/addon-operator-manager.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ WORKDIR /
1414

1515
COPY addon-operator-manager /usr/local/bin/
1616

17-
USER "noroot"
17+
USER 1001
1818

1919
ENTRYPOINT ["/usr/local/bin/addon-operator-manager"]

config/docker/addon-operator-webhook.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ WORKDIR /
1414

1515
COPY addon-operator-webhook /usr/local/bin/
1616

17-
USER "noroot"
17+
USER 1001
1818

1919
ENTRYPOINT ["/usr/local/bin/addon-operator-webhook"]

config/docker/api-mock.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ WORKDIR /
1414

1515
COPY api-mock /usr/local/bin/
1616

17-
USER "noroot"
17+
USER 1001
1818

1919
ENTRYPOINT ["/usr/local/bin/api-mock"]

config/docker/prometheus-remote-storage-mock.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ WORKDIR /
1414

1515
COPY prometheus-remote-storage-mock /usr/local/bin/
1616

17-
USER "noroot"
17+
USER 1001
1818

1919
ENTRYPOINT ["/usr/local/bin/prometheus-remote-storage-mock"]

0 commit comments

Comments
 (0)