Bug 1804812

Summary: The default proxy of the pods cannot be overwritten by a specific empty value
Product: OpenShift Container Platform Reporter: Evan Cordell <ecordell>
Component: OLMAssignee: Evan Cordell <ecordell>
OLM sub component: OLM QA Contact: yhui
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: adellape, akashem, bandrade, chuo, dageoffr, ecordell, jfan, jiazha, nhale, scolange
Version: 4.4Keywords: Reopened
Target Milestone: ---   
Target Release: 4.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1751903 Environment:
Last Closed: 2020-07-13 17:16:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1751903    

Comment 5 yhui 2020-03-11 11:14:41 UTC
The bug is verified on this cluster.

Cluster version is 4.5.0-0.nightly-2020-03-10-234440.
[hui@localhost 1804812]$ oc exec catalog-operator-5868c7d9cd-c9p4z -n openshift-operator-lifecycle-manager -- olm --version
OLM version: 0.14.2
git commit: 8985872bfd5888c8d7d49e4dfc9be162a87691e7

Procedure to verify:
1. Create a namespace `test`
2. Create an OperatorGroup that targets `test` namespace.
3. Create a Subscription with no config.
4. Wait for the pod to be in running state, the globl proxy env vars are injected.
5. Update the Subscription with config.
6. Verify the new proxy config is injected.

YAML files:
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
  name: test
  namespace: test
spec:
  targetNamespaces:
  - test
---
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
  name: etcd-config-test
  namespace: test
spec:
  channel: singlenamespace-alpha
  installPlanApproval: Automatic
  name: etcd
  source: community-operators
  sourceNamespace: openshift-marketplace


Update the Subscription as follows:
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
  name: etcd-config-test
  namespace: test
spec:
  config:
    env:
    - name: HTTP_PROXY
  channel: singlenamespace-alpha
  installPlanApproval: Automatic
  name: etcd
  source: community-operators
  sourceNamespace: openshift-marketplace

Then verify the new pod proxy config.
[hui@localhost 1804812]$ oc get pod etcd-operator-864b756b9c-ttc9r -n test -o yaml|grep -i "proxy" -A 2
    - name: HTTP_PROXY
    image: quay.io/coreos/etcd-operator@sha256:66a37fd61a06a43969854ee6d3e21087a98b93838e284a6086b13917f96b0d9b
    imagePullPolicy: IfNotPresent
--
    - name: HTTP_PROXY
    image: quay.io/coreos/etcd-operator@sha256:66a37fd61a06a43969854ee6d3e21087a98b93838e284a6086b13917f96b0d9b
    imagePullPolicy: IfNotPresent
--
    - name: HTTP_PROXY
    image: quay.io/coreos/etcd-operator@sha256:66a37fd61a06a43969854ee6d3e21087a98b93838e284a6086b13917f96b0d9b
    imagePullPolicy: IfNotPresent


The result is what we expected.

Comment 7 errata-xmlrpc 2020-07-13 17:16:11 UTC
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-2020:2409