Add teleport agent update
This commit is contained in:
@@ -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: {}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user