Skip to content

Commit

Permalink
Support for running behind a proxy (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
tuladhar authored Sep 21, 2023
1 parent c690b9f commit 3759bdd
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added
- Support for running behind a proxy

## [0.4.1] - 2023-08-15

### Fixed
Expand Down
15 changes: 15 additions & 0 deletions helm/teleport-kube-agent/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,21 @@ spec:
imagePullPolicy: {{ toYaml .Values.imagePullPolicy }}
{{- end }}
env:
{{- $proxy := deepCopy .Values.cluster.proxy | mustMerge .Values.proxy }}
{{- if and $proxy.noProxy $proxy.http $proxy.https }}
- name: NO_PROXY
value: {{ $proxy.noProxy }}
- name: no_proxy
value: {{ $proxy.noProxy }}
- name: HTTP_PROXY
value: {{ $proxy.http }}
- name: http_proxy
value: {{ $proxy.http }}
- name: HTTPS_PROXY
value: {{ $proxy.https }}
- name: https_proxy
value: {{ $proxy.https }}
{{- end }}
# This variable is set for telemetry purposes.
# Telemetry is opt-in and controlled at the auth level.
- name: TELEPORT_INSTALL_METHOD_HELM_KUBE_AGENT
Expand Down
39 changes: 38 additions & 1 deletion helm/teleport-kube-agent/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@
"initContainers",
"resources",
"tolerations",
"probeTimeoutSeconds"
"probeTimeoutSeconds",
"proxy",
"cluster"
],
"properties": {
"authToken": {
Expand Down Expand Up @@ -617,6 +619,41 @@
"$id": "#/properties/probeTimeoutSeconds",
"type": "integer",
"default": 1
},
"proxy": {
"$id": "#/properties/proxy",
"type": "object",
"properties": {
"http": {
"type": ["null", "string"]
},
"https": {
"type": ["null", "string"]
},
"noProxy": {
"type": ["null", "string"]
}
}
},
"cluster": {
"$id": "#/properties/cluster",
"type": "object",
"properties": {
"proxy": {
"type": "object",
"properties": {
"http": {
"type": ["null", "string"]
},
"https": {
"type": ["null", "string"]
},
"noProxy": {
"type": ["null", "string"]
}
}
}
}
}
}
}
13 changes: 13 additions & 0 deletions helm/teleport-kube-agent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -426,3 +426,16 @@ tolerations: []
# Timeouts for the readiness and liveness probes
# https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
probeTimeoutSeconds: 1

# set the HTTP_PROXY, HTTPS_PROXY and NO_PROXY variable
proxy:
noProxy:
http:
https:
cluster:
# is getting overwritten by the top level proxy if set
# These values are generated via cluster-apps-operator
proxy:
noProxy:
http:
https:

0 comments on commit 3759bdd

Please sign in to comment.