Skip to content

manifests/*: comply to restricted pod security level #299

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

Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,19 @@ spec:
labels:
app: package-server-manager
spec:
securityContext:
runAsNonRoot: true
runAsUser: 65534
seccompProfile:
type: RuntimeDefault
serviceAccountName: olm-operator-serviceaccount
priorityClassName: "system-cluster-critical"
containers:
- name: package-server-manager
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop: ["ALL"]
command:
- /bin/psm
- start
Expand Down
9 changes: 9 additions & 0 deletions manifests/0000_50_olm_06-psm-operator.deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,19 @@ spec:
labels:
app: package-server-manager
spec:
securityContext:
runAsNonRoot: true
runAsUser: 65534
seccompProfile:
type: RuntimeDefault
serviceAccountName: olm-operator-serviceaccount
priorityClassName: "system-cluster-critical"
containers:
- name: package-server-manager
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop: ["ALL"]
command:
- /bin/psm
- start
Expand Down
8 changes: 8 additions & 0 deletions manifests/0000_50_olm_07-collect-profiles.cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,18 @@ spec:
spec:
template:
spec:
securityContext:
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
serviceAccountName: collect-profiles
priorityClassName: openshift-user-critical
containers:
- name: collect-profiles
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop: ["ALL"]
image: quay.io/operator-framework/olm@sha256:de396b540b82219812061d0d753440d5655250c621c753ed1dc67d6154741607
imagePullPolicy: IfNotPresent
command:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ spec:
requests:
cpu: 10m
memory: 160Mi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop: ["ALL"]
nodeSelector:
kubernetes.io/os: linux
tolerations:
Expand All @@ -97,3 +101,8 @@ spec:
operator: Exists
tolerationSeconds: 120
priorityClassName: system-cluster-critical
securityContext:
runAsNonRoot: true
runAsUser: 65534
seccompProfile:
type: RuntimeDefault
9 changes: 9 additions & 0 deletions manifests/0000_50_olm_07-olm-operator.deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ spec:
requests:
cpu: 10m
memory: 160Mi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop: ["ALL"]
nodeSelector:
kubernetes.io/os: linux
node-role.kubernetes.io/master: ""
Expand All @@ -98,3 +102,8 @@ spec:
operator: Exists
tolerationSeconds: 120
priorityClassName: system-cluster-critical
securityContext:
runAsNonRoot: true
runAsUser: 65534
seccompProfile:
type: RuntimeDefault
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ spec:
env:
- name: RELEASE_VERSION
value: "0.0.1-snapshot"
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop: ["ALL"]
nodeSelector:
kubernetes.io/os: linux
tolerations:
Expand All @@ -93,3 +97,8 @@ spec:
operator: Exists
tolerationSeconds: 120
priorityClassName: system-cluster-critical
securityContext:
runAsNonRoot: true
runAsUser: 65534
seccompProfile:
type: RuntimeDefault
9 changes: 9 additions & 0 deletions manifests/0000_50_olm_08-catalog-operator.deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ spec:
env:
- name: RELEASE_VERSION
value: "0.0.1-snapshot"
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop: ["ALL"]
nodeSelector:
kubernetes.io/os: linux
node-role.kubernetes.io/master: ""
Expand All @@ -94,3 +98,8 @@ spec:
operator: Exists
tolerationSeconds: 120
priorityClassName: system-cluster-critical
securityContext:
runAsNonRoot: true
runAsUser: 65534
seccompProfile:
type: RuntimeDefault
9 changes: 9 additions & 0 deletions pkg/manifests/csv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ spec:
volumeMounts:
- name: tmpfs
mountPath: /tmp
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop: ["ALL"]
volumes:
- name: tmpfs
emptyDir: {}
Expand All @@ -150,6 +154,11 @@ spec:
values:
- packageserver
topologyKey: "kubernetes.io/hostname"
securityContext:
runAsNonRoot: true
runAsUser: 65534
seccompProfile:
type: RuntimeDefault
maturity: alpha
version: 0.19.0
apiservicedefinitions:
Expand Down
13 changes: 13 additions & 0 deletions scripts/catalog-deployment.patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,16 @@
value:
name: RELEASE_VERSION
value: "0.0.1-snapshot"
- command: update
path: spec.template.spec.containers[*].securityContext
value:
allowPrivilegeEscalation: false
capabilities:
drop: ["ALL"]
- command: update
path: spec.template.spec.securityContext
value:
runAsNonRoot: true
runAsUser: 65534
seccompProfile:
type: RuntimeDefault
17 changes: 17 additions & 0 deletions scripts/generate_crds_manifests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,19 @@ spec:
labels:
app: package-server-manager
spec:
securityContext:
runAsNonRoot: true
runAsUser: 65534
seccompProfile:
type: RuntimeDefault
serviceAccountName: olm-operator-serviceaccount
priorityClassName: "system-cluster-critical"
containers:
- name: package-server-manager
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop: ["ALL"]
command:
- /bin/psm
- start
Expand Down Expand Up @@ -262,10 +271,18 @@ spec:
spec:
template:
spec:
securityContext:
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
serviceAccountName: collect-profiles
priorityClassName: openshift-user-critical
containers:
- name: collect-profiles
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop: ["ALL"]
image: quay.io/operator-framework/olm@sha256:de396b540b82219812061d0d753440d5655250c621c753ed1dc67d6154741607
imagePullPolicy: IfNotPresent
command:
Expand Down
13 changes: 13 additions & 0 deletions scripts/olm-deployment.patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,16 @@
value:
name: RELEASE_VERSION
value: "0.0.1-snapshot"
- command: update
path: spec.template.spec.containers[*].securityContext
value:
allowPrivilegeEscalation: false
capabilities:
drop: ["ALL"]
- command: update
path: spec.template.spec.securityContext
value:
runAsNonRoot: true
runAsUser: 65534
seccompProfile:
type: RuntimeDefault
13 changes: 13 additions & 0 deletions scripts/packageserver-deployment.patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,16 @@
values:
- packageserver
topologyKey: "kubernetes.io/hostname"
- command: update
path: spec.install.spec.deployments[0].spec.template.spec.containers[*].securityContext
value:
allowPrivilegeEscalation: false
capabilities:
drop: ["ALL"]
- command: update
path: spec.install.spec.deployments[0].spec.template.spec.securityContext
value:
runAsNonRoot: true
runAsUser: 65534
seccompProfile:
type: RuntimeDefault