-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Description
Bug Report
What did you do?
- set
~/.kube/config
to a Rancher-managed cluster's API
(sth. likehttps://my-domain.tld/k8s/clusters/c-some-id
) kubectl apply […]
to deploy CRDoperator-sdk run
to run operator
What 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 apply
works as expectedoperator-sdk run
ignores the path component when setting up the proxy and useshttps://my-domain.tld
instead
In 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 version
operator-sdk version: "v1.7.1-19-g3ce1eeef", […], kubernetes version: "v1.19.4", […]
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"21", […]}
Server Version: version.Info{Major:"1", Minor:"20", […]}
Possible Solution
- To prevent people from shooting themselves in the foot I'd suggest that
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. - It would be nice if Operator SDK could be improved to work with clusters that have an API with a path component, such as the ones behind a Rancher instance or other proxies/multiplexers.
Additional context
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.