Skip to content

Downstream sync 08/09 #352

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

Closed
wants to merge 12 commits into from
Closed
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
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require (
github.com/mikefarah/yq/v3 v3.0.0-20201202084205-8846255d1c37
github.com/onsi/ginkgo/v2 v2.1.3
github.com/openshift/api v0.0.0-20200331152225-585af27e34fd
github.com/operator-framework/api v0.15.0
github.com/operator-framework/api v0.15.1-0.20220801135701-ae4da2a9ec6a
github.com/operator-framework/operator-lifecycle-manager v0.0.0-00010101000000-000000000000
github.com/operator-framework/operator-registry v1.17.5
github.com/sirupsen/logrus v1.8.1
Expand Down
12 changes: 7 additions & 5 deletions manifests/0000_50_olm_00-namespace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,25 @@ apiVersion: v1
kind: Namespace
metadata:
name: openshift-operator-lifecycle-manager
labels:
openshift.io/scc: "anyuid"
openshift.io/cluster-monitoring: "true"
annotations:
openshift.io/node-selector: ""
workload.openshift.io/allowed: "management"
include.release.openshift.io/ibm-cloud-managed: "true"
include.release.openshift.io/self-managed-high-availability: "true"
labels:
openshift.io/scc: "anyuid"
openshift.io/cluster-monitoring: "true"
---
apiVersion: v1
kind: Namespace
metadata:
name: openshift-operators
labels:
pod-security.kubernetes.io/enforce: baseline
pod-security.kubernetes.io/enforce-version: "v1.24"
openshift.io/scc: "anyuid"
annotations:
openshift.io/node-selector: ""
workload.openshift.io/allowed: "management"
include.release.openshift.io/ibm-cloud-managed: "true"
include.release.openshift.io/self-managed-high-availability: "true"
labels:
openshift.io/scc: "anyuid"
461 changes: 461 additions & 0 deletions manifests/0000_50_olm_00-subscriptions.crd.yaml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ spec:
spec:
securityContext:
runAsNonRoot: true
runAsUser: 65534
seccompProfile:
type: RuntimeDefault
serviceAccountName: olm-operator-serviceaccount
Expand Down
1 change: 0 additions & 1 deletion manifests/0000_50_olm_06-psm-operator.deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ spec:
spec:
securityContext:
runAsNonRoot: true
runAsUser: 65534
seccompProfile:
type: RuntimeDefault
serviceAccountName: olm-operator-serviceaccount
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ spec:
annotations:
target.workload.openshift.io/management: '{"effect": "PreferredDuringScheduling"}'
spec:
securityContext:
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
serviceAccountName: olm-operator-serviceaccount
volumes:
- name: srv-cert
Expand All @@ -31,6 +35,10 @@ spec:
secretName: pprof-cert
containers:
- name: olm-operator
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop: ["ALL"]
volumeMounts:
- name: srv-cert
mountPath: "/srv-cert"
Expand Down Expand Up @@ -82,10 +90,6 @@ spec:
requests:
cpu: 10m
memory: 160Mi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop: ["ALL"]
nodeSelector:
kubernetes.io/os: linux
tolerations:
Expand All @@ -101,8 +105,3 @@ spec:
operator: Exists
tolerationSeconds: 120
priorityClassName: system-cluster-critical
securityContext:
runAsNonRoot: true
runAsUser: 65534
seccompProfile:
type: RuntimeDefault
17 changes: 8 additions & 9 deletions manifests/0000_50_olm_07-olm-operator.deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ spec:
annotations:
target.workload.openshift.io/management: '{"effect": "PreferredDuringScheduling"}'
spec:
securityContext:
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
serviceAccountName: olm-operator-serviceaccount
volumes:
- name: srv-cert
Expand All @@ -31,6 +35,10 @@ spec:
secretName: pprof-cert
containers:
- name: olm-operator
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop: ["ALL"]
volumeMounts:
- name: srv-cert
mountPath: "/srv-cert"
Expand Down Expand Up @@ -82,10 +90,6 @@ spec:
requests:
cpu: 10m
memory: 160Mi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop: ["ALL"]
nodeSelector:
kubernetes.io/os: linux
node-role.kubernetes.io/master: ""
Expand All @@ -102,8 +106,3 @@ 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 @@ -21,6 +21,10 @@ spec:
annotations:
target.workload.openshift.io/management: '{"effect": "PreferredDuringScheduling"}'
spec:
securityContext:
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
serviceAccountName: olm-operator-serviceaccount
volumes:
- name: srv-cert
Expand All @@ -31,6 +35,10 @@ spec:
secretName: pprof-cert
containers:
- name: catalog-operator
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop: ["ALL"]
volumeMounts:
- name: srv-cert
mountPath: "/srv-cert"
Expand All @@ -55,6 +63,7 @@ spec:
- /srv-cert/tls.key
- --client-ca
- /profile-collector-cert/tls.crt
- --set-workload-user-id=false
image: quay.io/operator-framework/olm@sha256:de396b540b82219812061d0d753440d5655250c621c753ed1dc67d6154741607
imagePullPolicy: IfNotPresent
ports:
Expand All @@ -78,10 +87,6 @@ spec:
env:
- name: RELEASE_VERSION
value: "0.0.1-snapshot"
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop: ["ALL"]
nodeSelector:
kubernetes.io/os: linux
tolerations:
Expand All @@ -97,8 +102,3 @@ spec:
operator: Exists
tolerationSeconds: 120
priorityClassName: system-cluster-critical
securityContext:
runAsNonRoot: true
runAsUser: 65534
seccompProfile:
type: RuntimeDefault
18 changes: 9 additions & 9 deletions manifests/0000_50_olm_08-catalog-operator.deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ spec:
annotations:
target.workload.openshift.io/management: '{"effect": "PreferredDuringScheduling"}'
spec:
securityContext:
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
serviceAccountName: olm-operator-serviceaccount
volumes:
- name: srv-cert
Expand All @@ -31,6 +35,10 @@ spec:
secretName: pprof-cert
containers:
- name: catalog-operator
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop: ["ALL"]
volumeMounts:
- name: srv-cert
mountPath: "/srv-cert"
Expand All @@ -55,6 +63,7 @@ spec:
- /srv-cert/tls.key
- --client-ca
- /profile-collector-cert/tls.crt
- --set-workload-user-id=false
image: quay.io/operator-framework/olm@sha256:de396b540b82219812061d0d753440d5655250c621c753ed1dc67d6154741607
imagePullPolicy: IfNotPresent
ports:
Expand All @@ -78,10 +87,6 @@ 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 @@ -98,8 +103,3 @@ spec:
operator: Exists
tolerationSeconds: 120
priorityClassName: system-cluster-critical
securityContext:
runAsNonRoot: true
runAsUser: 65534
seccompProfile:
type: RuntimeDefault
17 changes: 8 additions & 9 deletions pkg/manifests/csv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ spec:
target.workload.openshift.io/management: '{"effect": "PreferredDuringScheduling"}'
creationTimestamp: null
spec:
securityContext:
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
serviceAccountName: olm-operator-serviceaccount
nodeSelector:
kubernetes.io/os: linux
Expand All @@ -106,6 +110,10 @@ spec:
tolerationSeconds: 120
containers:
- name: packageserver
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop: ["ALL"]
command:
- /bin/package-server
- -v=4
Expand Down Expand Up @@ -136,10 +144,6 @@ spec:
volumeMounts:
- name: tmpfs
mountPath: /tmp
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop: ["ALL"]
volumes:
- name: tmpfs
emptyDir: {}
Expand All @@ -154,11 +158,6 @@ spec:
values:
- packageserver
topologyKey: "kubernetes.io/hostname"
securityContext:
runAsNonRoot: true
runAsUser: 65534
seccompProfile:
type: RuntimeDefault
maturity: alpha
version: 0.19.0
apiservicedefinitions:
Expand Down
1 change: 0 additions & 1 deletion scripts/catalog-deployment.patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,5 @@
path: spec.template.spec.securityContext
value:
runAsNonRoot: true
runAsUser: 65534
seccompProfile:
type: RuntimeDefault
3 changes: 2 additions & 1 deletion scripts/generate_crds_manifests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ spec:
spec:
securityContext:
runAsNonRoot: true
runAsUser: 65534
seccompProfile:
type: RuntimeDefault
serviceAccountName: olm-operator-serviceaccount
Expand Down Expand Up @@ -367,3 +366,5 @@ add_ibm_managed_cloud_annotations "${ROOT_DIR}/manifests"

find "${ROOT_DIR}/manifests" -type f -exec $SED -i "/^#/d" {} \;
find "${ROOT_DIR}/manifests" -type f -exec $SED -i "1{/---/d}" {} \;

${YQ} delete --inplace -d'0' manifests/0000_50_olm_00-namespace.yaml 'metadata.labels."pod-security.kubernetes.io/enforce*"'
1 change: 0 additions & 1 deletion scripts/olm-deployment.patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,5 @@
path: spec.template.spec.securityContext
value:
runAsNonRoot: true
runAsUser: 65534
seccompProfile:
type: RuntimeDefault
1 change: 0 additions & 1 deletion scripts/packageserver-deployment.patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,5 @@
path: spec.install.spec.deployments[0].spec.template.spec.securityContext
value:
runAsNonRoot: true
runAsUser: 65534
seccompProfile:
type: RuntimeDefault
Loading