gitops-operator
gitops-operator copied to clipboard
GitOps Operator 1.6 spams DISABLE_DEX deprecation events
Describe the bug OpenShift GitOps 1.6 includes deprecation of the environment variable DISABLE_DEX. The Operator now emits kubernetes events without having set the environment variable at any place:
$ oc get events -n argocd
LAST SEEN TYPE REASON OBJECT MESSAGE
<unknown> Warning DeprecationNotice /argocd `DISABLE_DEX` is deprecated, and support will be removed in Argo CD Operator v0.6.0/OpenShift GitOps v1.9.0. Dex can be enabled/disabled through `.spec.sso`
<unknown> Warning DeprecationNotice /argocd `DISABLE_DEX` is deprecated, and support will be removed in Argo CD Operator v0.6.0/OpenShift GitOps v1.9.0. Dex can be enabled/disabled through `.spec.sso`
These events do not include a timestamp and are hence shown at the very top in the OpenShift web console. This pollutes the UI.
Assumed root cause: When installing the operator using OLM, the environment DISABLE_DEX variable is currently set in the operator deployment by the CSV:
https://github.com/redhat-developer/gitops-operator/blob/7c0d2fdcd515f18ef8636549b20ef6fb51163bcf/bundle/manifests/gitops-operator.clusterserviceversion.yaml#L584-L585
To Reproduce Steps to reproduce the behavior:
- Install OpenShift GitOps 1.6 in OpenShift 4.10 using OLM
- Create an Argo CD Custom Resource that includs Dex
- During Reconcilation Loop, in the namespace of the Argo CD CR, the above shown events can be observed
Expected behavior
- OpenShift GitOps Operator CSV does not include the deprecated variable
- Emitted deprecation events include a timestamp
Additional context
$ oc get csv openshift-gitops-operator.v1.6.0 -n openshift-operators -o jsonpath='{.spec.install.spec.deployments[0].spec.template.spec.containers[0].env[?(@.name == "DISABLE_DEX")]}'
$ oc get deployment gitops-operator-controller-manager -n openshift-operators -o yaml | grep DISABLE_DEX -A 1
- name: DISABLE_DEX
value: "false"
hi @benruland thanks for creating the issue We are aware of this, and it is being tracked on our JIRA board as a workaround you can remove or unset the DISABLE_DEX env var from your subscription for now