-
Bug
-
Resolution: Unresolved
-
Normal
-
None
-
4.16
-
Quality / Stability / Reliability
-
False
-
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
-
None
oc patch command behaves weirdly differently (using ArgoCD CR , but wondering if this applies to CRs such deployment/pods ...):
--add env entry if not entries are there (env: does not exist)
oc patch ArgoCD openshift-gitops -n openshift-gitops --type=json --patch '[{"op": "add", "path": "/spec/controller/env", "value": [
]}]' #this one works because each element has a space after it "value": ; "op": ; etc.
oc patch ArgoCD openshift-gitops -n openshift-gitops --type=json --patch '[{"op":"add","path":"/spec/controller/env","value":{"name":"ARGOCD_APPLICATION_CONTROLLER_PERSIST_RESOURCE_HEALTH","value":"false"}}]' # weirdly does not work because of there is no spaces there
—
add a second entry in env:
oc patch ArgoCD openshift-gitops -n openshift-gitops --type=json --patch '[{"op":"add","path":"/spec/controller/env/-","value":{"name":"ARGOCD_APPLICATION_CONTROLLER_REPO_SERVER_PLAINTEXT","value":"false"}}]'
---- to add : 1 did not work (because of the space after elements such "op": , 2 worked
oc patch ArgoCD openshift-gitops n openshift-gitops --type=json --patch '[{"op": "add", "path": "/spec/controller/env/", "value": [
]}]' : does not work
oc patch ArgoCD openshift-gitops -n openshift-gitops --type=json --patch '[{"op":"add","path":"/spec/controller/env/-","value":{"name":"ARGOCD_APPLICATION_CONTROLLER_PERSIST_RESOURCE_HEALTH","value":"false"}}]' : worked
Thank you