diff --git a/manifests/0000_50_olm_07-collect-profiles.cronjob.yaml b/manifests/0000_50_olm_07-collect-profiles.cronjob.yaml index eb878c4786..c6c2fae7eb 100644 --- a/manifests/0000_50_olm_07-collect-profiles.cronjob.yaml +++ b/manifests/0000_50_olm_07-collect-profiles.cronjob.yaml @@ -5,6 +5,7 @@ metadata: include.release.openshift.io/ibm-cloud-managed: "true" include.release.openshift.io/hypershift: "true" include.release.openshift.io/self-managed-high-availability: "true" + release.openshift.io/delete: "true" capability.openshift.io/name: "OperatorLifecycleManager" name: collect-profiles namespace: openshift-operator-lifecycle-manager diff --git a/microshift-manifests/0000_50_olm_07-collect-profiles.cronjob.yaml b/microshift-manifests/0000_50_olm_07-collect-profiles.cronjob.yaml deleted file mode 100644 index eb878c4786..0000000000 --- a/microshift-manifests/0000_50_olm_07-collect-profiles.cronjob.yaml +++ /dev/null @@ -1,64 +0,0 @@ -apiVersion: batch/v1 -kind: CronJob -metadata: - annotations: - include.release.openshift.io/ibm-cloud-managed: "true" - include.release.openshift.io/hypershift: "true" - include.release.openshift.io/self-managed-high-availability: "true" - capability.openshift.io/name: "OperatorLifecycleManager" - name: collect-profiles - namespace: openshift-operator-lifecycle-manager -spec: - schedule: "*/15 * * * *" - concurrencyPolicy: "Replace" - jobTemplate: - spec: - template: - metadata: - annotations: - target.workload.openshift.io/management: '{"effect": "PreferredDuringScheduling"}' - openshift.io/required-scc: restricted-v2 - 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: - - bin/collect-profiles - args: - - -n - - openshift-operator-lifecycle-manager - - --config-mount-path - - /etc/config - - --cert-mount-path - - /var/run/secrets/serving-cert - - olm-operator-heap-:https://olm-operator-metrics:8443/debug/pprof/heap - - catalog-operator-heap-:https://catalog-operator-metrics:8443/debug/pprof/heap - volumeMounts: - - mountPath: /etc/config - name: config-volume - - mountPath: /var/run/secrets/serving-cert - name: secret-volume - resources: - requests: - cpu: 10m - memory: 80Mi - terminationMessagePolicy: FallbackToLogsOnError - volumes: - - name: config-volume - configMap: - name: collect-profiles-config - - name: secret-volume - secret: - secretName: pprof-cert - restartPolicy: Never diff --git a/scripts/generate_crds_manifests.sh b/scripts/generate_crds_manifests.sh index 15f0b340d5..c2e31951bf 100755 --- a/scripts/generate_crds_manifests.sh +++ b/scripts/generate_crds_manifests.sh @@ -371,6 +371,7 @@ metadata: include.release.openshift.io/ibm-cloud-managed: "true" include.release.openshift.io/hypershift: "true" include.release.openshift.io/self-managed-high-availability: "true" + release.openshift.io/delete: "true" name: collect-profiles namespace: openshift-operator-lifecycle-manager spec: @@ -555,3 +556,8 @@ ${SED} -i '/- --writeStatusName/,+3d' ${ROOT_DIR}/microshift-manifests/0000_50_o # Replace the namespace openshift, as it doesn't exist on microshift, in the rbac file ${SED} -i 's/ namespace: openshift/ namespace: openshift-operator-lifecycle-manager/g' ${ROOT_DIR}/microshift-manifests/0000_50_olm_15-csv-viewer.rbac.yaml + +# Deleting manifests from CVO takes multiple releases. an annotation was added in 4.16 development to remove the collect-profiles job +# from the CVO payload. For microshift, since there is no CVO payload and no in process upgrade, let's delete this now. In 4.17 development, +# the CVO manifest should be deleted and this step should be removed. +rm "${ROOT_DIR}/microshift-manifests/0000_50_olm_07-collect-profiles.cronjob.yaml"