diff --git a/control-plane-operator/controllers/hostedcontrolplane/cvo/reconcile.go b/control-plane-operator/controllers/hostedcontrolplane/cvo/reconcile.go index cbb48e5778..481cb256b7 100644 --- a/control-plane-operator/controllers/hostedcontrolplane/cvo/reconcile.go +++ b/control-plane-operator/controllers/hostedcontrolplane/cvo/reconcile.go @@ -256,9 +256,10 @@ func preparePayloadScript(platformType hyperv1.PlatformType, oauthEnabled bool) var stmts []string stmts = append(stmts, + fmt.Sprintf("ls -la /manifests"), fmt.Sprintf("cp -R /manifests %s/", payloadDir), - fmt.Sprintf("rm %s/manifests/*_deployment.yaml", payloadDir), - fmt.Sprintf("rm %s/manifests/*_servicemonitor.yaml", payloadDir), + fmt.Sprintf("rm -f %s/manifests/*_deployment.yaml", payloadDir), + fmt.Sprintf("rm -f %s/manifests/*_servicemonitor.yaml", payloadDir), fmt.Sprintf("cp -R /release-manifests %s/", payloadDir), ) for _, manifest := range manifestsToOmit { @@ -267,10 +268,10 @@ func preparePayloadScript(platformType hyperv1.PlatformType, oauthEnabled bool) continue } } - stmts = append(stmts, fmt.Sprintf("rm %s", path.Join(payloadDir, "release-manifests", manifest))) + stmts = append(stmts, fmt.Sprintf("rm -f %s", path.Join(payloadDir, "release-manifests", manifest))) } if !oauthEnabled { - stmts = append(stmts, fmt.Sprintf("rm %s", path.Join(payloadDir, "release-manifests", "0000_50_console-operator_01-oauth.yaml"))) + stmts = append(stmts, fmt.Sprintf("rm -f %s", path.Join(payloadDir, "release-manifests", "0000_50_console-operator_01-oauth.yaml"))) } toRemove := ResourcesToRemove(platformType) if len(toRemove) > 0 { @@ -344,7 +345,7 @@ oc get ns openshift-config &> /dev/null || oc create ns openshift-config oc get ns openshift-config-managed &> /dev/null || oc create ns openshift-config-managed oc apply -f ${MANIFEST_DIR}/0000_00_cluster-version-operator_01_clusterversions-Default.crd.yaml -oc create -f /tmp/clusterversion.json +oc apply -f /tmp/clusterversion.json oc get config/version -oyaml while true; do