Skip to content
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

helm: Adds extraArgs and extraEnv to teleport-kube-agent #11155

Merged
merged 9 commits into from
Mar 17, 2022
48 changes: 48 additions & 0 deletions docs/pages/kubernetes-access/helm/reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2479,6 +2479,54 @@ will also be available to any `initContainers` configured by the chart.
</TabItem>
</Tabs>

## `extraArgs`

| Type | Default value |
| - | - |
| `list` | `[]` |

A list of extra arguments to pass to the `teleport start` command when running a Teleport Pod.

<Tabs>
<TabItem label="values.yaml">
```yaml
extraArgs:
- "--debug"
```
</TabItem>
<TabItem label="--set">
```code
$ --set "extraArgs={--debug}"
```
</TabItem>
</Tabs>

## `extraEnv`

| Type | Default value |
| - | - |
| `list` | `[]` |

[Kubernetes reference](https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/)

A list of extra environment variables to be set on the main Teleport container.

<Tabs>
<TabItem label="values.yaml">
```yaml
extraEnv:
- name: HTTPS_PROXY
value: "http://username:password@my.proxy.host:3128"
```
</TabItem>
<TabItem label="--set">
```code
$ --set "extraEnv[0].name=HTTPS_PROXY" \
--set "extraEnv[0].value=\"http://username:password@my.proxy.host:3128\""
```
</TabItem>
</Tabs>

## `extraVolumeMounts`

| Type | Default value | Can be used in `custom` mode? |
Expand Down
5 changes: 5 additions & 0 deletions examples/chart/teleport-kube-agent/.lint/extra-args.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
authToken: auth-token
proxyAddr: proxy.example.com:3080
roles: kube
kubeClusterName: test-kube-cluster
extraArgs: ['--debug']
7 changes: 7 additions & 0 deletions examples/chart/teleport-kube-agent/.lint/extra-env.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
authToken: auth-token
proxyAddr: proxy.example.com:3080
roles: kube
kubeClusterName: test-kube-cluster
extraEnv:
- name: HTTPS_PROXY
value: "http://username:password@my.proxy.host:3128"
7 changes: 7 additions & 0 deletions examples/chart/teleport-kube-agent/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,18 @@ spec:
containers:
- name: "teleport"
image: "{{ if .Values.enterprise }}{{ .Values.enterpriseImage }}{{ else }}{{ .Values.image }}{{ end }}:{{ .teleportVersion }}"
{{- if .Values.extraEnv }}
env:
{{- toYaml .Values.extraEnv | nindent 10 }}
{{- end }}
args:
- "--diag-addr=0.0.0.0:3000"
{{- if .Values.insecureSkipProxyTLSVerify }}
- "--insecure"
{{- end }}
{{- if .Values.extraArgs }}
{{- toYaml .Values.extraArgs | nindent 8 }}
{{- end }}
securityContext:
allowPrivilegeEscalation: false
capabilities:
Expand Down
7 changes: 7 additions & 0 deletions examples/chart/teleport-kube-agent/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,18 @@ spec:
containers:
- name: "teleport"
image: "{{ if .Values.enterprise }}{{ .Values.enterpriseImage }}{{ else }}{{ .Values.image }}{{ end }}:{{ .teleportVersion }}"
{{- if .Values.extraEnv }}
env:
{{- toYaml .Values.extraEnv | nindent 10 }}
{{- end }}
args:
- "--diag-addr=0.0.0.0:3000"
{{- if .Values.insecureSkipProxyTLSVerify }}
- "--insecure"
{{- end }}
{{- if .Values.extraArgs }}
{{- toYaml .Values.extraArgs | nindent 8 }}
{{- end }}
securityContext:
allowPrivilegeEscalation: false
capabilities:
Expand Down
10 changes: 10 additions & 0 deletions examples/chart/teleport-kube-agent/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,16 @@
}
}
},
"extraArgs": {
"$id": "#/properties/extraArgs",
"type": "array",
"default": []
},
"extraEnv": {
"$id": "#/properties/extraEnv",
"type": "array",
"default": []
},
"extraVolumes": {
"$id": "#/properties/extraVolumes",
"type": "array",
Expand Down
6 changes: 6 additions & 0 deletions examples/chart/teleport-kube-agent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,12 @@ annotations:
# Annotations for the ServiceAccount object
serviceAccount: {}

# Extra arguments to pass to 'teleport start' for the main Teleport pod
extraArgs: []

# Extra environment to be configured on the Teleport pod
extraEnv: []

# Extra volumes to mount into the Teleport pods
# https://kubernetes.io/docs/concepts/storage/volumes/
extraVolumes: []
Expand Down