-
Notifications
You must be signed in to change notification settings - Fork 7
added global proxy variables #573
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
Conversation
91caa63
to
e05e778
Compare
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.
Pull Request Overview
This PR introduces global proxy settings (httpProxy, httpsProxy, noProxy) in the chart’s values and injects the corresponding HTTP_PROXY, HTTPS_PROXY, and NO_PROXY environment variables into all relevant components to support forward proxies in air‐gapped clusters.
- Adds new global proxy fields to
values.yaml
- Updates multiple component templates to set the proxy environment variables
- Leaves manual proxy configuration for the ArgoCD repo-server as noted
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
charts/gitops-runtime/values.yaml | Adds httpProxy , httpsProxy , and noProxy globals |
charts/gitops-runtime/templates/sources-server.yaml | Injects proxy env vars into sources-server container |
charts/gitops-runtime/templates/gitops-operator.yaml | Injects proxy env vars into gitops-operator container |
charts/gitops-runtime/templates/event-reporters/workflow-reporter/sensor.yaml | Injects proxy env vars into workflow sensor |
charts/gitops-runtime/templates/event-reporters/rollout-reporter/sensor.yaml | Injects proxy env vars into rollout sensor |
charts/gitops-runtime/templates/event-reporter.yaml | Injects proxy env vars into event-reporter container |
charts/gitops-runtime/templates/app-proxy/_app-proxy-env.yaml | Injects proxy env vars into app-proxy env template |
Comments suppressed due to low confidence (2)
charts/gitops-runtime/templates/app-proxy/_app-proxy-env.yaml:8
- The
HTTP_PROXY
,HTTPS_PROXY
, andNO_PROXY
lines need to be indented to match the surrounding YAML (e.g., two spaces) so the generated manifest remains valid.
HTTP_PROXY: {{ .Values.global.httpProxy | quote }}
charts/gitops-runtime/templates/sources-server.yaml:17
- [nitpick] This proxy injection pattern is repeated across multiple templates; consider extracting it into a shared helper (e.g., a partial template) to reduce duplication and simplify future updates.
{{/* Proxy environment variables */}}
/e2e |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Introduce a new helper function to set proxy environment variables for HTTP, HTTPS, and noProxy. Update various templates to utilize this function, ensuring consistent proxy configuration across components. This change enhances the flexibility of proxy settings in the GitOps runtime.
2d64f31
to
591fcf2
Compare
/e2e |
...itops-runtime/templates/_components/cap-app-proxy/environment-variables/_main-container.yaml
Outdated
Show resolved
Hide resolved
@@ -18,6 +18,10 @@ | |||
{{- $_ := set $cfArgoCdExtrasContext.Values.eventReporter.container.env "ARGOCD_SERVER_ROOTPATH" (index .Values "global" "external-argo-cd" "server" "rootpath") }} | |||
{{- end }} | |||
|
|||
{{- $globalProxyEnv := (include "codefresh-gitops-runtime.get-proxy-env-vars" . | fromYaml) }} |
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.
Not too thrilled about this env var manipulation. We should probably make this change in the event reporter chart to ingest the global value and set the environment variables
@@ -37,6 +37,10 @@ | |||
{{- $_ := set $gitopsOperatorContext.Values.global.codefresh.tls.caCerts.secretKeyRef "key" (.Values.global.codefresh.tls.caCerts.secret.create | ternary (default "ca-bundle.crt" .Values.global.codefresh.tls.caCerts.secret.key) .Values.global.codefresh.tls.caCerts.secretKeyRef.key) }} | |||
{{- end }} | |||
|
|||
{{- $globalProxyEnv := (include "codefresh-gitops-runtime.get-proxy-env-vars" . | fromYaml) }} |
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.
Same as event reporter. Would be much cleaner if it was handled in the operator chart.
@@ -14,6 +14,10 @@ | |||
{{- end }} | |||
{{- end }} | |||
|
|||
{{- $globalProxyEnv := (include "codefresh-gitops-runtime.get-proxy-env-vars" . | fromYaml) }} |
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.
Same for sources server.
/e2e |
What
JIRA confluence
added
values, which will end up as
HTTP_PROXY
,HTTPS_PROXY
andNO_PROXY
environment variables on needed Pods.Why
will allow to easily configure a forward-proxy, if the cluster is air-gapped, with the only access is through a specific server.
Notes
currently does not handle argocd-repo-server, which should be manually set using
also - services should communicate with each other using FQDN, and not just the service name, to easily define the NO_PROXY.