Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🌱 update deployment securityContext #329

Merged
Show file tree
Hide file tree
Changes from all 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
7 changes: 7 additions & 0 deletions deploy/cluster-manager/config/operator/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ spec:
- ALL
privileged: false
runAsNonRoot: true
readOnlyRootFilesystem: true
livenessProbe:
httpGet:
path: /healthz
Expand All @@ -72,3 +73,9 @@ spec:
requests:
cpu: 2m
memory: 16Mi
volumeMounts:
- name: tmpdir
mountPath: /tmp
volumes:
- name: tmpdir
emptyDir: { }
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ metadata:
categories: Integration & Delivery,OpenShift Optional
certified: "false"
containerImage: quay.io/open-cluster-management/registration-operator:latest
createdAt: "2023-11-30T07:06:56Z"
createdAt: "2023-12-07T15:16:47Z"
description: Manages the installation and upgrade of the ClusterManager.
operators.operatorframework.io/builder: operator-sdk-v1.32.0
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
Expand Down Expand Up @@ -575,8 +575,15 @@ spec:
drop:
- ALL
privileged: false
readOnlyRootFilesystem: true
runAsNonRoot: true
volumeMounts:
- mountPath: /tmp
name: tmpdir
serviceAccountName: cluster-manager
volumes:
- emptyDir: {}
name: tmpdir
strategy: deployment
installModes:
- supported: true
Expand Down
9 changes: 9 additions & 0 deletions deploy/klusterlet/config/operator/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ spec:
drop:
- ALL
privileged: false
runAsNonRoot: true
readOnlyRootFilesystem: true
livenessProbe:
httpGet:
path: /healthz
Expand All @@ -75,6 +77,13 @@ spec:
requests:
cpu: 2m
memory: 16Mi
volumeMounts:
- name: tmpdir
mountPath: /tmp
volumes:
- name: tmpdir
emptyDir: { }

# Uncomment the following configuration lines to add hostAliases for hub api server,
# if the server field in your hub cluster kubeconfig is a domain name instead of an ipv4 address.
# For example, https://xxx.yyy.zzz.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ metadata:
categories: Integration & Delivery,OpenShift Optional
certified: "false"
containerImage: quay.io/open-cluster-management/registration-operator:latest
createdAt: "2023-11-30T08:06:17Z"
createdAt: "2023-12-07T15:16:47Z"
description: Manages the installation and upgrade of the Klusterlet.
operators.operatorframework.io/builder: operator-sdk-v1.32.0
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
Expand Down Expand Up @@ -336,9 +336,17 @@ spec:
drop:
- ALL
privileged: false
readOnlyRootFilesystem: true
runAsNonRoot: true
volumeMounts:
- mountPath: /tmp
name: tmpdir
securityContext:
runAsNonRoot: true
serviceAccountName: klusterlet
volumes:
- emptyDir: {}
name: tmpdir
strategy: deployment
installModes:
- supported: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ spec:
- ALL
privileged: false
runAsNonRoot: true
readOnlyRootFilesystem: true
livenessProbe:
httpGet:
path: /healthz
Expand All @@ -81,12 +82,18 @@ spec:
requests:
cpu: 2m
memory: 16Mi
{{ if .HostedMode }}
volumeMounts:
- name: tmpdir
mountPath: /tmp
{{ if .HostedMode }}
- mountPath: /var/run/secrets/hub
name: kubeconfig
readOnly: true
{{ end }}
volumes:
- name: tmpdir
emptyDir: { }
{{ if .HostedMode }}
- name: kubeconfig
secret:
secretName: addon-manager-controller-sa-kubeconfig
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ spec:
- ALL
privileged: false
runAsNonRoot: true
readOnlyRootFilesystem: true
livenessProbe:
httpGet:
path: /healthz
Expand All @@ -79,12 +80,16 @@ spec:
cpu: 2m
memory: 16Mi
volumeMounts:
- name: tmpdir
mountPath: /tmp
{{ if .HostedMode }}
- mountPath: /var/run/secrets/hub
name: kubeconfig
readOnly: true
{{ end }}
volumes:
- name: tmpdir
emptyDir: { }
{{ if .HostedMode }}
- name: kubeconfig
secret:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ spec:
- ALL
privileged: false
runAsNonRoot: true
readOnlyRootFilesystem: true
livenessProbe:
httpGet:
path: /healthz
Expand All @@ -77,12 +78,18 @@ spec:
requests:
cpu: 2m
memory: 16Mi
{{ if .HostedMode }}
volumeMounts:
- name: tmpdir
mountPath: /tmp
{{ if .HostedMode }}
- mountPath: /var/run/secrets/hub
name: kubeconfig
readOnly: true
{{ end }}
volumes:
- name: tmpdir
emptyDir: { }
{{ if .HostedMode }}
- name: kubeconfig
secret:
secretName: placement-controller-sa-kubeconfig
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ spec:
- ALL
privileged: false
runAsNonRoot: true
readOnlyRootFilesystem: true
livenessProbe:
httpGet:
path: /healthz
Expand All @@ -85,12 +86,18 @@ spec:
requests:
cpu: 2m
memory: 16Mi
{{ if .HostedMode }}
volumeMounts:
- name: tmpdir
mountPath: /tmp
{{ if .HostedMode }}
- mountPath: /var/run/secrets/hub
name: kubeconfig
readOnly: true
{{ end }}
volumes:
- name: tmpdir
emptyDir: { }
{{ if .HostedMode }}
- name: kubeconfig
secret:
secretName: registration-controller-sa-kubeconfig
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ spec:
- ALL
privileged: false
runAsNonRoot: true
readOnlyRootFilesystem: true
livenessProbe:
httpGet:
path: /healthz
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ spec:
- ALL
privileged: false
runAsNonRoot: true
readOnlyRootFilesystem: true
livenessProbe:
httpGet:
path: /healthz
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ spec:
- ALL
privileged: false
runAsNonRoot: true
readOnlyRootFilesystem: true
volumeMounts:
- name: bootstrap-secret
mountPath: "/spoke/bootstrap"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ spec:
- ALL
privileged: false
runAsNonRoot: true
readOnlyRootFilesystem: true
volumeMounts:
- name: bootstrap-secret
mountPath: "/spoke/bootstrap"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ spec:
- ALL
privileged: false
runAsNonRoot: true
readOnlyRootFilesystem: true
volumeMounts:
- name: hub-kubeconfig-secret
mountPath: "/spoke/hub-kubeconfig"
Expand Down
Loading