Add teleport agent update

This commit is contained in:
Jonny Ervine
2024-08-15 22:45:43 +08:00
parent c0d65a0afb
commit b76e232ac2
143 changed files with 15355 additions and 676 deletions
+4 -1
View File
@@ -1,6 +1,6 @@
authToken: auth-token
proxyAddr: proxy.example.com:3080
roles: kube,app,db
roles: kube,app,db,jamf
kubeClusterName: test-kube-cluster-name
labels:
cluster: testing
@@ -15,6 +15,9 @@ databases:
protocol: "postgres"
labels:
database: staging
jamfApiEndpoint: "testjamf.jamfcloud.com/api"
jamfClientId: teleport-jamf-client-id
jamfClientSecret: secret-jamf-client-secret
annotations:
config:
kubernetes.io/config: "test-annotation"
@@ -0,0 +1,11 @@
roles: app,discovery
proxyAddr: teleport.example.com
kubeClusterName: example
apps:
- name: test
uri: https://console.aws.amazon.com/ec2/v2/home
labels:
env: test
appResources:
- labels:
"*": "*"
@@ -0,0 +1,4 @@
authToken: auth-token
proxyAddr: proxy.example.com:3080
roles: kube,app,discovery
kubeClusterName: test-kube-cluster
@@ -0,0 +1,15 @@
authToken: auth-token
proxyAddr: proxy.example.com:3080
roles: kube
kubeClusterName: test-kube-cluster
extraContainers:
- name: nscenter
command:
- /bin/bash
- -c
- sleep infinity & wait
image: praqma/network-multitool
imagePullPolicy: IfNotPresent
securityContext:
privileged: true
runAsNonRoot: false
@@ -20,6 +20,9 @@ extraLabels:
deployment:
app.kubernetes.io/name: "teleport-kube-agent"
resource: "deployment"
job:
app.kubernetes.io/name: "teleport-kube-agent"
resource: "job"
pod:
app.kubernetes.io/name: "teleport-kube-agent"
resource: "pod"
@@ -0,0 +1,8 @@
authToken: auth-token
proxyAddr: proxy.example.com:3080
roles: jamf
jamfApiEndpoint: "https://testjamf.jamfcloud.com/api"
jamfClientId: teleport-jamf-client-id
jamfCredentialsSecret:
create: false
name: existing-teleport-jamf-secret
@@ -0,0 +1,6 @@
authToken: auth-token
proxyAddr: proxy.example.com:3080
roles: jamf
jamfApiEndpoint: "https://testjamf.jamfcloud.com/api"
jamfClientId: teleport-jamf-client-id
jamfClientSecret: secret-jamf-client-secret
@@ -0,0 +1,23 @@
proxyAddr: proxy.example.com:3080
roles: "custom"
updater:
enabled: true
versionServer: https://my-custom-version-server/v1
releaseChannel: custom/preview
pullCredentials: docker
extraEnv:
- name: DOCKER_CONFIG
value: /mnt/docker/
extraVolumes:
- name: docker-config
projected:
sources:
- secret:
name: my-pull-secret
items:
- key: .dockerconfigjson
path: config.json
extraVolumeMounts:
- name: docker-config
mountPath: "/mnt/docker"
readOnly: true
+3 -3
View File
@@ -1,9 +1,9 @@
apiVersion: v2
appVersion: 13.3.8
appVersion: 16.1.7
description: Teleport provides a secure SSH, Kubernetes, database and application
remote access solution that doesn't get in the way.
icon: https://goteleport.com/images/logos/logo-teleport-square.svg
icon: https://goteleport.com/static/teleport-symbol-bimi.svg
keywords:
- Teleport
name: teleport-kube-agent
version: 13.3.8
version: 16.1.7
+97 -17
View File
@@ -5,6 +5,8 @@ with an existing Teleport cluster:
- Teleport Kubernetes access
- Teleport Application access
- Teleport Database access
- Teleport Kubernetes App Discovery
- Teleport Jamf service
To use it, you will need:
- an existing Teleport cluster (at least proxy and auth services)
@@ -22,7 +24,7 @@ To use it, you will need:
## Combining roles
You can combine multiple roles as a comma-separated list: `--set roles=kube\,db\,app`
You can combine multiple roles as a comma-separated list: `--set roles=kube\,db\,app\,discovery`
Note that commas must be escaped if the values are provided on the command line. This is due to the way that
Helm parses arguments.
@@ -132,14 +134,14 @@ Set the values in the above command as appropriate for your setup.
These are the supported values for the `apps` map:
| Key | Description | Example | Default | Required |
| --- | --- | --- | --- | --- |
| `name` | Name of the app to be accessed | `apps[0].name=grafana` | | Yes |
| `uri` | URI of the app to be accessed | `apps[0].uri=http://localhost:3000` | | Yes |
| `public_addr` | Public address used to access the app | `apps[0].public_addr=grafana.teleport.example.com` | | No |
| `labels.[name]` | Key-value pairs to set against the app for grouping/RBAC | `apps[0].labels.env=local,apps[0].labels.region=us-west-1` | | No |
| `insecure_skip_verify` | Whether to skip validation of TLS certificates presented by backend apps | `apps[0].insecure_skip_verify=true` | `false` | No |
| `rewrite.redirect` | A list of URLs to rewrite to the public address of the app service | `apps[0].rewrite.redirect[0]=https://192.168.1.1` | | No
| Key | Description | Example | Default | Required |
| ---------------------- | ------------------------------------------------------------------------ | ---------------------------------------------------------- | ------- | -------- |
| `name` | Name of the app to be accessed | `apps[0].name=grafana` | | Yes |
| `uri` | URI of the app to be accessed | `apps[0].uri=http://localhost:3000` | | Yes |
| `public_addr` | Public address used to access the app | `apps[0].public_addr=grafana.teleport.example.com` | | No |
| `labels.[name]` | Key-value pairs to set against the app for grouping/RBAC | `apps[0].labels.env=local,apps[0].labels.region=us-west-1` | | No |
| `insecure_skip_verify` | Whether to skip validation of TLS certificates presented by backend apps | `apps[0].insecure_skip_verify=true` | `false` | No |
| `rewrite.redirect` | A list of URLs to rewrite to the public address of the app service | `apps[0].rewrite.redirect[0]=https://192.168.1.1` | | No |
You can add multiple apps using `apps[1].name`, `apps[1].uri`, `apps[2].name`, `apps[2].uri` etc.
@@ -218,20 +220,98 @@ Set the values in the above command as appropriate for your setup.
These are the supported values for the `databases` map:
| Key | Description | Example | Default | Required |
| --- | --- | --- | --- | --- |
| `name` | Name of the database to be accessed | `databases[0].name=aurora` | | Yes |
| `uri` | URI of the database to be accessed | `databases[0].uri=postgres-aurora-instance-1.xxx.us-east-1.rds.amazonaws.com:5432` | | Yes |
| `protocol` | Database protocol | `databases[0].protocol=postgres` | | Yes |
| `description` | Free-form description of the database proxy instance | `databases[0].description='AWS Aurora instance of PostgreSQL 13.0'` | | No |
| `aws.region` | AWS-specific region configuration (only used for RDS/Aurora) | `databases[0].aws.region=us-east-1` | | No |
| `labels.[name]` | Key-value pairs to set against the database for grouping/RBAC | `databases[0].labels.db=postgres-dev,apps[0].labels.region=us-east-1` | | No |
| Key | Description | Example | Default | Required |
| --------------- | ------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ------- | -------- |
| `name` | Name of the database to be accessed | `databases[0].name=aurora` | | Yes |
| `uri` | URI of the database to be accessed | `databases[0].uri=postgres-aurora-instance-1.xxx.us-east-1.rds.amazonaws.com:5432` | | Yes |
| `protocol` | Database protocol | `databases[0].protocol=postgres` | | Yes |
| `description` | Free-form description of the database proxy instance | `databases[0].description='AWS Aurora instance of PostgreSQL 13.0'` | | No |
| `aws.region` | AWS-specific region configuration (only used for RDS/Aurora) | `databases[0].aws.region=us-east-1` | | No |
| `labels.[name]` | Key-value pairs to set against the database for grouping/RBAC | `databases[0].labels.db=postgres-dev,apps[0].labels.region=us-east-1` | | No |
You can add multiple databases using `databases[1].name`, `databases[1].uri`, `databases[1].protocol`,
`databases[2].name`, `databases[2].uri`, `databases[2].protocol` etc.
After installing, the new database should show up in `tsh db ls` after a few minutes.
## Kubernetes App Discovery
Teleport can be used to automatically discover apps based on services found in the Kubernetes cluster.
To run Teleport discovery you will need to enabled roles `discovery` and `app` and also provide token that allows access for these roles.
To install the agent, run:
```sh
$ helm install teleport-kube-agent . \
--create-namespace \
--namespace teleport \
--set roles=kube,app,discovery \
--set proxyAddr=${PROXY_ENDPOINT?} \
--set authToken=${JOIN_TOKEN?}
```
With default settings Teleport will try to discovery all apps available in the cluster. To control what namespaces and what service labels
to use for discovery you can use `kubernetesDiscovery` property of the chart.
When discovery is running, `kubeClusterName` should be set in values, since it is used as a name for discovery field and as a target label
for the app service, so it can expose discovered apps.
## Jamf service
To use [Teleport Jamf service](https://goteleport.com/docs/access-controls/device-trust/jamf-integration/),
you will also need:
- provide your Jamf Pro API endpoint
- provide your Jamf Pro API credentials
To install the agent with Jamf API credentials, run:
```sh
$ helm install teleport-kube-agent . \
--create-namespace \
--namespace teleport \
--set roles=jamf \
--set proxyAddr=${PROXY_ENDPOINT?} \
--set authToken=${JOIN_TOKEN?} \
--set jamfApiEndpoint=${JAMF_API_ENDPOINT?} \
--set jamfClientId=${JAMF_CLIENT_ID?} \
--set jamfClientSecret=${JAMF_CLIENT_SECRET?}
```
Set the values in the above command as appropriate for your setup.
The Helm chart will install Secrets by default. To avoid specifying the Jamf API credentials in plain text, it's possible to create a secret containing the password beforehand. To do so, run:
```sh
export JAMF_CLIENT_SECRET=`<jamf client secret> | base64 -w0`
export JAMF_SECRET_NAME=teleport-jamf-api-credentials
export TELEPORT_NAMESPACE=teleport
cat <<EOF > secrets.yaml
---
apiVersion: v1
kind: Secret
metadata:
name: ${JAMF_SECRET_NAME}
namespace: ${TELEPORT_NAMESPACE?}
type: Opaque
data:
jamfSecret: ${JAMF_CLIENT_SECRET?}
EOF
$ kubectl apply -f secret.yaml
$ helm install teleport-kube-agent . \
--create-namespace \
--namespace ${TELEPORT_NAMESPACE?} \
--set roles=jamf \
--set proxyAddr=${PROXY_ENDPOINT?} \
--set authToken=${JOIN_TOKEN?} \
--set jamfApiEndpoint=${JAMF_API_ENDPOINT?} \
--set jamfClientId=${JAMF_CLIENT_ID?} \
--set jamfCredentialsSecret.name=${JAMF_SECRET_NAME?} \
--set jamfCredentialsSecret.create=false
```
## Troubleshooting
If the service for a given role doesn't show up, look into the agent logs with:
+1 -1
View File
@@ -36,7 +36,7 @@ To do so, you can use the following Teleport Role resource:
kind: role
metadata:
name: gke-kube-access
version: v6
version: v7
spec:
allow:
kubernetes_labels:
+46 -15
View File
@@ -1,5 +1,8 @@
{{- define "teleport-kube-agent.config" -}}
{{- $logLevel := (coalesce .Values.logLevel .Values.log.level "INFO") -}}
{{- $appRolePresent := contains "app" (.Values.roles | toString) -}}
{{- $discoveryEnabled := contains "discovery" (.Values.roles | toString) -}}
{{- $appDiscoveryEnabled := and ($appRolePresent) ($discoveryEnabled) -}}
{{- if (ge (include "teleport-kube-agent.version" . | semver).Major 11) }}
version: v3
{{- end }}
@@ -13,7 +16,7 @@ teleport:
auth_servers: ["{{ required "proxyAddr is required in chart values" .Values.proxyAddr }}"]
{{- end }}
{{- if .Values.caPin }}
ca_pin: {{- toYaml .Values.caPin | nindent 8 }}
ca_pin: {{- toYaml .Values.caPin | nindent 4 }}
{{- end }}
log:
severity: {{ $logLevel }}
@@ -27,18 +30,22 @@ kubernetes_service:
enabled: true
kube_cluster_name: {{ required "kubeClusterName is required in chart values when kube role is enabled, see README" .Values.kubeClusterName }}
{{- if .Values.labels }}
labels: {{- toYaml .Values.labels | nindent 8 }}
labels: {{- toYaml .Values.labels | nindent 4 }}
{{- end }}
{{- else }}
enabled: false
{{- end }}
{{- if and (or (.Values.apps) (.Values.appResources)) (not ($appRolePresent)) }}
{{- fail "app role should be enabled if one of 'apps' or 'appResources' is set, see README" }}
{{- end }}
app_service:
{{- if contains "app" (.Values.roles | toString) }}
{{- if $appRolePresent }}
{{- if not (or (.Values.apps) (.Values.appResources) ($appDiscoveryEnabled)) }}
{{- fail "app service is enabled, but no application source is enabled. You must either statically define apps through `apps`, dynamically through `appResources`, or enable in-cluster discovery." }}
{{- end }}
enabled: true
{{- if not (or (.Values.apps) (.Values.appResources)) }}
{{- fail "at least one of 'apps' and 'appResources' is required in chart values when app role is enabled, see README" }}
{{- end }}
{{- if .Values.apps }}
{{- range $app := .Values.apps }}
{{- if not (hasKey $app "name") }}
@@ -49,12 +56,17 @@ app_service:
{{- end }}
{{- end }}
apps:
{{- toYaml .Values.apps | nindent 8 }}
{{- end }}
{{- if .Values.appResources }}
{{- toYaml .Values.apps | nindent 4 }}
{{- end }}
resources:
{{- toYaml .Values.appResources | nindent 8 }}
{{- end }}
{{- if .Values.appResources }}
{{- toYaml .Values.appResources | nindent 4 }}
{{- end }}
{{- if $appDiscoveryEnabled }}
- labels:
"teleport.dev/kubernetes-cluster": "{{ required "kubeClusterName is required in chart values when kube or discovery role is enabled, see README" .Values.kubeClusterName }}"
"teleport.dev/origin": "discovery-kubernetes"
{{- end }}
{{- else }}
enabled: false
{{- end }}
@@ -78,11 +90,11 @@ db_service:
{{- fail "'tags' is required for all 'awsDatabases' in chart values when key is set and db role is enabled, see README" }}
{{- end }}
{{- end }}
{{- toYaml .Values.awsDatabases | nindent 6 }}
{{- toYaml .Values.awsDatabases | nindent 4 }}
{{- end }}
{{- if .Values.azureDatabases }}
azure:
{{- toYaml .Values.azureDatabases | nindent 6 }}
{{- toYaml .Values.azureDatabases | nindent 4 }}
{{- end}}
{{- if .Values.databases }}
databases:
@@ -97,16 +109,35 @@ db_service:
{{- fail "'protocol' is required for all 'databases' in chart values when db role is enabled, see README" }}
{{- end }}
{{- end }}
{{- toYaml .Values.databases | nindent 6 }}
{{- toYaml .Values.databases | nindent 4 }}
{{- end }}
{{- if .Values.databaseResources }}
resources:
{{- toYaml .Values.databaseResources | nindent 6 }}
{{- toYaml .Values.databaseResources | nindent 4 }}
{{- end }}
{{- else }}
enabled: false
{{- end }}
discovery_service:
{{- if $discoveryEnabled }}
enabled: true
discovery_group: {{ required "kubeClusterName is required in chart values when kube or discovery role is enabled, see README" .Values.kubeClusterName }}
kubernetes: {{- toYaml .Values.kubernetesDiscovery | nindent 4 }}
{{- else }}
enabled: false
{{- end }}
jamf_service:
{{- if contains "jamf" (.Values.roles | toString) }}
enabled: true
api_endpoint: {{ required "jamfApiEndpoint is required in chart values when jamf role is enabled, see README" .Values.jamfApiEndpoint }}
client_id: {{ required "jamfClientId is required in chart values when jamf role is enabled, see README" .Values.jamfClientId }}
client_secret_file: "/etc/teleport-jamf-api-credentials/credential"
{{- else }}
enabled: false
{{- end }}
auth_service:
enabled: false
ssh_service:
+5 -1
View File
@@ -22,7 +22,11 @@ Create the name of the service account to use for the post-delete hook
if serviceAccount is not defined or serviceAccount.name is empty, use .Release.Name-delete-hook
*/}}
{{- define "teleport-kube-agent.deleteHookServiceAccountName" -}}
{{- coalesce .Values.serviceAccount.name .Values.serviceAccountName (printf "%s-delete-hook" .Release.Name) -}}
{{- if .Values.serviceAccount.create -}}
{{- printf "%s-delete-hook" (include "teleport-kube-agent.serviceAccountName" . ) -}}
{{- else -}}
{{- (include "teleport-kube-agent.serviceAccountName" . ) -}}
{{- end -}}
{{- end -}}
{{- define "teleport-kube-agent.version" -}}
@@ -16,6 +16,14 @@ rules:
- serviceaccounts
verbs:
- impersonate
{{- if contains "discovery" (.Values.roles | toString) }}
- apiGroups:
- ""
resources:
- services
verbs:
- list
{{- end}}
- apiGroups:
- ""
resources:
+17 -1
View File
@@ -8,6 +8,10 @@ metadata:
"helm.sh/hook": post-delete
"helm.sh/hook-weight": "-4"
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
{{- if .Values.extraLabels.serviceAccount }}
labels:
{{- toYaml .Values.extraLabels.serviceAccount | nindent 4 }}
{{- end }}
---
{{- end }}
{{- if .Values.rbac.create }}
@@ -20,6 +24,10 @@ metadata:
"helm.sh/hook": post-delete
"helm.sh/hook-weight": "-3"
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
{{- if .Values.extraLabels.role }}
labels:
{{- toYaml .Values.extraLabels.role | nindent 4 }}
{{- end }}
rules:
- apiGroups: [""]
resources: ["secrets",]
@@ -34,13 +42,17 @@ metadata:
"helm.sh/hook": post-delete
"helm.sh/hook-weight": "-2"
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
{{- if .Values.extraLabels.roleBinding }}
labels:
{{- toYaml .Values.extraLabels.roleBinding | nindent 4 }}
{{- end }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: {{ .Release.Name }}-delete-hook
subjects:
- kind: ServiceAccount
name: {{ .Release.Name }}-delete-hook
name: {{ template "teleport-kube-agent.deleteHookServiceAccountName" . }}
namespace: {{ .Release.Namespace }}
---
{{- end }}
@@ -53,6 +65,10 @@ metadata:
"helm.sh/hook": post-delete
"helm.sh/hook-weight": "-1"
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
{{- if .Values.extraLabels.job }}
labels:
{{- toYaml .Values.extraLabels.job | nindent 4 }}
{{- end }}
spec:
template:
metadata:
@@ -43,6 +43,9 @@ spec:
{{- if .Values.dnsPolicy }}
dnsPolicy: {{ .Values.dnsPolicy | quote }}
{{- end }}
{{- if .Values.podSecurityContext }}
securityContext: {{- toYaml .Values.podSecurityContext | nindent 8}}
{{- end }}
{{- if .Values.hostAliases }}
hostAliases: {{- toYaml .Values.hostAliases | nindent 8 }}
{{- end }}
@@ -108,6 +111,11 @@ spec:
name: "teleport-tls-ca"
readOnly: true
{{- end }}
{{- if contains "jamf" (.Values.roles | toString) }}
- mountPath: /etc/teleport-jamf-api-credentials
name: "jamf-api-credentials"
readOnly: true
{{- end }}
{{- if .Values.extraVolumeMounts }}
{{- toYaml .Values.extraVolumeMounts | nindent 8 }}
{{- end }}
@@ -130,6 +138,12 @@ spec:
{{- if .Values.updater.enabled }}
- name: TELEPORT_EXT_UPGRADER
value: kube
- name: TELEPORT_EXT_UPGRADER_VERSION
value: {{ include "teleport-kube-agent.version" . }}
{{- end }}
{{- if .Values.clusterDomain }}
- name: TELEPORT_KUBE_CLUSTER_DOMAIN
value: {{ .Values.clusterDomain | quote }}
{{- end }}
{{- if (gt (len .Values.extraEnv) 0) }}
{{- toYaml .Values.extraEnv | nindent 8 }}
@@ -187,8 +201,16 @@ spec:
name: "teleport-tls-ca"
readOnly: true
{{- end }}
{{- if contains "jamf" (.Values.roles | toString) }}
- mountPath: /etc/teleport-jamf-api-credentials
name: "jamf-api-credentials"
readOnly: true
{{- end }}
{{- if .Values.extraVolumeMounts }}
{{- toYaml .Values.extraVolumeMounts | nindent 8 }}
{{- end }}
{{- if .Values.extraContainers }}
{{- toYaml .Values.extraContainers | nindent 6 }}
{{- end }}
volumes:
- name: "config"
@@ -206,6 +228,11 @@ spec:
secret:
secretName: {{ .Values.tls.existingCASecretName }}
{{- end }}
{{- if contains "jamf" (.Values.roles | toString) }}
- name: "jamf-api-credentials"
secret:
secretName: {{ .Values.jamfCredentialsSecret.name }}
{{- end }}
{{- if .Values.extraVolumes }}
{{- toYaml .Values.extraVolumes | nindent 6 }}
{{- end }}
+1 -1
View File
@@ -11,4 +11,4 @@ rules:
- apiGroups: [""]
# objects is "secrets"
resources: ["secrets"]
verbs: ["create", "get", "update","patch"]
verbs: ["create", "get", "update", "patch"]
+20
View File
@@ -17,3 +17,23 @@ stringData:
auth-token: |
{{ coalesce .Values.joinParams.tokenName .Values.authToken }}
{{- end}}
{{- if and (contains "jamf" (.Values.roles | toString)) .Values.jamfCredentialsSecret.create }}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ .Values.jamfCredentialsSecret.name }}
namespace: {{ .Release.Namespace }}
{{- if .Values.extraLabels.secret }}
labels:
{{- toYaml .Values.extraLabels.secret | nindent 4 }}
{{- end }}
{{- if .Values.annotations.secret }}
annotations:
{{- toYaml .Values.annotations.secret | nindent 4 }}
{{- end }}
type: Opaque
stringData:
credential: {{ required "jamfClientSecret is required in chart values when jamf role is enabled, see README" .Values.jamfClientSecret }}
{{- end}}
+23 -2
View File
@@ -42,8 +42,9 @@ spec:
{{- if .Values.hostAliases }}
hostAliases: {{- toYaml .Values.hostAliases | nindent 8 }}
{{- end }}
securityContext:
fsGroup: 9807
{{- if .Values.podSecurityContext }}
securityContext: {{- toYaml .Values.podSecurityContext | nindent 8}}
{{- end }}
{{- if or .Values.affinity (gt (int $replicaCount) 1) }}
affinity:
{{- if .Values.affinity }}
@@ -106,6 +107,11 @@ spec:
name: "teleport-tls-ca"
readOnly: true
{{- end }}
{{- if contains "jamf" (.Values.roles | toString) }}
- mountPath: /etc/teleport-jamf-api-credentials
name: "jamf-api-credentials"
readOnly: true
{{- end }}
{{- if .Values.extraVolumeMounts }}
{{- toYaml .Values.extraVolumeMounts | nindent 8 }}
{{- end }}
@@ -142,6 +148,8 @@ spec:
{{- if .Values.updater.enabled }}
- name: TELEPORT_EXT_UPGRADER
value: kube
- name: TELEPORT_EXT_UPGRADER_VERSION
value: {{ include "teleport-kube-agent.version" . }}
{{- end }}
{{- if .Values.tls.existingCASecretName }}
- name: SSL_CERT_FILE
@@ -204,8 +212,16 @@ spec:
name: "teleport-tls-ca"
readOnly: true
{{- end }}
{{- if contains "jamf" (.Values.roles | toString) }}
- mountPath: /etc/teleport-jamf-api-credentials
name: "jamf-api-credentials"
readOnly: true
{{- end }}
{{- if .Values.extraVolumeMounts }}
{{- toYaml .Values.extraVolumeMounts | nindent 8 }}
{{- end }}
{{- if .Values.extraContainers }}
{{- toYaml .Values.extraContainers | nindent 6 }}
{{- end }}
volumes:
- name: "config"
@@ -223,6 +239,11 @@ spec:
secret:
secretName: {{ .Values.tls.existingCASecretName }}
{{- end }}
{{- if contains "jamf" (.Values.roles | toString) }}
- name: "jamf-api-credentials"
secret:
secretName: {{ .Values.jamfCredentialsSecret.name }}
{{- end }}
{{- if .Values.extraVolumes }}
{{- toYaml .Values.extraVolumes | nindent 6 }}
{{- end }}
@@ -56,17 +56,20 @@ spec:
{{- if $updater.tls.existingCASecretName }}
- name: SSL_CERT_FILE
value: /etc/teleport-tls-ca/ca.pem
# Used to track whether a Teleport agent was installed using this method.
- name: TELEPORT_INSTALL_METHOD_HELM_KUBE_AGENT
value: true
{{- end }}
{{- end }}
args:
- "--agent-name={{ .Release.Name }}"
- "--agent-namespace={{ .Release.Namespace }}"
- "--base-image={{ include "teleport-kube-agent.baseImage" . }}"
- "--version-server={{ $updater.versionServer }}"
- "--version-server={{ tpl $updater.versionServer . }}"
- "--version-channel={{ $updater.releaseChannel }}"
{{- if $updater.pullCredentials }}
- "--pull-credentials={{ $updater.pullCredentials }}"
{{- end }}
{{- if .Values.updater.extraArgs }}
{{- toYaml .Values.updater.extraArgs | nindent 10 }}
{{- end }}
{{- if $updater.securityContext }}
securityContext: {{- toYaml $updater.securityContext | nindent 10 }}
{{- end }}
@@ -96,15 +99,27 @@ spec:
{{- if $updater.resources }}
resources: {{- toYaml $updater.resources | nindent 10 }}
{{- end }}
{{- if $updater.tls.existingCASecretName }}
{{- if or $updater.tls.existingCASecretName .Values.updater.extraVolumeMounts }}
volumeMounts:
- mountPath: /etc/teleport-tls-ca
name: "teleport-tls-ca"
readOnly: true
{{- if $updater.tls.existingCASecretName }}
- mountPath: /etc/teleport-tls-ca
name: "teleport-tls-ca"
readOnly: true
{{- end }}
{{- if .Values.updater.extraVolumeMounts }}
{{- toYaml .Values.updater.extraVolumeMounts | nindent 10 }}
{{- end }}
{{- end }}
{{- if or $updater.tls.existingCASecretName .Values.updater.extraVolumes }}
volumes:
- name: "teleport-tls-ca"
secret:
secretName: {{ $updater.tls.existingCASecretName }}
{{- if .Values.updater.extraVolumes }}
{{- toYaml $updater.extraVolumes | nindent 8 }}
{{- end }}
{{- if $updater.tls.existingCASecretName }}
- name: "teleport-tls-ca"
secret:
secretName: {{ $updater.tls.existingCASecretName }}
{{- end }}
{{- end }}
{{- if $updater.priorityClassName }}
priorityClassName: {{ $updater.priorityClassName }}
@@ -1,3 +1,36 @@
adds services listing permission if discovery is enabled:
1: |
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: RELEASE-NAME
rules:
- apiGroups:
- ""
resources:
- users
- groups
- serviceaccounts
verbs:
- impersonate
- apiGroups:
- ""
resources:
- services
verbs:
- list
- apiGroups:
- ""
resources:
- pods
verbs:
- get
- apiGroups:
- authorization.k8s.io
resources:
- selfsubjectaccessreviews
verbs:
- create
creates a ClusterRole:
1: |
apiVersion: rbac.authorization.k8s.io/v1
@@ -25,6 +58,33 @@ creates a ClusterRole:
- selfsubjectaccessreviews
verbs:
- create
does not add services listing permission if discovery is disabled:
1: |
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: RELEASE-NAME
rules:
- apiGroups:
- ""
resources:
- users
- groups
- serviceaccounts
verbs:
- impersonate
- apiGroups:
- ""
resources:
- pods
verbs:
- get
- apiGroups:
- authorization.k8s.io
resources:
- selfsubjectaccessreviews
verbs:
- create
sets ClusterRole labels when specified:
1: |
apiVersion: rbac.authorization.k8s.io/v1
@@ -9,6 +9,10 @@ does not generate a config for clusterrole.yaml:
enabled: false
db_service:
enabled: false
discovery_service:
enabled: false
jamf_service:
enabled: false
kubernetes_service:
enabled: true
kube_cluster_name: test-kube-cluster
@@ -47,6 +51,10 @@ does not generate a config for pdb.yaml:
enabled: false
db_service:
enabled: false
discovery_service:
enabled: false
jamf_service:
enabled: false
kubernetes_service:
enabled: true
kube_cluster_name: test-kube-cluster-name
@@ -85,6 +93,10 @@ matches snapshot and tests for annotations.yaml:
enabled: false
db_service:
enabled: false
discovery_service:
enabled: false
jamf_service:
enabled: false
kubernetes_service:
enabled: true
kube_cluster_name: test-kube-cluster
@@ -126,6 +138,10 @@ matches snapshot and tests for extra-labels.yaml:
enabled: false
db_service:
enabled: false
discovery_service:
enabled: false
jamf_service:
enabled: false
kubernetes_service:
enabled: true
kube_cluster_name: test-kube-cluster
@@ -167,6 +183,10 @@ matches snapshot for affinity.yaml:
enabled: false
db_service:
enabled: false
discovery_service:
enabled: false
jamf_service:
enabled: false
kubernetes_service:
enabled: true
kube_cluster_name: test-kube-cluster
@@ -206,6 +226,7 @@ matches snapshot for all-v6.yaml:
name: grafana
uri: http://localhost:3000
enabled: true
resources: null
auth_service:
enabled: false
db_service:
@@ -216,6 +237,13 @@ matches snapshot for all-v6.yaml:
protocol: postgres
uri: postgres-aurora-instance-1.xxx.us-east-1.rds.amazonaws.com:5432
enabled: true
discovery_service:
enabled: false
jamf_service:
api_endpoint: testjamf.jamfcloud.com/api
client_id: teleport-jamf-client-id
client_secret_file: /etc/teleport-jamf-api-credentials/credential
enabled: true
kubernetes_service:
enabled: true
kube_cluster_name: test-kube-cluster-name
@@ -248,6 +276,120 @@ matches snapshot for all-v6.yaml:
kubernetes.io/config-different: 2
name: RELEASE-NAME
namespace: NAMESPACE
matches snapshot for app-discovery-full.yaml:
1: |
apiVersion: v1
data:
teleport.yaml: |-
app_service:
apps:
- labels:
env: test
name: test
uri: https://console.aws.amazon.com/ec2/v2/home
enabled: true
resources:
- labels:
'*': '*'
- labels:
teleport.dev/kubernetes-cluster: example
teleport.dev/origin: discovery-kubernetes
auth_service:
enabled: false
db_service:
enabled: false
discovery_service:
discovery_group: example
enabled: true
kubernetes:
- labels:
'*': '*'
namespaces:
- '*'
types:
- app
jamf_service:
enabled: false
kubernetes_service:
enabled: false
proxy_service:
enabled: false
ssh_service:
enabled: false
teleport:
join_params:
method: token
token_name: /etc/teleport-secrets/auth-token
log:
format:
extra_fields:
- timestamp
- level
- component
- caller
output: text
output: stderr
severity: INFO
proxy_server: teleport.example.com
version: v3
kind: ConfigMap
metadata:
name: RELEASE-NAME
namespace: NAMESPACE
matches snapshot for app-discovery-minimal.yaml:
1: |
apiVersion: v1
data:
teleport.yaml: |-
app_service:
enabled: true
resources:
- labels:
teleport.dev/kubernetes-cluster: test-kube-cluster
teleport.dev/origin: discovery-kubernetes
auth_service:
enabled: false
db_service:
enabled: false
discovery_service:
discovery_group: test-kube-cluster
enabled: true
kubernetes:
- labels:
'*': '*'
namespaces:
- '*'
types:
- app
jamf_service:
enabled: false
kubernetes_service:
enabled: true
kube_cluster_name: test-kube-cluster
proxy_service:
enabled: false
ssh_service:
enabled: false
teleport:
join_params:
method: token
token_name: /etc/teleport-secrets/auth-token
log:
format:
extra_fields:
- timestamp
- level
- component
- caller
output: text
output: stderr
severity: INFO
proxy_server: proxy.example.com:3080
version: v3
kind: ConfigMap
metadata:
name: RELEASE-NAME
namespace: NAMESPACE
matches snapshot for aws-databases.yaml:
1: |
apiVersion: v1
@@ -272,6 +414,10 @@ matches snapshot for aws-databases.yaml:
types:
- rds
enabled: true
discovery_service:
enabled: false
jamf_service:
enabled: false
kubernetes_service:
enabled: false
proxy_service:
@@ -331,6 +477,10 @@ matches snapshot for azure-databases.yaml:
types:
- mysql
enabled: true
discovery_service:
enabled: false
jamf_service:
enabled: false
kubernetes_service:
enabled: false
proxy_service:
@@ -368,6 +518,10 @@ matches snapshot for backwards-compatibility.yaml:
enabled: false
db_service:
enabled: false
discovery_service:
enabled: false
jamf_service:
enabled: false
kubernetes_service:
enabled: true
kube_cluster_name: test-kube-cluster-name
@@ -406,6 +560,10 @@ matches snapshot for ca-pin.yaml:
enabled: false
db_service:
enabled: false
discovery_service:
enabled: false
jamf_service:
enabled: false
kubernetes_service:
enabled: true
kube_cluster_name: test-kube-cluster
@@ -452,6 +610,10 @@ matches snapshot for db.yaml:
protocol: postgres
uri: postgres-aurora-instance-1.xxx.us-east-1.rds.amazonaws.com:5432
enabled: true
discovery_service:
enabled: false
jamf_service:
enabled: false
kubernetes_service:
enabled: false
proxy_service:
@@ -492,6 +654,10 @@ matches snapshot for dynamic-app.yaml:
enabled: false
db_service:
enabled: false
discovery_service:
enabled: false
jamf_service:
enabled: false
kubernetes_service:
enabled: false
proxy_service:
@@ -532,6 +698,10 @@ matches snapshot for dynamic-db.yaml:
resources:
- labels:
'*': '*'
discovery_service:
enabled: false
jamf_service:
enabled: false
kubernetes_service:
enabled: false
proxy_service:
@@ -569,6 +739,10 @@ matches snapshot for imagepullsecrets.yaml:
enabled: false
db_service:
enabled: false
discovery_service:
enabled: false
jamf_service:
enabled: false
kubernetes_service:
enabled: true
kube_cluster_name: test-kube-cluster
@@ -607,6 +781,10 @@ matches snapshot for initcontainers.yaml:
enabled: false
db_service:
enabled: false
discovery_service:
enabled: false
jamf_service:
enabled: false
kubernetes_service:
enabled: true
kube_cluster_name: test-kube-cluster
@@ -634,6 +812,94 @@ matches snapshot for initcontainers.yaml:
metadata:
name: RELEASE-NAME
namespace: NAMESPACE
matches snapshot for jamf-service-existing-secret.yaml:
1: |
apiVersion: v1
data:
teleport.yaml: |-
app_service:
enabled: false
auth_service:
enabled: false
db_service:
enabled: false
discovery_service:
enabled: false
jamf_service:
api_endpoint: https://testjamf.jamfcloud.com/api
client_id: teleport-jamf-client-id
client_secret_file: /etc/teleport-jamf-api-credentials/credential
enabled: true
kubernetes_service:
enabled: false
proxy_service:
enabled: false
ssh_service:
enabled: false
teleport:
join_params:
method: token
token_name: /etc/teleport-secrets/auth-token
log:
format:
extra_fields:
- timestamp
- level
- component
- caller
output: text
output: stderr
severity: INFO
proxy_server: proxy.example.com:3080
version: v3
kind: ConfigMap
metadata:
name: RELEASE-NAME
namespace: NAMESPACE
matches snapshot for jamf-service.yaml:
1: |
apiVersion: v1
data:
teleport.yaml: |-
app_service:
enabled: false
auth_service:
enabled: false
db_service:
enabled: false
discovery_service:
enabled: false
jamf_service:
api_endpoint: https://testjamf.jamfcloud.com/api
client_id: teleport-jamf-client-id
client_secret_file: /etc/teleport-jamf-api-credentials/credential
enabled: true
kubernetes_service:
enabled: false
proxy_service:
enabled: false
ssh_service:
enabled: false
teleport:
join_params:
method: token
token_name: /etc/teleport-secrets/auth-token
log:
format:
extra_fields:
- timestamp
- level
- component
- caller
output: text
output: stderr
severity: INFO
proxy_server: proxy.example.com:3080
version: v3
kind: ConfigMap
metadata:
name: RELEASE-NAME
namespace: NAMESPACE
matches snapshot for join-params-iam.yaml:
1: |
apiVersion: v1
@@ -645,6 +911,10 @@ matches snapshot for join-params-iam.yaml:
enabled: false
db_service:
enabled: false
discovery_service:
enabled: false
jamf_service:
enabled: false
kubernetes_service:
enabled: true
kube_cluster_name: test-kube-cluster-name
@@ -683,6 +953,10 @@ matches snapshot for join-params-token.yaml:
enabled: false
db_service:
enabled: false
discovery_service:
enabled: false
jamf_service:
enabled: false
kubernetes_service:
enabled: true
kube_cluster_name: test-kube-cluster-name
@@ -721,6 +995,10 @@ matches snapshot for log-basic.yaml:
enabled: false
db_service:
enabled: false
discovery_service:
enabled: false
jamf_service:
enabled: false
kubernetes_service:
enabled: true
kube_cluster_name: test-kube-cluster-name
@@ -759,6 +1037,10 @@ matches snapshot for log-extra.yaml:
enabled: false
db_service:
enabled: false
discovery_service:
enabled: false
jamf_service:
enabled: false
kubernetes_service:
enabled: true
kube_cluster_name: test-kube-cluster-name
@@ -797,6 +1079,10 @@ matches snapshot for log-legacy.yaml:
enabled: false
db_service:
enabled: false
discovery_service:
enabled: false
jamf_service:
enabled: false
kubernetes_service:
enabled: true
kube_cluster_name: test-kube-cluster-name
@@ -835,6 +1121,10 @@ matches snapshot for node-selector.yaml:
enabled: false
db_service:
enabled: false
discovery_service:
enabled: false
jamf_service:
enabled: false
kubernetes_service:
enabled: true
kube_cluster_name: test-kube-cluster-name
@@ -873,6 +1163,10 @@ matches snapshot for pdb.yaml:
enabled: false
db_service:
enabled: false
discovery_service:
enabled: false
jamf_service:
enabled: false
kubernetes_service:
enabled: true
kube_cluster_name: test-kube-cluster-name
@@ -911,6 +1205,10 @@ matches snapshot for resources.yaml:
enabled: false
db_service:
enabled: false
discovery_service:
enabled: false
jamf_service:
enabled: false
kubernetes_service:
enabled: true
kube_cluster_name: test-kube-cluster
@@ -949,6 +1247,10 @@ matches snapshot for stateful.yaml:
enabled: false
db_service:
enabled: false
discovery_service:
enabled: false
jamf_service:
enabled: false
kubernetes_service:
enabled: true
kube_cluster_name: test-kube-cluster-name
@@ -987,6 +1289,10 @@ matches snapshot for tolerations.yaml:
enabled: false
db_service:
enabled: false
discovery_service:
enabled: false
jamf_service:
enabled: false
kubernetes_service:
enabled: true
kube_cluster_name: test-kube-cluster
@@ -1025,6 +1331,10 @@ matches snapshot for v10.yaml:
enabled: false
db_service:
enabled: false
discovery_service:
enabled: false
jamf_service:
enabled: false
kubernetes_service:
enabled: true
kube_cluster_name: test-kube-cluster-name
@@ -1063,6 +1373,10 @@ matches snapshot for v11.yaml:
enabled: false
db_service:
enabled: false
discovery_service:
enabled: false
jamf_service:
enabled: false
kubernetes_service:
enabled: true
kube_cluster_name: test-kube-cluster-name
@@ -1101,6 +1415,10 @@ matches snapshot for volumes.yaml:
enabled: false
db_service:
enabled: false
discovery_service:
enabled: false
jamf_service:
enabled: false
kubernetes_service:
enabled: true
kube_cluster_name: test-kube-cluster
File diff suppressed because it is too large Load Diff
@@ -25,17 +25,19 @@ should create ServiceAccount for post-delete hook by default:
fieldPath: metadata.namespace
- name: RELEASE_NAME
value: RELEASE-NAME
image: public.ecr.aws/gravitational/teleport-distroless:13.3.8
image: public.ecr.aws/gravitational/teleport-distroless:16.1.7
imagePullPolicy: IfNotPresent
name: post-delete-job
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- all
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 9807
seccompProfile:
type: RuntimeDefault
restartPolicy: OnFailure
serviceAccountName: lint-serviceaccount
should not create ServiceAccount for post-delete hook if serviceAccount.create is false:
@@ -74,7 +76,7 @@ should not create ServiceAccount for post-delete hook if serviceAccount.create i
name: RELEASE-NAME-delete-hook
subjects:
- kind: ServiceAccount
name: RELEASE-NAME-delete-hook
name: lint-serviceaccount
namespace: NAMESPACE
3: |
apiVersion: batch/v1
@@ -104,17 +106,19 @@ should not create ServiceAccount for post-delete hook if serviceAccount.create i
fieldPath: metadata.namespace
- name: RELEASE_NAME
value: RELEASE-NAME
image: public.ecr.aws/gravitational/teleport-distroless:13.3.8
image: public.ecr.aws/gravitational/teleport-distroless:16.1.7
imagePullPolicy: IfNotPresent
name: post-delete-job
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- all
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 9807
seccompProfile:
type: RuntimeDefault
restartPolicy: OnFailure
serviceAccountName: lint-serviceaccount
should not create ServiceAccount, Role or RoleBinding for post-delete hook if serviceAccount.create and rbac.create are false:
@@ -132,17 +136,19 @@ should not create ServiceAccount, Role or RoleBinding for post-delete hook if se
fieldPath: metadata.namespace
- name: RELEASE_NAME
value: RELEASE-NAME
image: public.ecr.aws/gravitational/teleport-distroless:13.3.8
image: public.ecr.aws/gravitational/teleport-distroless:16.1.7
imagePullPolicy: IfNotPresent
name: post-delete-job
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- all
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 9807
seccompProfile:
type: RuntimeDefault
restartPolicy: OnFailure
serviceAccountName: lint-serviceaccount
should set nodeSelector in post-delete hook:
@@ -160,46 +166,20 @@ should set nodeSelector in post-delete hook:
fieldPath: metadata.namespace
- name: RELEASE_NAME
value: RELEASE-NAME
image: public.ecr.aws/gravitational/teleport-distroless:13.3.8
image: public.ecr.aws/gravitational/teleport-distroless:16.1.7
imagePullPolicy: IfNotPresent
name: post-delete-job
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- all
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 9807
seccompProfile:
type: RuntimeDefault
nodeSelector:
gravitational.io/k8s-role: node
restartPolicy: OnFailure
serviceAccountName: RELEASE-NAME-delete-hook
should set securityContext in post-delete hook:
1: |
containers:
- args:
- kube-state
- delete
command:
- teleport
env:
- name: KUBE_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: RELEASE_NAME
value: RELEASE-NAME
image: public.ecr.aws/gravitational/teleport-distroless:13.3.8
imagePullPolicy: IfNotPresent
name: post-delete-job
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- all
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 9807
restartPolicy: OnFailure
serviceAccountName: RELEASE-NAME-delete-hook
@@ -19,6 +19,16 @@ generates a secret when authToken is provided:
auth-token: |
sample-auth-token-dont-use-this
type: Opaque
generates a secret when jamfCredentialsSecret.create is true:
1: |
apiVersion: v1
kind: Secret
metadata:
name: teleport-jamf-api-credentials
namespace: NAMESPACE
stringData:
credential: secret-jamf-client-secret
type: Opaque
generates a secret when joinParams.tokenName is provided:
1: |
apiVersion: v1
@@ -16,7 +16,7 @@ sets Pod annotations when specified:
fieldPath: metadata.namespace
- name: RELEASE_NAME
value: RELEASE-NAME
image: public.ecr.aws/gravitational/teleport-distroless:13.3.8
image: public.ecr.aws/gravitational/teleport-distroless:16.1.7
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 6
@@ -43,10 +43,12 @@ sets Pod annotations when specified:
allowPrivilegeEscalation: false
capabilities:
drop:
- all
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 9807
seccompProfile:
type: RuntimeDefault
volumeMounts:
- mountPath: /etc/teleport
name: config
@@ -84,7 +86,7 @@ sets Pod labels when specified:
fieldPath: metadata.namespace
- name: RELEASE_NAME
value: RELEASE-NAME
image: public.ecr.aws/gravitational/teleport-distroless:13.3.8
image: public.ecr.aws/gravitational/teleport-distroless:16.1.7
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 6
@@ -111,10 +113,12 @@ sets Pod labels when specified:
allowPrivilegeEscalation: false
capabilities:
drop:
- all
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 9807
seccompProfile:
type: RuntimeDefault
volumeMounts:
- mountPath: /etc/teleport
name: config
@@ -154,7 +158,7 @@ sets StatefulSet labels when specified:
template:
metadata:
annotations:
checksum/config: db49feab9b174f73188febc30d2b01d27b16e5a76b586c6e87e6e62eb43620a2
checksum/config: 9e9cb2e4d76c492bccf0b1e2be4a5acffc8fe747484eb62e615c5ed8dc8c3fc6
labels:
app: RELEASE-NAME
app.kubernetes.io/name: teleport-kube-agent
@@ -176,7 +180,7 @@ sets StatefulSet labels when specified:
fieldPath: metadata.namespace
- name: RELEASE_NAME
value: RELEASE-NAME
image: public.ecr.aws/gravitational/teleport-distroless:13.3.8
image: public.ecr.aws/gravitational/teleport-distroless:16.1.7
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 6
@@ -203,10 +207,12 @@ sets StatefulSet labels when specified:
allowPrivilegeEscalation: false
capabilities:
drop:
- all
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 9807
seccompProfile:
type: RuntimeDefault
volumeMounts:
- mountPath: /etc/teleport
name: config
@@ -241,18 +247,22 @@ sets by default a container security context:
allowPrivilegeEscalation: false
capabilities:
drop:
- all
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 9807
seccompProfile:
type: RuntimeDefault
2: |
allowPrivilegeEscalation: false
capabilities:
drop:
- all
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 9807
seccompProfile:
type: RuntimeDefault
should add insecureSkipProxyTLSVerify to args when set in values:
1: |
containers:
@@ -272,7 +282,7 @@ should add insecureSkipProxyTLSVerify to args when set in values:
fieldPath: metadata.namespace
- name: RELEASE_NAME
value: RELEASE-NAME
image: public.ecr.aws/gravitational/teleport-distroless:13.3.8
image: public.ecr.aws/gravitational/teleport-distroless:16.1.7
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 6
@@ -299,10 +309,12 @@ should add insecureSkipProxyTLSVerify to args when set in values:
allowPrivilegeEscalation: false
capabilities:
drop:
- all
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 9807
seccompProfile:
type: RuntimeDefault
volumeMounts:
- mountPath: /etc/teleport
name: config
@@ -340,7 +352,7 @@ should add volumeClaimTemplate for data volume when using StatefulSet and action
fieldPath: metadata.namespace
- name: RELEASE_NAME
value: RELEASE-NAME
image: public.ecr.aws/gravitational/teleport-distroless:13.3.8
image: public.ecr.aws/gravitational/teleport-distroless:16.1.7
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 6
@@ -367,10 +379,12 @@ should add volumeClaimTemplate for data volume when using StatefulSet and action
allowPrivilegeEscalation: false
capabilities:
drop:
- all
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 9807
seccompProfile:
type: RuntimeDefault
volumeMounts:
- mountPath: /etc/teleport
name: config
@@ -408,7 +422,7 @@ should add volumeClaimTemplate for data volume when using StatefulSet and is Fre
template:
metadata:
annotations:
checksum/config: 6e010c147e8d81d244e7aafdcee7e652cdb4d5640fb7f14d0e1ebb7832f943a5
checksum/config: 5784fa709686cf9d0818ad218ab23bb886fa3877e4a84eb1bdeb25acbe8e6b3c
labels:
app: RELEASE-NAME
spec:
@@ -428,7 +442,7 @@ should add volumeClaimTemplate for data volume when using StatefulSet and is Fre
fieldPath: metadata.namespace
- name: RELEASE_NAME
value: RELEASE-NAME
image: public.ecr.aws/gravitational/teleport-distroless:13.3.8
image: public.ecr.aws/gravitational/teleport-distroless:16.1.7
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 6
@@ -455,10 +469,12 @@ should add volumeClaimTemplate for data volume when using StatefulSet and is Fre
allowPrivilegeEscalation: false
capabilities:
drop:
- all
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 9807
seccompProfile:
type: RuntimeDefault
volumeMounts:
- mountPath: /etc/teleport
name: config
@@ -506,7 +522,7 @@ should add volumeMount for data volume when using StatefulSet:
fieldPath: metadata.namespace
- name: RELEASE_NAME
value: RELEASE-NAME
image: public.ecr.aws/gravitational/teleport-distroless:13.3.8
image: public.ecr.aws/gravitational/teleport-distroless:16.1.7
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 6
@@ -533,10 +549,12 @@ should add volumeMount for data volume when using StatefulSet:
allowPrivilegeEscalation: false
capabilities:
drop:
- all
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 9807
seccompProfile:
type: RuntimeDefault
volumeMounts:
- mountPath: /etc/teleport
name: config
@@ -574,7 +592,7 @@ should expose diag port:
fieldPath: metadata.namespace
- name: RELEASE_NAME
value: RELEASE-NAME
image: public.ecr.aws/gravitational/teleport-distroless:13.3.8
image: public.ecr.aws/gravitational/teleport-distroless:16.1.7
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 6
@@ -601,10 +619,12 @@ should expose diag port:
allowPrivilegeEscalation: false
capabilities:
drop:
- all
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 9807
seccompProfile:
type: RuntimeDefault
volumeMounts:
- mountPath: /etc/teleport
name: config
@@ -642,7 +662,7 @@ should generate Statefulset when storage is disabled and mode is a Upgrade:
fieldPath: metadata.namespace
- name: RELEASE_NAME
value: RELEASE-NAME
image: public.ecr.aws/gravitational/teleport-distroless:13.3.8
image: public.ecr.aws/gravitational/teleport-distroless:16.1.7
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 6
@@ -669,10 +689,12 @@ should generate Statefulset when storage is disabled and mode is a Upgrade:
allowPrivilegeEscalation: false
capabilities:
drop:
- all
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 9807
seccompProfile:
type: RuntimeDefault
volumeMounts:
- mountPath: /etc/teleport
name: config
@@ -724,7 +746,7 @@ should have multiple replicas when replicaCount is set (using .replicaCount, dep
fieldPath: metadata.namespace
- name: RELEASE_NAME
value: RELEASE-NAME
image: public.ecr.aws/gravitational/teleport-distroless:13.3.8
image: public.ecr.aws/gravitational/teleport-distroless:16.1.7
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 6
@@ -751,10 +773,12 @@ should have multiple replicas when replicaCount is set (using .replicaCount, dep
allowPrivilegeEscalation: false
capabilities:
drop:
- all
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 9807
seccompProfile:
type: RuntimeDefault
volumeMounts:
- mountPath: /etc/teleport
name: config
@@ -804,7 +828,7 @@ should have multiple replicas when replicaCount is set (using highAvailability.r
fieldPath: metadata.namespace
- name: RELEASE_NAME
value: RELEASE-NAME
image: public.ecr.aws/gravitational/teleport-distroless:13.3.8
image: public.ecr.aws/gravitational/teleport-distroless:16.1.7
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 6
@@ -831,10 +855,12 @@ should have multiple replicas when replicaCount is set (using highAvailability.r
allowPrivilegeEscalation: false
capabilities:
drop:
- all
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 9807
seccompProfile:
type: RuntimeDefault
volumeMounts:
- mountPath: /etc/teleport
name: config
@@ -872,7 +898,7 @@ should have one replica when replicaCount is not set:
fieldPath: metadata.namespace
- name: RELEASE_NAME
value: RELEASE-NAME
image: public.ecr.aws/gravitational/teleport-distroless:13.3.8
image: public.ecr.aws/gravitational/teleport-distroless:16.1.7
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 6
@@ -899,10 +925,12 @@ should have one replica when replicaCount is not set:
allowPrivilegeEscalation: false
capabilities:
drop:
- all
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 9807
seccompProfile:
type: RuntimeDefault
volumeMounts:
- mountPath: /etc/teleport
name: config
@@ -940,7 +968,7 @@ should install Statefulset when storage is disabled and mode is a Fresh Install:
fieldPath: metadata.namespace
- name: RELEASE_NAME
value: RELEASE-NAME
image: public.ecr.aws/gravitational/teleport-distroless:13.3.8
image: public.ecr.aws/gravitational/teleport-distroless:16.1.7
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 6
@@ -967,10 +995,12 @@ should install Statefulset when storage is disabled and mode is a Fresh Install:
allowPrivilegeEscalation: false
capabilities:
drop:
- all
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 9807
seccompProfile:
type: RuntimeDefault
volumeMounts:
- mountPath: /etc/teleport
name: config
@@ -1010,7 +1040,7 @@ should mount extraVolumes and extraVolumeMounts:
fieldPath: metadata.namespace
- name: RELEASE_NAME
value: RELEASE-NAME
image: public.ecr.aws/gravitational/teleport-distroless:13.3.8
image: public.ecr.aws/gravitational/teleport-distroless:16.1.7
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 6
@@ -1037,10 +1067,12 @@ should mount extraVolumes and extraVolumeMounts:
allowPrivilegeEscalation: false
capabilities:
drop:
- all
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 9807
seccompProfile:
type: RuntimeDefault
volumeMounts:
- mountPath: /etc/teleport
name: config
@@ -1065,7 +1097,7 @@ should mount extraVolumes and extraVolumeMounts:
- name: my-mount
secret:
secretName: mySecret
should mount tls.existingCASecretName and set environment when set in values:
should mount jamfCredentialsSecret if it already exists and when role is jamf:
1: |
containers:
- args:
@@ -1083,9 +1115,7 @@ should mount tls.existingCASecretName and set environment when set in values:
fieldPath: metadata.namespace
- name: RELEASE_NAME
value: RELEASE-NAME
- name: SSL_CERT_FILE
value: /etc/teleport-tls-ca/ca.pem
image: public.ecr.aws/gravitational/teleport-distroless:13.3.8
image: public.ecr.aws/gravitational/teleport-distroless:16.1.7
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 6
@@ -1112,10 +1142,170 @@ should mount tls.existingCASecretName and set environment when set in values:
allowPrivilegeEscalation: false
capabilities:
drop:
- all
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 9807
seccompProfile:
type: RuntimeDefault
volumeMounts:
- mountPath: /etc/teleport
name: config
readOnly: true
- mountPath: /etc/teleport-secrets
name: auth-token
readOnly: true
- mountPath: /var/lib/teleport
name: data
- mountPath: /etc/teleport-jamf-api-credentials
name: jamf-api-credentials
readOnly: true
securityContext:
fsGroup: 9807
serviceAccountName: RELEASE-NAME
volumes:
- configMap:
name: RELEASE-NAME
name: config
- name: auth-token
secret:
secretName: teleport-kube-agent-join-token
- emptyDir: {}
name: data
- name: jamf-api-credentials
secret:
secretName: existing-teleport-jamf-secret
should mount jamfCredentialsSecret.name when role is jamf:
1: |
containers:
- args:
- --diag-addr=0.0.0.0:3000
env:
- name: TELEPORT_INSTALL_METHOD_HELM_KUBE_AGENT
value: "true"
- name: TELEPORT_REPLICA_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: KUBE_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: RELEASE_NAME
value: RELEASE-NAME
image: public.ecr.aws/gravitational/teleport-distroless:16.1.7
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 6
httpGet:
path: /healthz
port: diag
initialDelaySeconds: 5
periodSeconds: 5
timeoutSeconds: 1
name: teleport
ports:
- containerPort: 3000
name: diag
protocol: TCP
readinessProbe:
failureThreshold: 12
httpGet:
path: /readyz
port: diag
initialDelaySeconds: 5
periodSeconds: 5
timeoutSeconds: 1
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 9807
seccompProfile:
type: RuntimeDefault
volumeMounts:
- mountPath: /etc/teleport
name: config
readOnly: true
- mountPath: /etc/teleport-secrets
name: auth-token
readOnly: true
- mountPath: /var/lib/teleport
name: data
- mountPath: /etc/teleport-jamf-api-credentials
name: jamf-api-credentials
readOnly: true
securityContext:
fsGroup: 9807
serviceAccountName: RELEASE-NAME
volumes:
- configMap:
name: RELEASE-NAME
name: config
- name: auth-token
secret:
secretName: teleport-kube-agent-join-token
- emptyDir: {}
name: data
- name: jamf-api-credentials
secret:
secretName: teleport-jamf-api-credentials
should mount tls.existingCASecretName and set environment when set in values:
1: |
containers:
- args:
- --diag-addr=0.0.0.0:3000
env:
- name: TELEPORT_INSTALL_METHOD_HELM_KUBE_AGENT
value: "true"
- name: TELEPORT_REPLICA_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: KUBE_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: RELEASE_NAME
value: RELEASE-NAME
- name: SSL_CERT_FILE
value: /etc/teleport-tls-ca/ca.pem
image: public.ecr.aws/gravitational/teleport-distroless:16.1.7
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 6
httpGet:
path: /healthz
port: diag
initialDelaySeconds: 5
periodSeconds: 5
timeoutSeconds: 1
name: teleport
ports:
- containerPort: 3000
name: diag
protocol: TCP
readinessProbe:
failureThreshold: 12
httpGet:
path: /readyz
port: diag
initialDelaySeconds: 5
periodSeconds: 5
timeoutSeconds: 1
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 9807
seccompProfile:
type: RuntimeDefault
volumeMounts:
- mountPath: /etc/teleport
name: config
@@ -1165,7 +1355,7 @@ should mount tls.existingCASecretName and set extra environment when set in valu
value: /etc/teleport-tls-ca/ca.pem
- name: HTTPS_PROXY
value: http://username:password@my.proxy.host:3128
image: public.ecr.aws/gravitational/teleport-distroless:13.3.8
image: public.ecr.aws/gravitational/teleport-distroless:16.1.7
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 6
@@ -1192,10 +1382,12 @@ should mount tls.existingCASecretName and set extra environment when set in valu
allowPrivilegeEscalation: false
capabilities:
drop:
- all
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 9807
seccompProfile:
type: RuntimeDefault
volumeMounts:
- mountPath: /etc/teleport
name: config
@@ -1241,7 +1433,7 @@ should not add emptyDir for data when using StatefulSet:
fieldPath: metadata.namespace
- name: RELEASE_NAME
value: RELEASE-NAME
image: public.ecr.aws/gravitational/teleport-distroless:13.3.8
image: public.ecr.aws/gravitational/teleport-distroless:16.1.7
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 6
@@ -1268,10 +1460,12 @@ should not add emptyDir for data when using StatefulSet:
allowPrivilegeEscalation: false
capabilities:
drop:
- all
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 9807
seccompProfile:
type: RuntimeDefault
volumeMounts:
- mountPath: /etc/teleport
name: config
@@ -1309,7 +1503,7 @@ should provision initContainer correctly when set in values:
fieldPath: metadata.namespace
- name: RELEASE_NAME
value: RELEASE-NAME
image: public.ecr.aws/gravitational/teleport-distroless:13.3.8
image: public.ecr.aws/gravitational/teleport-distroless:16.1.7
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 6
@@ -1343,10 +1537,12 @@ should provision initContainer correctly when set in values:
allowPrivilegeEscalation: false
capabilities:
drop:
- all
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 9807
seccompProfile:
type: RuntimeDefault
volumeMounts:
- mountPath: /etc/teleport
name: config
@@ -1372,78 +1568,12 @@ should provision initContainer correctly when set in values:
allowPrivilegeEscalation: false
capabilities:
drop:
- all
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 9807
volumeMounts:
- mountPath: /etc/teleport
name: config
readOnly: true
- mountPath: /etc/teleport-secrets
name: auth-token
readOnly: true
- mountPath: /var/lib/teleport
name: RELEASE-NAME-teleport-data
securityContext:
fsGroup: 9807
serviceAccountName: RELEASE-NAME
volumes:
- configMap:
name: RELEASE-NAME
name: config
- name: auth-token
secret:
secretName: teleport-kube-agent-join-token
should set SecurityContext:
1: |
containers:
- args:
- --diag-addr=0.0.0.0:3000
env:
- name: TELEPORT_INSTALL_METHOD_HELM_KUBE_AGENT
value: "true"
- name: TELEPORT_REPLICA_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: KUBE_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: RELEASE_NAME
value: RELEASE-NAME
image: public.ecr.aws/gravitational/teleport-distroless:13.3.8
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 6
httpGet:
path: /healthz
port: diag
initialDelaySeconds: 5
periodSeconds: 5
timeoutSeconds: 1
name: teleport
ports:
- containerPort: 3000
name: diag
protocol: TCP
readinessProbe:
failureThreshold: 12
httpGet:
path: /readyz
port: diag
initialDelaySeconds: 5
periodSeconds: 5
timeoutSeconds: 1
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- all
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 9807
seccompProfile:
type: RuntimeDefault
volumeMounts:
- mountPath: /etc/teleport
name: config
@@ -1501,7 +1631,7 @@ should set affinity when set in values:
fieldPath: metadata.namespace
- name: RELEASE_NAME
value: RELEASE-NAME
image: public.ecr.aws/gravitational/teleport-distroless:13.3.8
image: public.ecr.aws/gravitational/teleport-distroless:16.1.7
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 6
@@ -1528,10 +1658,12 @@ should set affinity when set in values:
allowPrivilegeEscalation: false
capabilities:
drop:
- all
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 9807
seccompProfile:
type: RuntimeDefault
volumeMounts:
- mountPath: /etc/teleport
name: config
@@ -1569,7 +1701,7 @@ should set default serviceAccountName when not set in values:
fieldPath: metadata.namespace
- name: RELEASE_NAME
value: RELEASE-NAME
image: public.ecr.aws/gravitational/teleport-distroless:13.3.8
image: public.ecr.aws/gravitational/teleport-distroless:16.1.7
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 6
@@ -1596,10 +1728,12 @@ should set default serviceAccountName when not set in values:
allowPrivilegeEscalation: false
capabilities:
drop:
- all
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 9807
seccompProfile:
type: RuntimeDefault
volumeMounts:
- mountPath: /etc/teleport
name: config
@@ -1650,7 +1784,7 @@ should set environment when extraEnv set in values:
value: RELEASE-NAME
- name: HTTPS_PROXY
value: http://username:password@my.proxy.host:3128
image: public.ecr.aws/gravitational/teleport-distroless:13.3.8
image: public.ecr.aws/gravitational/teleport-distroless:16.1.7
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 6
@@ -1677,10 +1811,12 @@ should set environment when extraEnv set in values:
allowPrivilegeEscalation: false
capabilities:
drop:
- all
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 9807
seccompProfile:
type: RuntimeDefault
volumeMounts:
- mountPath: /etc/teleport
name: config
@@ -1745,10 +1881,12 @@ should set image and tag correctly:
allowPrivilegeEscalation: false
capabilities:
drop:
- all
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 9807
seccompProfile:
type: RuntimeDefault
volumeMounts:
- mountPath: /etc/teleport
name: config
@@ -1786,7 +1924,7 @@ should set imagePullPolicy when set in values:
fieldPath: metadata.namespace
- name: RELEASE_NAME
value: RELEASE-NAME
image: public.ecr.aws/gravitational/teleport-distroless:13.3.8
image: public.ecr.aws/gravitational/teleport-distroless:16.1.7
imagePullPolicy: Always
livenessProbe:
failureThreshold: 6
@@ -1813,10 +1951,12 @@ should set imagePullPolicy when set in values:
allowPrivilegeEscalation: false
capabilities:
drop:
- all
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 9807
seccompProfile:
type: RuntimeDefault
volumeMounts:
- mountPath: /etc/teleport
name: config
@@ -1854,7 +1994,7 @@ should set nodeSelector if set in values:
fieldPath: metadata.namespace
- name: RELEASE_NAME
value: RELEASE-NAME
image: public.ecr.aws/gravitational/teleport-distroless:13.3.8
image: public.ecr.aws/gravitational/teleport-distroless:16.1.7
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 6
@@ -1881,10 +2021,12 @@ should set nodeSelector if set in values:
allowPrivilegeEscalation: false
capabilities:
drop:
- all
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 9807
seccompProfile:
type: RuntimeDefault
volumeMounts:
- mountPath: /etc/teleport
name: config
@@ -1936,7 +2078,7 @@ should set preferred affinity when more than one replica is used:
fieldPath: metadata.namespace
- name: RELEASE_NAME
value: RELEASE-NAME
image: public.ecr.aws/gravitational/teleport-distroless:13.3.8
image: public.ecr.aws/gravitational/teleport-distroless:16.1.7
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 6
@@ -1963,10 +2105,12 @@ should set preferred affinity when more than one replica is used:
allowPrivilegeEscalation: false
capabilities:
drop:
- all
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 9807
seccompProfile:
type: RuntimeDefault
volumeMounts:
- mountPath: /etc/teleport
name: config
@@ -2004,7 +2148,7 @@ should set probeTimeoutSeconds when set in values:
fieldPath: metadata.namespace
- name: RELEASE_NAME
value: RELEASE-NAME
image: public.ecr.aws/gravitational/teleport-distroless:13.3.8
image: public.ecr.aws/gravitational/teleport-distroless:16.1.7
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 6
@@ -2031,10 +2175,12 @@ should set probeTimeoutSeconds when set in values:
allowPrivilegeEscalation: false
capabilities:
drop:
- all
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 9807
seccompProfile:
type: RuntimeDefault
volumeMounts:
- mountPath: /etc/teleport
name: config
@@ -2082,7 +2228,7 @@ should set required affinity when highAvailability.requireAntiAffinity is set:
fieldPath: metadata.namespace
- name: RELEASE_NAME
value: RELEASE-NAME
image: public.ecr.aws/gravitational/teleport-distroless:13.3.8
image: public.ecr.aws/gravitational/teleport-distroless:16.1.7
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 6
@@ -2109,10 +2255,12 @@ should set required affinity when highAvailability.requireAntiAffinity is set:
allowPrivilegeEscalation: false
capabilities:
drop:
- all
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 9807
seccompProfile:
type: RuntimeDefault
volumeMounts:
- mountPath: /etc/teleport
name: config
@@ -2150,7 +2298,7 @@ should set resources when set in values:
fieldPath: metadata.namespace
- name: RELEASE_NAME
value: RELEASE-NAME
image: public.ecr.aws/gravitational/teleport-distroless:13.3.8
image: public.ecr.aws/gravitational/teleport-distroless:16.1.7
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 6
@@ -2184,10 +2332,12 @@ should set resources when set in values:
allowPrivilegeEscalation: false
capabilities:
drop:
- all
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 9807
seccompProfile:
type: RuntimeDefault
volumeMounts:
- mountPath: /etc/teleport
name: config
@@ -2225,7 +2375,7 @@ should set serviceAccountName when set in values:
fieldPath: metadata.namespace
- name: RELEASE_NAME
value: RELEASE-NAME
image: public.ecr.aws/gravitational/teleport-distroless:13.3.8
image: public.ecr.aws/gravitational/teleport-distroless:16.1.7
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 6
@@ -2252,10 +2402,12 @@ should set serviceAccountName when set in values:
allowPrivilegeEscalation: false
capabilities:
drop:
- all
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 9807
seccompProfile:
type: RuntimeDefault
volumeMounts:
- mountPath: /etc/teleport
name: config
@@ -2293,7 +2445,7 @@ should set storage.requests when set in values and action is an Upgrade:
fieldPath: metadata.namespace
- name: RELEASE_NAME
value: RELEASE-NAME
image: public.ecr.aws/gravitational/teleport-distroless:13.3.8
image: public.ecr.aws/gravitational/teleport-distroless:16.1.7
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 6
@@ -2320,10 +2472,12 @@ should set storage.requests when set in values and action is an Upgrade:
allowPrivilegeEscalation: false
capabilities:
drop:
- all
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 9807
seccompProfile:
type: RuntimeDefault
volumeMounts:
- mountPath: /etc/teleport
name: config
@@ -2361,7 +2515,7 @@ should set storage.storageClassName when set in values and action is an Upgrade:
fieldPath: metadata.namespace
- name: RELEASE_NAME
value: RELEASE-NAME
image: public.ecr.aws/gravitational/teleport-distroless:13.3.8
image: public.ecr.aws/gravitational/teleport-distroless:16.1.7
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 6
@@ -2388,10 +2542,12 @@ should set storage.storageClassName when set in values and action is an Upgrade:
allowPrivilegeEscalation: false
capabilities:
drop:
- all
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 9807
seccompProfile:
type: RuntimeDefault
volumeMounts:
- mountPath: /etc/teleport
name: config
@@ -2429,7 +2585,7 @@ should set tolerations when set in values:
fieldPath: metadata.namespace
- name: RELEASE_NAME
value: RELEASE-NAME
image: public.ecr.aws/gravitational/teleport-distroless:13.3.8
image: public.ecr.aws/gravitational/teleport-distroless:16.1.7
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 6
@@ -2456,10 +2612,12 @@ should set tolerations when set in values:
allowPrivilegeEscalation: false
capabilities:
drop:
- all
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 9807
seccompProfile:
type: RuntimeDefault
volumeMounts:
- mountPath: /etc/teleport
name: config
@@ -27,7 +27,7 @@ sets the affinity:
- --base-image=public.ecr.aws/gravitational/teleport-distroless
- --version-server=https://my-custom-version-server/v1
- --version-channel=custom/preview
image: public.ecr.aws/gravitational/teleport-kube-agent-updater:13.3.8
image: public.ecr.aws/gravitational/teleport-kube-agent-updater:16.1.7
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 6
@@ -57,10 +57,12 @@ sets the affinity:
allowPrivilegeEscalation: false
capabilities:
drop:
- all
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 9807
seccompProfile:
type: RuntimeDefault
serviceAccountName: RELEASE-NAME-updater
sets the tolerations:
1: |
@@ -71,7 +73,7 @@ sets the tolerations:
- --base-image=public.ecr.aws/gravitational/teleport-distroless
- --version-server=https://my-custom-version-server/v1
- --version-channel=custom/preview
image: public.ecr.aws/gravitational/teleport-kube-agent-updater:13.3.8
image: public.ecr.aws/gravitational/teleport-kube-agent-updater:16.1.7
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 6
@@ -101,10 +103,12 @@ sets the tolerations:
allowPrivilegeEscalation: false
capabilities:
drop:
- all
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 9807
seccompProfile:
type: RuntimeDefault
serviceAccountName: RELEASE-NAME-updater
tolerations:
- effect: NoExecute
@@ -21,3 +21,23 @@ tests:
path: metadata.labels.resource
value: clusterrole
- matchSnapshot: {}
- it: adds services listing permission if discovery is enabled
set:
roles: kube,discovery
asserts:
- hasDocuments:
count: 1
- isKind:
of: ClusterRole
- matchSnapshot: {}
- it: does not add services listing permission if discovery is disabled
set:
roles: kube
asserts:
- hasDocuments:
count: 1
- isKind:
of: ClusterRole
- matchSnapshot: {}
@@ -150,6 +150,26 @@ tests:
of: ConfigMap
- matchSnapshot: {}
- it: matches snapshot for jamf-service.yaml
values:
- ../.lint/jamf-service.yaml
asserts:
- hasDocuments:
count: 1
- isKind:
of: ConfigMap
- matchSnapshot: {}
- it: matches snapshot for jamf-service-existing-secret.yaml
values:
- ../.lint/jamf-service-existing-secret.yaml
asserts:
- hasDocuments:
count: 1
- isKind:
of: ConfigMap
- matchSnapshot: {}
- it: matches snapshot for join-params-iam.yaml
values:
- ../.lint/join-params-iam.yaml
@@ -289,3 +309,23 @@ tests:
- isKind:
of: ConfigMap
- matchSnapshot: {}
- it: matches snapshot for app-discovery-minimal.yaml
values:
- ../.lint/app-discovery-minimal.yaml
asserts:
- hasDocuments:
count: 1
- isKind:
of: ConfigMap
- matchSnapshot: {}
- it: matches snapshot for app-discovery-full.yaml
values:
- ../.lint/app-discovery-full.yaml
asserts:
- hasDocuments:
count: 1
- isKind:
of: ConfigMap
- matchSnapshot: {}
+142 -46
View File
@@ -8,7 +8,7 @@ tests:
- it: creates a Deployment if action is Upgrade
template: deployment.yaml
set:
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# https://github.com/helm/helm/issues/8137
unitTestUpgrade: true
values:
@@ -22,7 +22,7 @@ tests:
- it: sets Deployment labels when specified if action is Upgrade
template: deployment.yaml
set:
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# https://github.com/helm/helm/issues/8137
unitTestUpgrade: true
values:
@@ -40,7 +40,7 @@ tests:
- it: sets Pod labels when specified if action is Upgrade
template: deployment.yaml
set:
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# https://github.com/helm/helm/issues/8137
unitTestUpgrade: true
values:
@@ -58,7 +58,7 @@ tests:
- it: sets Deployment annotations when specified if action is Upgrade
template: deployment.yaml
set:
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# https://github.com/helm/helm/issues/8137
unitTestUpgrade: true
values:
@@ -75,7 +75,7 @@ tests:
- it: sets Pod annotations when specified if action is Upgrade
template: deployment.yaml
set:
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# https://github.com/helm/helm/issues/8137
unitTestUpgrade: true
values:
@@ -93,7 +93,7 @@ tests:
- it: should have one replica when replicaCount is not set if action is Upgrade
template: deployment.yaml
set:
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# https://github.com/helm/helm/issues/8137
unitTestUpgrade: true
values:
@@ -108,7 +108,7 @@ tests:
- it: should have multiple replicas when replicaCount is set (using .replicaCount, deprecated) if action is Upgrade
template: deployment.yaml
set:
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# https://github.com/helm/helm/issues/8137
unitTestUpgrade: true
replicaCount: 3
@@ -141,7 +141,7 @@ tests:
- it: should set affinity when set in values if action is Upgrade
template: deployment.yaml
set:
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# https://github.com/helm/helm/issues/8137
unitTestUpgrade: true
values:
@@ -157,7 +157,7 @@ tests:
values:
- ../.lint/backwards-compatibility.yaml
set:
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# https://github.com/helm/helm/issues/8137
unitTestUpgrade: true
@@ -181,7 +181,7 @@ tests:
values:
- ../.lint/backwards-compatibility.yaml
set:
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# https://github.com/helm/helm/issues/8137
unitTestUpgrade: true
@@ -202,7 +202,7 @@ tests:
- it: should set tolerations when set in values if action is Upgrade
template: deployment.yaml
set:
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# https://github.com/helm/helm/issues/8137
unitTestUpgrade: true
values:
@@ -216,7 +216,7 @@ tests:
- it: should set resources when set in values if action is Upgrade
template: deployment.yaml
set:
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# https://github.com/helm/helm/issues/8137
unitTestUpgrade: true
values:
@@ -240,38 +240,31 @@ tests:
- it: should set SecurityContext if action is Upgrade
template: deployment.yaml
set:
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# https://github.com/helm/helm/issues/8137
unitTestUpgrade: true
values:
- ../.lint/backwards-compatibility.yaml
asserts:
- equal:
path: spec.template.spec.containers[0].securityContext.allowPrivilegeEscalation
value: false
- equal:
path: spec.template.spec.containers[0].securityContext.capabilities
path: spec.template.spec.containers[0].securityContext
value:
drop:
- all
- equal:
path: spec.template.spec.containers[0].securityContext.readOnlyRootFilesystem
value: true
- equal:
path: spec.template.spec.containers[0].securityContext.runAsNonRoot
value: true
- equal:
path: spec.template.spec.containers[0].securityContext.runAsUser
value: 9807
- matchSnapshot:
path: spec.template.spec
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 9807
seccompProfile:
type: RuntimeDefault
- it: should set image and tag correctly if action is Upgrade
template: deployment.yaml
values:
- ../.lint/backwards-compatibility.yaml
set:
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# https://github.com/helm/helm/issues/8137
unitTestUpgrade: true
@@ -283,10 +276,44 @@ tests:
- matchSnapshot:
path: spec.template.spec
- it: should have only one container when no `extraContainers` is set in values
template: deployment.yaml
set:
extraContainers: []
proxyAddr: helm-lint.example.com
kubeClusterName: helm-lint.example.com
unitTestUpgrade: true
asserts:
- isNotNull:
path: spec.template.spec.containers[0]
- isNull:
path: spec.template.spec.containers[1]
- it: should add one more container when `extraContainers` is set in values
template: deployment.yaml
set:
unitTestUpgrade: true
values:
- ../.lint/extra-containers.yaml
asserts:
- equal:
path: spec.template.spec.containers[1]
value:
name: nscenter
command:
- /bin/bash
- -c
- sleep infinity & wait
image: praqma/network-multitool
imagePullPolicy: IfNotPresent
securityContext:
privileged: true
runAsNonRoot: false
- it: should mount extraVolumes and extraVolumeMounts if action is Upgrade
template: deployment.yaml
set:
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# https://github.com/helm/helm/issues/8137
unitTestUpgrade: true
values:
@@ -311,7 +338,7 @@ tests:
values:
- ../.lint/backwards-compatibility.yaml
set:
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# https://github.com/helm/helm/issues/8137
unitTestUpgrade: true
@@ -326,7 +353,7 @@ tests:
- it: should set environment when extraEnv set in values if action is Upgrade
template: deployment.yaml
set:
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# https://github.com/helm/helm/issues/8137
unitTestUpgrade: true
@@ -348,7 +375,7 @@ tests:
- it: should provision initContainer correctly when set in values if action is Upgrade
template: deployment.yaml
set:
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# https://github.com/helm/helm/issues/8137
unitTestUpgrade: true
values:
@@ -383,7 +410,7 @@ tests:
values:
- ../.lint/backwards-compatibility.yaml
set:
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# https://github.com/helm/helm/issues/8137
unitTestUpgrade: true
@@ -398,7 +425,7 @@ tests:
- it: should expose diag port if action is Upgrade
template: deployment.yaml
set:
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# https://github.com/helm/helm/issues/8137
unitTestUpgrade: true
values:
@@ -416,7 +443,7 @@ tests:
- it: should set nodeSelector if set in values if action is Upgrade
template: deployment.yaml
set:
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# https://github.com/helm/helm/issues/8137
unitTestUpgrade: true
values:
@@ -432,7 +459,7 @@ tests:
- it: should add emptyDir for data when existingDataVolume is not set if action is Upgrade
template: deployment.yaml
set:
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# https://github.com/helm/helm/issues/8137
unitTestUpgrade: true
values:
@@ -454,7 +481,7 @@ tests:
- it: should correctly configure existingDataVolume when set if action is Upgrade
template: deployment.yaml
set:
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# https://github.com/helm/helm/issues/8137
unitTestUpgrade: true
values:
@@ -473,10 +500,58 @@ tests:
- matchSnapshot:
path: spec.template.spec
- it: should mount jamfCredentialsSecret.name when role is jamf and action is Upgrade
template: deployment.yaml
set:
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# https://github.com/helm/helm/issues/8137
unitTestUpgrade: true
values:
- ../.lint/jamf-service.yaml
asserts:
- contains:
path: spec.template.spec.volumes
content:
name: jamf-api-credentials
secret:
secretName: teleport-jamf-api-credentials
- contains:
path: spec.template.spec.containers[0].volumeMounts
content:
mountPath: /etc/teleport-jamf-api-credentials
name: jamf-api-credentials
readOnly: true
- matchSnapshot:
path: spec.template.spec
- it: should mount jamfCredentialsSecret if it already exists and when role is jamf and action is Upgrade
template: deployment.yaml
set:
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# https://github.com/helm/helm/issues/8137
unitTestUpgrade: true
values:
- ../.lint/jamf-service-existing-secret.yaml
asserts:
- contains:
path: spec.template.spec.volumes
content:
name: jamf-api-credentials
secret:
secretName: existing-teleport-jamf-secret
- contains:
path: spec.template.spec.containers[0].volumeMounts
content:
mountPath: /etc/teleport-jamf-api-credentials
name: jamf-api-credentials
readOnly: true
- matchSnapshot:
path: spec.template.spec
- it: should mount tls.existingCASecretName and set environment when set in values if action is Upgrade
template: deployment.yaml
set:
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# https://github.com/helm/helm/issues/8137
unitTestUpgrade: true
values:
@@ -505,7 +580,7 @@ tests:
- it: should mount tls.existingCASecretName and set extra environment when set in values if action is Upgrade
template: deployment.yaml
set:
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# https://github.com/helm/helm/issues/8137
unitTestUpgrade: true
values:
@@ -540,7 +615,7 @@ tests:
- it: should set priorityClassName when set in values if action is Upgrade
template: deployment.yaml
set:
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# https://github.com/helm/helm/issues/8137
unitTestUpgrade: true
values:
@@ -555,7 +630,7 @@ tests:
- it: should set not set priorityClassName when not set in values if action is Upgrade
template: deployment.yaml
set:
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# https://github.com/helm/helm/issues/8137
unitTestUpgrade: true
values:
@@ -569,7 +644,7 @@ tests:
- it: should set serviceAccountName when set in values if action is Upgrade
template: deployment.yaml
set:
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# https://github.com/helm/helm/issues/8137
unitTestUpgrade: true
values:
@@ -584,7 +659,7 @@ tests:
- it: should set default serviceAccountName when not set in values if action is Upgrade
template: deployment.yaml
set:
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# https://github.com/helm/helm/issues/8137
unitTestUpgrade: true
values:
@@ -685,3 +760,24 @@ tests:
- equal:
path: spec.template.spec.containers[0].securityContext
value: null
- it: should enable maintenance schedule export when updater is enabled if action is Upgrade
template: deployment.yaml
values:
- ../.lint/updater.yaml
set:
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# https://github.com/helm/helm/issues/8137
unitTestUpgrade: true
teleportVersionOverride: 13.4.5
asserts:
- contains:
path: spec.template.spec.containers[0].env
content:
name: TELEPORT_EXT_UPGRADER
value: kube
- contains:
path: spec.template.spec.containers[0].env
content:
name: TELEPORT_EXT_UPGRADER_VERSION
value: 13.4.5
+62 -17
View File
@@ -31,24 +31,30 @@ tests:
- ../.lint/backwards-compatibility.yaml
asserts:
- equal:
path: spec.template.spec.containers[0].securityContext.allowPrivilegeEscalation
value: false
- equal:
path: spec.template.spec.containers[0].securityContext.capabilities
path: spec.template.spec.containers[0].securityContext
value:
drop:
- all
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 9807
seccompProfile:
type: RuntimeDefault
- it: should set extraLabels for Job in post-delete hook
template: delete_hook.yaml
# documentIndex: 0=ServiceAccount 1=Role 2=RoleBinding 3=Job
documentIndex: 3
values:
- ../.lint/extra-labels.yaml
asserts:
- equal:
path: spec.template.spec.containers[0].securityContext.readOnlyRootFilesystem
value: true
- equal:
path: spec.template.spec.containers[0].securityContext.runAsNonRoot
value: true
- equal:
path: spec.template.spec.containers[0].securityContext.runAsUser
value: 9807
- matchSnapshot:
path: spec.template.spec
path: metadata.labels
value:
app.kubernetes.io/name: "teleport-kube-agent"
resource: "job"
- it: should set nodeSelector in post-delete hook
template: delete_hook.yaml
@@ -96,7 +102,20 @@ tests:
apiVersion: v1
- equal:
path: metadata.name
value: lint-serviceaccount
value: lint-serviceaccount-delete-hook
- it: should set extraLabels for ServiceAccount in post-delete hook
template: delete_hook.yaml
# documentIndex: 0=ServiceAccount 1=Role 2=RoleBinding 3=Job
documentIndex: 0
values:
- ../.lint/extra-labels.yaml
asserts:
- equal:
path: metadata.labels
value:
app.kubernetes.io/name: "teleport-kube-agent"
resource: "serviceaccount"
- it: should create Role for post-delete hook by default
template: delete_hook.yaml
@@ -107,6 +126,19 @@ tests:
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
- it: should set extraLabels for Role in post-delete hook
template: delete_hook.yaml
# documentIndex: 0=ServiceAccount 1=Role 2=RoleBinding 3=Job
documentIndex: 1
values:
- ../.lint/extra-labels.yaml
asserts:
- equal:
path: metadata.labels
value:
app.kubernetes.io/name: "teleport-kube-agent"
resource: "role"
- it: should create RoleBinding for post-delete hook by default
template: delete_hook.yaml
values:
@@ -116,6 +148,19 @@ tests:
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
- it: should set extraLabels for RoleBinding in post-delete hook
template: delete_hook.yaml
# documentIndex: 0=ServiceAccount 1=Role 2=RoleBinding 3=Job
documentIndex: 2
values:
- ../.lint/extra-labels.yaml
asserts:
- equal:
path: metadata.labels
value:
app.kubernetes.io/name: "teleport-kube-agent"
resource: "rolebinding"
- it: should not create ServiceAccount for post-delete hook if serviceAccount.create is false
template: delete_hook.yaml
values:
+1 -1
View File
@@ -4,7 +4,7 @@ templates:
tests:
- it: Create a Role when upgrading
release:
isupgrade: true
upgrade: true
set:
unitTestUpgrade: true
asserts:
@@ -4,7 +4,7 @@ templates:
tests:
- it: Create a RoleBinding when upgrading
release:
isupgrade: true
upgrade: true
set:
unitTestUpgrade: true
asserts:
@@ -66,6 +66,18 @@ tests:
value: some-other-secret-name
- matchSnapshot: {}
- it: generates a secret when jamfCredentialsSecret.create is true
values:
- ../.lint/jamf-service.yaml
asserts:
- containsDocument:
kind: Secret
apiVersion: v1
name: teleport-jamf-api-credentials
- matchSnapshot: {}
# documentIndex: 0=Secret(joinToken) 1=Secret(jamfSecret)
documentIndex: 1
- it: does not create a secret when joinTokenSecret.create is false
set:
authToken: sample-auth-token-dont-use-this
@@ -76,6 +88,13 @@ tests:
- hasDocuments:
count: 0
- it: does not create a secret when jamfCredentialsSecret.create is false
values:
- ../.lint/jamf-service-existing-secret.yaml
asserts:
- hasDocuments:
count: 1 # only joinToken secret is created
- it: sets Secret labels when specified
values:
- ../.lint/extra-labels.yaml
+115 -33
View File
@@ -7,8 +7,8 @@ tests:
template: statefulset.yaml
values:
- ../.lint/stateful.yaml
elease:
isupgrade: true
release:
upgrade: true
asserts:
- isKind:
of: StatefulSet
@@ -179,30 +179,36 @@ tests:
- matchSnapshot:
path: spec.template.spec
- it: should set SecurityContext
- it: should set a restricted-friendly SecurityContext by default
template: statefulset.yaml
values:
- ../.lint/stateful.yaml
- ../.lint/initcontainers.yaml
asserts:
- equal:
path: spec.template.spec.containers[0].securityContext.allowPrivilegeEscalation
value: false
- equal:
path: spec.template.spec.containers[0].securityContext.capabilities
path: spec.template.spec.containers[0].securityContext
value:
drop:
- all
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 9807
seccompProfile:
type: RuntimeDefault
- equal:
path: spec.template.spec.containers[0].securityContext.readOnlyRootFilesystem
value: true
- equal:
path: spec.template.spec.containers[0].securityContext.runAsNonRoot
value: true
- equal:
path: spec.template.spec.containers[0].securityContext.runAsUser
value: 9807
- matchSnapshot:
path: spec.template.spec
path: spec.template.spec.initContainers[0].securityContext
value:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 9807
seccompProfile:
type: RuntimeDefault
- it: should set image and tag correctly
template: statefulset.yaml
@@ -217,6 +223,37 @@ tests:
- matchSnapshot:
path: spec.template.spec
- it: should have only one container when no `extraContainers` is set in values
template: statefulset.yaml
set:
extraContainers: []
proxyAddr: helm-lint.example.com
kubeClusterName: helm-lint.example.com
asserts:
- isNotNull:
path: spec.template.spec.containers[0]
- isNull:
path: spec.template.spec.containers[1]
- it: should add one more container when `extraContainers` is set in values
template: statefulset.yaml
values:
- ../.lint/extra-containers.yaml
asserts:
- equal:
path: spec.template.spec.containers[1]
value:
name: nscenter
command:
- /bin/bash
- -c
- sleep infinity & wait
image: praqma/network-multitool
imagePullPolicy: IfNotPresent
securityContext:
privileged: true
runAsNonRoot: false
- it: should mount extraVolumes and extraVolumeMounts
template: statefulset.yaml
values:
@@ -372,7 +409,7 @@ tests:
- it: should not add emptyDir for data when using StatefulSet
template: statefulset.yaml
release:
isupgrade: true
upgrade: true
set:
unitTestUpgrade: true
values:
@@ -404,11 +441,11 @@ tests:
values:
- ../.lint/stateful.yaml
set:
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# https://github.com/helm/helm/issues/8137
unitTestUpgrade: true
release:
isupgrade: true
upgrade: true
asserts:
- isNotNull:
path: spec.volumeClaimTemplates[0].spec
@@ -420,7 +457,7 @@ tests:
values:
- ../.lint/stateful.yaml
set:
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# https://github.com/helm/helm/issues/8137
unitTestUpgrade: true
release:
@@ -435,9 +472,9 @@ tests:
values:
- ../.lint/stateful.yaml
release:
isupgrade: true
upgrade: true
set:
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# https://github.com/helm/helm/issues/8137
unitTestUpgrade: true
@@ -455,11 +492,11 @@ tests:
values:
- ../.lint/stateful.yaml
release:
isupgrade: true
upgrade: true
set:
storage:
requests: 256Mi
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# unit test does not support lookup functions, so to test the behavior we use this undoc value
# https://github.com/helm/helm/issues/8137
unitTestUpgrade: true
asserts:
@@ -469,6 +506,46 @@ tests:
- matchSnapshot:
path: spec.template.spec
- it: should mount jamfCredentialsSecret.name when role is jamf
template: statefulset.yaml
values:
- ../.lint/jamf-service.yaml
asserts:
- contains:
path: spec.template.spec.volumes
content:
name: jamf-api-credentials
secret:
secretName: teleport-jamf-api-credentials
- contains:
path: spec.template.spec.containers[0].volumeMounts
content:
mountPath: /etc/teleport-jamf-api-credentials
name: jamf-api-credentials
readOnly: true
- matchSnapshot:
path: spec.template.spec
- it: should mount jamfCredentialsSecret if it already exists and when role is jamf
template: statefulset.yaml
values:
- ../.lint/jamf-service-existing-secret.yaml
asserts:
- contains:
path: spec.template.spec.volumes
content:
name: jamf-api-credentials
secret:
secretName: existing-teleport-jamf-secret
- contains:
path: spec.template.spec.containers[0].volumeMounts
content:
mountPath: /etc/teleport-jamf-api-credentials
name: jamf-api-credentials
readOnly: true
- matchSnapshot:
path: spec.template.spec
- it: should mount tls.existingCASecretName and set environment when set in values
template: statefulset.yaml
values:
@@ -525,7 +602,6 @@ tests:
- matchSnapshot:
path: spec.template.spec
- it: should set serviceAccountName when set in values
template: statefulset.yaml
values:
@@ -594,7 +670,7 @@ tests:
values:
- ../.lint/stateful.yaml
set:
storage:
storage:
enabled: false
asserts:
- contains:
@@ -624,12 +700,12 @@ tests:
- it: should generate Statefulset when storage is disabled and mode is a Upgrade
template: statefulset.yaml
release:
isupgrade: true
upgrade: true
values:
- ../.lint/stateful.yaml
set:
unitTestUpgrade: false
storage:
unitTestUpgrade: true
storage:
enabled: false
asserts:
- contains:
@@ -682,14 +758,20 @@ tests:
- it: should enable maintenance schedule export when updater is enabled
template: statefulset.yaml
values:
- ../.lint/existing-tls-secret-with-ca.yaml
- ../.lint/updater.yaml
set:
teleportVersionOverride: 13.4.5
asserts:
- contains:
path: spec.template.spec.containers[0].env
content:
name: TELEPORT_EXT_UPGRADER
value: kube
- contains:
path: spec.template.spec.containers[0].env
content:
name: TELEPORT_EXT_UPGRADER_VERSION
value: 13.4.5
- it: should set the installation method environment variable
template: statefulset.yaml
@@ -57,6 +57,16 @@ tests:
- contains:
path: spec.template.spec.containers[0].args
content: "--agent-namespace=my-namespace"
- it: defaults the updater version server to the proxy address
set:
proxyAddr: proxy.teleport.example.com:443
roles: "custom"
updater:
enabled: true
asserts:
- contains:
path: spec.template.spec.containers[0].args
content: "--version-server=https://proxy.teleport.example.com:443/v1/webapi/automaticupgrades/channel"
- it: sets the updater version server
values:
- ../.lint/updater.yaml
@@ -225,3 +235,55 @@ tests:
- equal:
path: spec.template.spec.serviceAccountName
value: distinct-updater-sa
- it: sets extraArgs when set
values:
- ../.lint/updater.yaml
set:
updater:
extraArgs:
- "--foo=bar"
asserts:
- contains:
path: spec.template.spec.containers[0].args
content: "--foo=bar"
- it: sets the pull credentials when specified
values:
- ../.lint/updater.yaml
set:
updater:
pullCredentials: "amazon"
asserts:
- contains:
path: spec.template.spec.containers[0].args
content: "--pull-credentials=amazon"
- it: sets extraVolumes when specified
values:
- ../.lint/updater-secret-docker.yaml
- ../.lint/existing-tls-secret-with-ca.yaml
asserts:
- contains:
path: spec.template.spec.volumes
content:
name: docker-config
projected:
sources:
- secret:
name: my-pull-secret
items:
- key: .dockerconfigjson
path: config.json
- it: sets extraVolumeMounts when specified
values:
- ../.lint/updater-secret-docker.yaml
- ../.lint/existing-tls-secret-with-ca.yaml
asserts:
- contains:
path: spec.template.spec.containers[0].volumeMounts
content:
name: docker-config
mountPath: "/mnt/docker"
readOnly: true
@@ -1,4 +1,4 @@
suite: Updater Role
suite: Updater RoleBinding
templates:
- updater/rolebinding.yaml
tests:
-453
View File
@@ -1,453 +0,0 @@
################################################################
# Values that must always be provided by the user.
################################################################
# Join token for the cluster. `joinParams` can also pass the join token,
# but supports more join methods and takes precedence if set.
authToken: "36ce3b30a201d5c3fecaa0d97d57cc80"
# Address of the teleport proxy with port (usually :3080).
proxyAddr: "teleport.ipa.champion:443"
# Comma-separated list of roles to enable (any of: kube,db,app)
roles: "kube"
################################################################
# Values that must be provided if IAM or EC2 joining is enabled.
################################################################
# Specify how to join the Teleport cluster
joinParams:
# Supported join methods are "token", "ec2", "iam".
# method "token", is equivalent to using authToken to join a cluster
method: "token"
# Leave empty only when method is "token" and the secret
# "teleport-kube-agent-join-token" has been created before and
# contains a valid join token.
tokenName: ""
################################################################
# Values that must be provided if Kubernetes access is enabled.
################################################################
# Name for this kubernetes cluster to be used by teleport users.
kubeClusterName: "homeCluster"
################################################################
# Values that must be provided if Application access is enabled.
################################################################
# At least one of 'apps', 'appResources' must be provided
# when application access is enabled. See the README for more details.
# Details of at least one app to be proxied. Example:
# apps:
# - name: grafana
# uri: http://localhost:3000
apps: []
# Dynamic application configuration mode. Example:
# appResources:
# - labels:
# "*": "*"
appResources: []
################################################################
# Values that must be provided if Database access is enabled.
################################################################
# At least one of 'databases', 'awsDatabases', 'azureDatabases', or 'databaseResources' must be provided
# when database access is enabled. See the README for more details.
# Database auto-discovery mode (AWS)
# Details of at least one awsDatabase discovery pattern to be discovered
# and proxied. Example:
# awsDatabases:
# - types: ["rds"]
# regions: ["us-east-1"]
# tags:
# "environment": "production"
awsDatabases: []
# Database auto-discovery mode (Azure)
# Details of at least one azureDatabase discovery pattern to be discovered
# and proxied. Example:
# azureDatabases:
# - types: ["mysql", "postgres"]
# tags:
# "environment": "production"
# regions: ["eastus", "centralus"]
# subscriptions: ["subID1", "subID2"]
# resource_groups: ["group1", "group2"]
# Note that regions, subscriptions, and resource_groups are optional, and by default
# the pattern for these selectors is ["*"] which will match all regions, subscriptions, or resource groups.
azureDatabases: []
# Manual database configuration mode
# Details of at least one database to be proxied. Example:
# databases:
# - name: aurora
# uri: "postgres-aurora-instance-1.xxx.us-east-1.rds.amazonaws.com:5432"
# protocol: "postgres"
# static_labels:
# env: "prod"
databases: []
# Dynamic database configuration mode. Example:
# databaseResources:
# - labels:
# "*": "*"
databaseResources: []
################################################################
# Values that you may need to change.
################################################################
# Version of teleport image, if different from chart version in Chart.yaml.
# DANGER: `teleportVersionOverride` MUST NOT be used to control the Teleport version.
# This chart is designed to run a specific teleport version (see Chart.yaml).
# You will face compatibility issues trying to run a different Teleport version with it.
#
# If you want to run Teleport version X, you should use `helm --version X` instead.
teleportVersionOverride: ""
# Optional CA pins of the auth server. This enables a more secure way of
# adding new nodes to a cluster. See "Adding Nodes to the Cluster"
# (https://goteleport.com/docs/admin-guide/#adding-nodes-to-the-cluster).
# Each list element can be the pin itself (recommended), or a path to a file
# containing the pin. For the latter it is your responsibility to mount
# the file, using extraVolumes.
caPin: []
# When set to true, the agent will skip the verification of proxy TLS
# certificate.
insecureSkipProxyTLSVerify: false
# Set enterprise to true to use enterprise image.
enterprise: false
# teleportConfig contains additional teleport configuration
# The configuration will be merged with the chart-generated configuration
# and will take precedence in case of conflict
teleportConfig: {}
# Settings for mounting your own TLS material in the agent pod.
# The agent does not expose a TLS server, so this is only used to trust CAs.
tls:
# Name of an existing secret to use which contains a CA or trust bundle in x509 PEM format.
# This is useful to trust private CAs.
# This will automatically set the SSL_CERT_FILE environment variable to trust the CA.
# Create the secret with `kubectl create secret generic --from-file=ca.pem=/path/to/root-ca.pem`
# The filename inside the secret is important - it _must_ be ca.pem
existingCASecretName: "homeca"
updater:
enabled: false
# `updater.versionServer` is the URL of the version server the agent fetches
# the target version from. The complete version endpoint is built by
# concatenating `versionServer` and `releaseChannel`.
versionServer: "https://updates.releases.teleport.dev/v1/"
# Release channel the agent subscribes to.
releaseChannel: "stable/cloud"
image: public.ecr.aws/gravitational/teleport-kube-agent-updater
serviceAccount:
# service account name defaults to "<kube agent sa name>-updater"
name: ""
# If set, will use an existing volume mounted via extraVolumes
# as the Teleport data directory.
# If anything is set under the "storage" key, this will be ignored.
existingDataVolume: ""
# If true, create & use Pod Security Policy resources
# https://kubernetes.io/docs/concepts/policy/pod-security-policy/
# WARNING: the PSP won't be deployed for Kubernetes 1.23 and higher.
# Please read https://goteleport.com/docs/deploy-a-cluster/helm-deployments/migration-kubernetes-1-25-psp/
podSecurityPolicy:
enabled: true
# Labels is a map of key values pairs about this cluster
labels:
teleport.internal/resource-id: badd4bc3-ca45-4456-b2f9-513ec8e8bcbc
# Settings for high availability.
highAvailability:
# Set to >1 for a high availability mode where multiple Teleport agent pods will be deployed.
replicaCount: 1
# Setting 'requireAntiAffinity' to true will use 'requiredDuringSchedulingIgnoredDuringExecution' to require that multiple Teleport pods must not be scheduled on the
# same physical host. This will result in Teleport pods failing to be scheduled in very small clusters or during node downtime, so should be used with caution.
# Setting 'requireAntiAffinity' to false (the default) uses 'preferredDuringSchedulingIgnoredDuringExecution' to make this a soft requirement.
# This setting only has any effect when replicaCount is greater than 1.
requireAntiAffinity: false
# If enabled will create a Pod Disruption Budget
# https://kubernetes.io/docs/concepts/workloads/pods/disruptions/
podDisruptionBudget:
enabled: false
minAvailable: 1
# podMonitor controls the PodMonitor CR (from monitoring.coreos.com/v1)
# This CRD is managed by the prometheus-operator and allows workload to
# get monitored. To use this value, you need to run a `prometheus-operator`
# in the cluster for this value to take effect.
# See https://prometheus-operator.dev/docs/prologue/introduction/
podMonitor:
# Whether the chart should deploy a PodMonitor.
# Disabled by default as it requires the PodMonitor CRD to be installed.
enabled: false
# additionalLabels to put on the PodMonitor.
# This is used to be selected by a specific prometheus instance.
additionalLabels: {}
# interval is the interval between two metrics scrapes. Defaults to 30s
interval: 30s
################################################################
# Values that must be provided if using persistent storage for Teleport.
#
# Assigning a persistent volume to Teleport agent allows the agent to keep session recordings when the pod is restarted if `session_recording` is set to `node` or `proxy`.
# The security association between the agent and the Teleport is no longer stored in PV, instead it is stored in a Kubernetes Secret so that the agent does not require PV
# to survive restarts and rotations while using short-lived joining tokens.
#
# Fields:
# enabled: Set to true to enable the use of Persistent volumes.
# storageClassName: The name of the kubernetes storage class to use when creating volumes. See https://kubernetes.io/docs/concepts/storage/storage-classes/
# requests: The size of the volume to request from the persistent storage system
################################################################
storage:
enabled: false
storageClassName: ""
requests: 128Mi
# Settings for configuring an cluster admin role binding.
# This is useful for granting cluster admin permissions to a Kubernetes Group
# other than the default "system:masters" group.
# GKE Autopilot clusters forbid using the "system:masters" group for impersonation
# and require a custom group to be used instead.
adminClusterRoleBinding:
create: false
name: "cluster-admin"
################################################################
# Values that you shouldn't need to change.
################################################################
# Container image for the cluster.
# Since version 13, hardened distroless images are used by default.
# You can use the deprecated debian-based images by setting the value to
# `public.ecr.aws/gravitational/teleport`. Those images will be
# removed with teleport 14.
image: public.ecr.aws/gravitational/teleport-distroless
# Enterprise version of the image
# Since version 13, hardened distroless images are used by default.
# You can use the deprecated debian-based images by setting the value to
# `public.ecr.aws/gravitational/teleport-ent`. Those images will be
# removed with teleport 14.
enterpriseImage: public.ecr.aws/gravitational/teleport-ent-distroless
# Optional array of imagePullSecrets, to use when pulling from a private registry
imagePullSecrets: []
# - name: myRegistryKeySecretName
# Number of replicas for the agent deployment.
# DEPRECATED Use highAvailability:replicaCount instead
# replicaCount: 1
# (optional) Override the name of the ClusterRole used by the agent's service account.
clusterRoleName: ""
# (optional) Override the name of the ClusterRoleBinding used by the agent's service account.
clusterRoleBindingName: ""
# (optional) Override the name of the Role used by the agent's service account for Secret access.
roleName: ""
# (optional) Override the name of the RoleBinding used by the agent's service account.
roleBindingName: ""
# (optional) Override the name of the service account used by the agent.
# DEPRECATED Use serviceAccount:name instead
serviceAccountName: ""
# (optional) Kubernetes service account to create/use.
serviceAccount:
# Specifies whether a ServiceAccount should be created
create: true
# The name of the ServiceAccount to use.
# If not set and serviceAccount.create is true, the name is generated using the release name.
# If create is false, the name will be used to reference an existing service account.
name: ""
# Set to true (default) to create Kubernetes ClusterRole and ClusterRoleBinding.
rbac:
# Specifies whether a ClusterRole and ClusterRoleBinding should be created.
# Set to false if your cluster level resources are managed separately.
create: true
# Name of the Secret to store the teleport join token.
# DEPRECATED Use joinTokenSecret.name instead
secretName: ""
# Manages the join token secret creation and its name.
joinTokenSecret:
# create controls whether the Helm chart should create and manage the join token
# secret.
# If false, the chart assumes that the secret with the configured name already exists at the
# installation namespace.
create: true
# Name of the Secret to store the teleport join token.
name: teleport-kube-agent-join-token
# Teleport logging configuration
log:
# Log level for the Teleport process.
# Available log levels are: DEBUG, INFO, WARNING, ERROR.
# The default is INFO, which is recommended in production.
# DEBUG is useful during first-time setup or to see more detailed logs for debugging.
level: INFO
# Log output
# Use a file path to log to disk: e.g. '/var/lib/teleport/teleport.log'
# Other supported values: 'stdout', 'stderr' and 'syslog'
output: stderr
# Log format configuration
# Possible output values are 'json' and 'text' (default).
format: text
# Possible extra_fields values include: timestamp, component, caller, and level.
# All extra fields are included by default.
extraFields: ["timestamp", "level", "component", "caller"]
##################################
# Extra Kubernetes configuration #
##################################
# Affinity for pod assignment
# https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
affinity: {}
# Pod's DNS Configuration
# https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-dns-config
# This value is useful if you need to reduce the DNS load: set "ndots" to 0 and only use FQDNs.
dnsConfig: {}
# nameservers:
# - 1.2.3.4
# searches:
# - ns1.svc.cluster-domain.example
# - my.dns.search.suffix
# options:
# - name: ndots
# value: "2"
# Pod's DNS Policy
# https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy
dnsPolicy: ""
# nodeSelector to apply for pod assignment
# https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/
nodeSelector: {}
# Kubernetes labels to apply
# https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
extraLabels:
# Labels for the Cluster Role
clusterRole: {}
# Labels for the Cluster Role Binding
clusterRoleBinding: {}
# Labels for the Role
role: {}
# Labels for the Role Binding
roleBinding: {}
# Labels for the ConfigMap
config: {}
# Labels for the Deployment/StatefulSet
deployment: {}
# Labels for each Pod in the Deployment/StatefulSet
pod: {}
# Labels for the Pod Disruption Budget (ignored when disabled)
podDisruptionBudget: {}
# Labels for the Pod Security Policy (ignored when disabled)
podSecurityPolicy: {}
# Labels for the Secret (ignored when disabled)
secret: {}
# Labels for the ServiceAccount object
serviceAccount: {}
# Kubernetes annotations to apply
# https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
annotations:
# Annotations for the ConfigMap
config: {}
# Annotations for the Deployment
deployment: {}
# Annotations for each Pod in the Deployment
pod: {}
# Annotations for the Secret (has no effect when `joinTokenSecret.create` is false)
secret: {}
# 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: []
# - name: myvolume
# secret:
# secretName: testSecret
# Extra volume mounts corresponding to the volumes mounted above
extraVolumeMounts: []
# - name: myvolume
# mountPath: /path/on/host
# Pod Host aliases (see https://kubernetes.io/docs/tasks/network/customize-hosts-file-for-pods/)
hostAliases: []
# - ip: "127.0.0.1"
# hostnames:
# - "foo.local"
# - "bar.local"
# - ip: "10.1.2.3"
# hostnames:
# - "foo.remote"
# - "bar.remote"
# Allow the imagePullPolicy to be overridden
imagePullPolicy: IfNotPresent
# A list of initContainers to run before each Teleport pod starts
# https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
initContainers: []
# - name: "teleport-init"
# image: "alpine"
# args: ["echo test"]
# Resources to request for each pod in the deployment
# https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
resources: {}
# requests:
# cpu: "1"
# memory: "2Gi"
# Security context to add to the initContainer
initSecurityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- all
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 9807
# Security context to add to other containers
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- all
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 9807
# Priority class name to add to the deployment
priorityClassName: ""
# Tolerations for pod assignment
# https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
tolerations: []
# Timeouts for the readiness and liveness probes
# https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
probeTimeoutSeconds: 1
+135
View File
@@ -15,6 +15,7 @@
"teleportVersionOverride",
"insecureSkipProxyTLSVerify",
"teleportConfig",
"updater",
"existingDataVolume",
"podSecurityPolicy",
"labels",
@@ -29,6 +30,7 @@
"log",
"affinity",
"annotations",
"extraContainers",
"extraVolumes",
"extraVolumeMounts",
"imagePullPolicy",
@@ -264,6 +266,56 @@
}
}
},
"updater": {
"$id": "#/properties/updater",
"type": "object",
"required": [
"enabled"
],
"properties": {
"enabled": {
"$id": "#/properties/updater/properties/enabled",
"type": "boolean",
"default": false
},
"versionServer": {
"$id": "#/properties/updater/properties/versionServer",
"type": "string",
"default": "https://updates.releases.teleport.dev/v1/"
},
"releaseChannel": {
"$id": "#/properties/updater/properties/releaseChannel",
"type": "string",
"default": "stable/cloud"
},
"image": {
"$id": "#/properties/updater/properties/image",
"type": "string",
"default": "public.ecr.aws/gravitational/teleport-kube-agent-updater"
},
"serviceAccount": {
"$id": "#/properties/updater/properties/serviceAccount",
"type": "object",
"properties": {
"name": {
"$id": "#/properties/updater/properties/serviceAccount/properties/name",
"type": "string",
"default": ""
}
}
},
"pullCredentials": {
"$id": "#/properties/updater/properties/pullCredentials",
"type": "string",
"default": ""
},
"extraArgs": {
"$id": "#/properties/updater/properties/extraArgs",
"type": "array",
"default": []
}
}
},
"existingDataVolume": {
"$id": "#/properties/existingDataVolume",
"type": "string",
@@ -392,6 +444,18 @@
}
}
},
"initSecurityContext": {
"$id": "#/properties/initSecurityContext",
"type": "object"
},
"securityContext": {
"$id": "#/properties/podSecurityContext",
"type": "object"
},
"podSecurityContext": {
"$id": "#/properties/securityContext",
"type": "object"
},
"priorityClassName": {
"$id": "#/properties/priorityClassName",
"type": "string",
@@ -494,6 +558,11 @@
"type": "object",
"default": {}
},
"job": {
"$id": "#/properties/extraLabels/properties/job",
"type": "object",
"default": {}
},
"pod": {
"$id": "#/properties/extraLabels/properties/pod",
"type": "object",
@@ -598,6 +667,11 @@
"type": "array",
"default": []
},
"extraContainers": {
"$id": "#/properties/extraContainers",
"type": "array",
"default": []
},
"extraVolumes": {
"$id": "#/properties/extraVolumes",
"type": "array",
@@ -642,6 +716,67 @@
"$id": "#/properties/probeTimeoutSeconds",
"type": "integer",
"default": 1
},
"kubernetesDiscovery": {
"$id": "#/properties/kubernetesDiscovery",
"type": "array",
"default": [],
"properties": {
"types": {
"$id": "#/properties/kubernetesDiscovery/types",
"type": "array",
"items": {
"type": "string"
},
"default": []
},
"namespaces": {
"$id": "#/properties/kubernetesDiscovery/namespaces",
"type": "array",
"items": {
"type": "string"
},
"default": []
},
"labels": {
"$id": "#/properties/kubernetesDiscovery/labels",
"type": "object"
},
"additionalProperties": false
}
},
"jamfCredentialsSecret": {
"$id": "#/properties/jamfCredentialsSecret",
"type": "object",
"required": ["create", "name"],
"properties": {
"create": {
"$id": "#/properties/jamfCredentialsSecret/create",
"type": "boolean",
"default": true
},
"name": {
"$id": "#/properties/jamfCredentialsSecret/name",
"type": "string",
"default": "teleport-jamf-api-credentials"
},
"additionalProperties": false
}
},
"jamfApiEndpoint": {
"$id": "#/properties/jamfApiEndpoint",
"type": "string",
"default": ""
},
"jamfClientId": {
"$id": "#/properties/jamfClientId",
"type": "string",
"default": ""
},
"jamfClientSecret": {
"$id": "#/properties/jamfSecret",
"type": "string",
"default": ""
}
}
}
+6
View File
@@ -0,0 +1,6 @@
roles: kube
authToken: b06935def1eca6756beb1d95762503b9
proxyAddr: teleport.ervine.cloud:443
kubeClusterName: ubuntu-test
labels:
teleport.internal/resource-id: 917d31e7-6000-4484-aff0-7316122c1ed2
File diff suppressed because it is too large Load Diff