You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When HTTP_PROXY is set, the k8s_metadata_decorator attempts to connect to Kubernetes APIs using the proxy. This is by design: type rest.Config
...
// Proxy is the proxy func to be used for all requests made by this
// transport. If Proxy is nil, http.ProxyFromEnvironment is used. If Proxy
// returns a nil *URL, no proxy is used.
//
// socks5 proxying does not currently support spdy streaming endpoints.
Proxy func(*http.Request) (*url.URL, error)
To Reproduce
Steps to reproduce the behavior:
Deploy Stanza with HTTP_PROXY set and use the OpenShift plugin
Watch stanza logs for error:
{"level":"info","timestamp":"2020-12-31T17:26:23.902Z","message":"Starting stanza agent"}
{"level":"error","timestamp":"2020-12-31T17:26:34.421Z","message":"Failed to start stanza agent","error":{"description":"test connection list namespaces: Get \"https://172.30.0.1:443/api/v1/namespaces\": context deadline exceeded"}}
The agent fails to connect to the Kubernetes API because the Proxy (external to the cluster) cannot reach the kubernetes API (internal to Kubernetes.
Expected behavior
Kubernetes API interactions should be treated as "internal" traffic, and not pass through the proxy that Stanza is using for outgoing connections.
Proxy support for this operator should be an optional parameter, defaulting to false (no proxy).
Environment:
RHEL 7
OpenShift 3.11
Fresh build 92e9403
The text was updated successfully, but these errors were encountered:
* Added `allow_proxy` option (default: false) for enabling or
disabling the use of a proxy for this operator. Generally, you would
not want to use a proxy for connections to the Kubernetes API.
The Kubernetes client, by default, will use any proxy set at HTTP_PROXY or
HTTPS_PROXY unless the proxy function is set.
supporting docs:
- https://godoc.org/k8s.io/client-go/rest#Config
- https://golang.org/pkg/net/http/#ProxyFromEnvironmentresolves#238
* changelog: using a proxy causes internal API timeout
* Clarify that boolean is enabling / disabling proxy support when communicating with the k8s api
* Use mocked time function for tests
Co-authored-by: Dan Jaglowski <dan.jaglowski@bluemedora.com>
Describe the bug
When HTTP_PROXY is set, the
k8s_metadata_decorator
attempts to connect to Kubernetes APIs using the proxy. This is by design: type rest.ConfigTo Reproduce
Steps to reproduce the behavior:
The agent fails to connect to the Kubernetes API because the Proxy (external to the cluster) cannot reach the kubernetes API (internal to Kubernetes.
Expected behavior
Kubernetes API interactions should be treated as "internal" traffic, and not pass through the proxy that Stanza is using for outgoing connections.
Proxy support for this operator should be an optional parameter, defaulting to false (no proxy).
Environment:
92e9403
The text was updated successfully, but these errors were encountered: