Skip to content

Commit 530880a

Browse files
tsawadadlactin
authored andcommitted
fix: tighten securityContext to comply with restricted PSS (argoproj-labs#600)
makes argocd-image-updater compatible with restricted Pod Security Standard Signed-off-by: Takeo Sawada <[email protected]>
1 parent 5e46c59 commit 530880a

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

manifests/base/deployment/argocd-image-updater-deployment.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,24 @@ spec:
110110
port: 8080
111111
initialDelaySeconds: 3
112112
periodSeconds: 30
113+
securityContext:
114+
allowPrivilegeEscalation: false
115+
capabilities:
116+
drop:
117+
- ALL
118+
readOnlyRootFilesystem: true
119+
runAsNonRoot: true
120+
seccompProfile:
121+
type: RuntimeDefault
113122
volumeMounts:
114123
- mountPath: /app/config
115124
name: image-updater-conf
116125
- mountPath: /app/config/ssh
117126
name: ssh-known-hosts
118127
- mountPath: /app/.ssh
119128
name: ssh-config
129+
- mountPath: /tmp
130+
name: tmp
120131
serviceAccountName: argocd-image-updater
121132
volumes:
122133
- configMap:
@@ -136,3 +147,5 @@ spec:
136147
name: argocd-image-updater-ssh-config
137148
optional: true
138149
name: ssh-config
150+
- emptyDir: {}
151+
name: tmp

manifests/install.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,13 +193,24 @@ spec:
193193
port: 8080
194194
initialDelaySeconds: 3
195195
periodSeconds: 30
196+
securityContext:
197+
allowPrivilegeEscalation: false
198+
capabilities:
199+
drop:
200+
- ALL
201+
readOnlyRootFilesystem: true
202+
runAsNonRoot: true
203+
seccompProfile:
204+
type: RuntimeDefault
196205
volumeMounts:
197206
- mountPath: /app/config
198207
name: image-updater-conf
199208
- mountPath: /app/config/ssh
200209
name: ssh-known-hosts
201210
- mountPath: /app/.ssh
202211
name: ssh-config
212+
- mountPath: /tmp
213+
name: tmp
203214
serviceAccountName: argocd-image-updater
204215
volumes:
205216
- configMap:
@@ -219,3 +230,5 @@ spec:
219230
name: argocd-image-updater-ssh-config
220231
optional: true
221232
name: ssh-config
233+
- emptyDir: {}
234+
name: tmp

0 commit comments

Comments
 (0)