Skip to content

Commit

Permalink
Merge pull request #409 from maelvls/helm-http-proxy
Browse files Browse the repository at this point in the history
Helm: add http_proxy, https_proxy, and no_proxy
  • Loading branch information
jetstack-bot authored Mar 25, 2024
2 parents 43c1983 + 354b39e commit aeb5436
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 1 deletion.
12 changes: 12 additions & 0 deletions deploy/charts/approver-policy/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions deploy/charts/approver-policy/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,22 @@ spec:
capabilities: { drop: ["ALL"] }
readOnlyRootFilesystem: true

{{- if or .Values.http_proxy .Values.https_proxy .Values.no_proxy }}
env:
{{- with .Values.http_proxy }}
- name: HTTP_PROXY
value: {{ . }}
{{- end }}
{{- with .Values.https_proxy }}
- name: HTTPS_PROXY
value: {{ . }}
{{- end }}
{{- with .Values.no_proxy }}
- name: NO_PROXY
value: {{ . }}
{{- end }}
{{- end }}

{{- with .Values.volumes }}
volumes:
{{- toYaml . | nindent 6 }}
Expand Down
21 changes: 21 additions & 0 deletions deploy/charts/approver-policy/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@
"hostNetwork": {
"$ref": "#/$defs/helm-values.hostNetwork"
},
"http_proxy": {
"$ref": "#/$defs/helm-values.http_proxy"
},
"https_proxy": {
"$ref": "#/$defs/helm-values.https_proxy"
},
"image": {
"$ref": "#/$defs/helm-values.image"
},
Expand All @@ -33,6 +39,9 @@
"nameOverride": {
"$ref": "#/$defs/helm-values.nameOverride"
},
"no_proxy": {
"$ref": "#/$defs/helm-values.no_proxy"
},
"nodeSelector": {
"$ref": "#/$defs/helm-values.nodeSelector"
},
Expand Down Expand Up @@ -350,6 +359,14 @@
"description": "Boolean value, expose pod on hostNetwork.\nRequired when running a custom CNI in managed providers such as AWS EKS.\n\nFor more information, see [AWS EKS](https://cert-manager.io/docs/installation/compatibility/#aws-eks).",
"type": "boolean"
},
"helm-values.http_proxy": {
"description": "Configures the HTTP_PROXY environment variable where a HTTP proxy is required.",
"type": "string"
},
"helm-values.https_proxy": {
"description": "Configures the HTTPS_PROXY environment variable where a HTTP proxy is required.",
"type": "string"
},
"helm-values.image": {
"additionalProperties": false,
"properties": {
Expand Down Expand Up @@ -403,6 +420,10 @@
"description": "nameOverride replaces the name of the chart in the Chart.yaml file, when this is used to construct Kubernetes object names.",
"type": "string"
},
"helm-values.no_proxy": {
"description": "Configures the NO_PROXY environment variable where a HTTP proxy is required, but certain domains should be excluded.",
"type": "string"
},
"helm-values.nodeSelector": {
"default": {},
"description": "The nodeSelector on Pods tells Kubernetes to schedule Pods on the nodes with matching labels. For more information, see [Assigning Pods to Nodes](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/).",
Expand Down
16 changes: 15 additions & 1 deletion deploy/charts/approver-policy/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ app:
# +docs:property
# nodePort: 8080


# Deprecated. Use .hostNetwork instead.
# +docs:property
# hostNetwork: false
Expand Down Expand Up @@ -280,3 +279,18 @@ podAnnotations: {}
#
# For more information, see the [Kubernetes documentation](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy).
strategy: {}

# Use these variables to configure the HTTP_PROXY environment variables.

# Configures the HTTP_PROXY environment variable where a HTTP proxy is required.
# +docs:property
# http_proxy: "http://proxy:8080"

# Configures the HTTPS_PROXY environment variable where a HTTP proxy is required.
# +docs:property
# https_proxy: "https://proxy:8080"

# Configures the NO_PROXY environment variable where a HTTP proxy is required,
# but certain domains should be excluded.
# +docs:property
# no_proxy: "127.0.0.1,localhost"

0 comments on commit aeb5436

Please sign in to comment.