Description of problem: If a user manually edits a CSV deployment (for example, changing a cmd flag or an env var) and the CSV is updated from a subscription, the user's changes should not be persisted on the updated CSV. The subscription object should indicate a desire for updates to come from a particular source, and should be removed if this is not the desired behavior. How reproducible: Always Steps to Reproduce: 1. Create a Subscription, manual approval, older starting CSV (e.g. etcd operator v 0.9.2) 2. Modify the CSV to add an Env variable 3. Approve the installplan to update etcd-operator Actual results: The user-added Env var is persisted between updates Expected results: The deployment is re-set to the contents of the update, and the env var is not persisted.
LGTM, marking as VERIFIED Custom variable is not persisted to the new csv version as expected and the deployment is reseted. Cluster Version: 4.2.0-0.nightly-2019-09-12-114308 OLM version: 0.11.0 git commit: 201c8aa7ec382092eef251a0e8c812cc5f7d166a Steps used to reproduce: 1) Create a namespace: oc create ns test-operators 2) Create an OperatorGroup: oc create -f - <<EOF apiVersion: operators.coreos.com/v1 kind: OperatorGroup metadata: name: test-operators-og namespace: test-operators spec: targetNamespaces: - test-operators EOF 3) Create a subscription on v.0.9.2 version with manual approval oc create -f - <<EOF apiVersion: operators.coreos.com/v1alpha1 kind: Subscription metadata: name: etcd-etcdoperator.v0.9.2 namespace: test-operators spec: channel: singlenamespace-alpha installPlanApproval: Manual name: etcd source: community-operators sourceNamespace: openshift-marketplace startingCSV: etcdoperator.v0.9.2 EOF 4) Add a custom environment variable at CSV oc edit csv etcdoperator.v0.9.2 -n test-operators template: metadata: labels: name: etcd-operator-alm-owned name: etcd-operator-alm-owned spec: containers: - command: - etcd-operator - --create-crd=false env: - name: MY_POD_NAMESPACE valueFrom: fieldRef: fieldPath: metadata.namespace - name: MY_POD_NAME valueFrom: fieldRef: fieldPath: metadata.name - name: CUSTOM_VARIABLE value: CUSTOM_VALUE image: quay.io/coreos/etcd-operator@sha256:c0301e4686c3ed4206e370b42de5a3bd2229b9fb4906cf85f3f30650424abec2 name: etcd-operator - command: - etcd-backup-operator - --create-crd=false 5) Approve the InstallPlan to Upgrade to etcdoperator.v0.9.4 6) Check if the variable is persisted on the new version: oc get csv etcdoperator.v0.9.4 -o yaml -n test-operators template: metadata: labels: name: etcd-operator-alm-owned name: etcd-operator-alm-owned spec: containers: - command: - etcd-operator - --create-crd=false env: - name: MY_POD_NAMESPACE valueFrom: fieldRef: fieldPath: metadata.namespace - name: MY_POD_NAME valueFrom: fieldRef: fieldPath: metadata.name Custom variable is not added to the new csv version as expected.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2019:2922