-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Development proxy ignores path in K8s API URL #4925
Copy link
Copy link
Closed
Labels
language/ansibleIssue is related to an Ansible operator projectIssue is related to an Ansible operator projectpriority/important-longtermImportant over the long term, but may not be staffed and/or may need multiple releases to complete.Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Milestone
Metadata
Metadata
Assignees
Labels
language/ansibleIssue is related to an Ansible operator projectIssue is related to an Ansible operator projectpriority/important-longtermImportant over the long term, but may not be staffed and/or may need multiple releases to complete.Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Bug Report
What did you do?
~/.kube/configto a Rancher-managed cluster's API(sth. like
https://my-domain.tld/k8s/clusters/c-some-id)kubectl apply […]to deploy CRDoperator-sdk runto run operatorWhat did you expect to see?
I expected both steps 2 and 3 to target the cluster configured in step 1.
What did you see instead? Under which circumstances?
kubectl applyworks as expectedoperator-sdk runignores the path component when setting up the proxy and useshttps://my-domain.tldinsteadIn my particular case this didn't actually surface as an error. Instead the modified API endpoint without a path happened to target the management cluster of my Rancher deployment instead of a development cluster. So it actually ran the operator against a different cluster without any warning at all.
Environment
Operator type:
/language ansible
Kubernetes cluster type:
Rancher, RKE
$ operator-sdk versionoperator-sdk version: "v1.7.1-19-g3ce1eeef", […], kubernetes version: "v1.19.4", […]
$ kubectl versionClient Version: version.Info{Major:"1", Minor:"21", […]}
Server Version: version.Info{Major:"1", Minor:"20", […]}
Possible Solution
operator-sdk run(and any other commands that might behave similarly) fail with an error message if they encounter an API endpoint with a path component.Additional context