diff --git a/CHANGELOG.md b/CHANGELOG.md index e223977..944a397 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/helm/teleport-kube-agent/templates/statefulset.yaml b/helm/teleport-kube-agent/templates/statefulset.yaml index 4f31010..fb7bf3a 100644 --- a/helm/teleport-kube-agent/templates/statefulset.yaml +++ b/helm/teleport-kube-agent/templates/statefulset.yaml @@ -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 diff --git a/helm/teleport-kube-agent/values.schema.json b/helm/teleport-kube-agent/values.schema.json index 81f2980..d956cf8 100644 --- a/helm/teleport-kube-agent/values.schema.json +++ b/helm/teleport-kube-agent/values.schema.json @@ -33,7 +33,9 @@ "initContainers", "resources", "tolerations", - "probeTimeoutSeconds" + "probeTimeoutSeconds", + "proxy", + "cluster" ], "properties": { "authToken": { @@ -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"] + } + } + } + } } } } diff --git a/helm/teleport-kube-agent/values.yaml b/helm/teleport-kube-agent/values.yaml index 6f336cb..52b1009 100644 --- a/helm/teleport-kube-agent/values.yaml +++ b/helm/teleport-kube-agent/values.yaml @@ -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: