-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Proxy env variables for workspace containers in Openshift and Kub… #10387
Conversation
…ernetes infrastructires
…and Kubernetes infrastructires
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you use UPPER_CASE for proxy envs? HTTP_PROXY
, HTTPS_PROXY
, NO_PROXY
@Override | ||
public void provision(KubernetesEnvironment k8sEnv, RuntimeIdentity identity) | ||
throws InfrastructureException { | ||
for (Pod pod : k8sEnv.getPods().values()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It makes sense to check if proxyEnvVars
is not empty before foreaching all pods and containers
@@ -73,3 +73,6 @@ data: | |||
{{- end }} | |||
CHE_INFRA_KUBERNETES_SERVER__STRATEGY: {{ .Values.global.serverStrategy }} | |||
CHE_LOGS_APPENDERS_IMPL: "plaintext" | |||
CHE_WORKSPACE_HTTP__PROXY: "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there an separated issue to make it possible to configure these properties via helm chart parameters?
import org.eclipse.che.workspace.infrastructure.kubernetes.environment.KubernetesEnvironment; | ||
|
||
/** @author Mykhailo Kuznietsov */ | ||
public class ProxySettingsProvisioner implements ConfigurationProvisioner { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it make sense to use these properties on other infrastructures? Maybe it makes sense to move provisioning of these environment variables to Workspace API level.
private static final String HTTP_PROXY = "http_proxy"; | ||
private static final String NO_PROXY = "no_proxy"; | ||
|
||
// note that values are the same for now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you explain this comment? Why are they supposed to be the same since there are separated configuration properties?
import org.eclipse.che.workspace.infrastructure.kubernetes.environment.KubernetesEnvironment; | ||
|
||
/** @author Mykhailo Kuznietsov */ | ||
public class ProxySettingsProvisioner implements ConfigurationProvisioner { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding java doc and maybe unit tests.
…nshift and Kubernetes infrastructires
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
ci-test |
ci-test build report: |
…ernetes infrastructires
What does this PR do?
Add provisioning for http_proxy, https_proxy, no_proxy environment variables of workspace containers
in Kubernetes and Openshift deployment/template.
What issues does this PR fix or reference?
#10350
Release Notes
Docs PR