{"modulePath":"github.com/operator-framework/operator-lib","version":"v0.19.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package proxy\n\nPackage proxy implements helper functions to facilitate making operators proxy-aware.\n\nThis package assumes that proxy environment variables \\`HTTPS\\_PROXY\\`, \\`HTTP\\_PROXY\\`, and/or \\`NO\\_PROXY\\` are set in the Operator environment, typically via the Operator deployment.\n\nProxy-aware operators can use the ReadProxyVarsFromEnv to retrieve these values as a slice of corev1 EnvVars. Each of the proxy variables are duplicated in upper and lower case to support applications that use either. In their reconcile functions, Operator authors are then responsible for setting these variables in the Container Envs that must use the proxy, For example:\n\n\t// Pods with Kubernetes \u003c 1.22\n\tfor i, cSpec := range (myPod.Spec.Containers) {\n\t\tmyPod.Spec.Containers[i].Env = append(cSpec.Env, ReadProxyVarsFromEnv()...)\n\t}\n\n## Variables\n\n```go\nvar ProxyEnvNames = []string{\"HTTP_PROXY\", \"HTTPS_PROXY\", \"NO_PROXY\"}\n```\nProxyEnvNames are standard environment variables for proxies\n\n## Functions\n\n```go\nfunc ReadProxyVarsFromEnv() []corev1.EnvVar\n```\nReadProxyVarsFromEnv retrieves the standard proxy-related environment variables from the running environment and returns a slice of corev1 EnvVar containing upper and lower case versions of those variables.\n\n","path":"github.com/operator-framework/operator-lib/proxy","name":"proxy","synopsis":"Package proxy implements helper functions to facilitate making operators proxy-aware.","isRedistributable":true}
