Update teleport

This commit is contained in:
2025-05-13 22:48:36 +08:00
parent 7429da7f22
commit e2b5bb1376
25 changed files with 1367 additions and 125 deletions
@@ -923,3 +923,101 @@ tests:
- equal:
path: spec.template.metadata.labels.baz
value: overridden
- it: sets readinessProbe values on Deployment Pods
template: auth/deployment.yaml
set:
clusterName: helm-lint
readinessProbe:
initialDelaySeconds: 9
periodSeconds: 10
failureThreshold: 11
successThreshold: 12
auth:
# we test an auth-specific override
readinessProbe:
initialDelaySeconds: 13
asserts:
- equal:
path: spec.template.spec.containers[0].readinessProbe.periodSeconds
value: 10
- equal:
path: spec.template.spec.containers[0].readinessProbe.failureThreshold
value: 11
- equal:
path: spec.template.spec.containers[0].readinessProbe.successThreshold
value: 12
- equal:
path: spec.template.spec.containers[0].readinessProbe.initialDelaySeconds
value: 13
- it: sets topology spread constraints by default
template: auth/deployment.yaml
set:
clusterName: helm-lint
asserts:
- equal:
path: spec.template.spec.topologySpreadConstraints
value:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels:
app.kubernetes.io/component: auth
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/name: teleport-cluster
- maxSkew: 1
topologyKey: topology.kubernetes.io/zone
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels:
app.kubernetes.io/component: auth
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/name: teleport-cluster
- it: removes topology spread constraints when disabled
template: auth/deployment.yaml
set:
clusterName: helm-lint
disableTopologySpreadConstraints: true
asserts:
- isEmpty:
path: spec.template.spec.topologySpreadConstraints
- it: removes topology spread constraints when running on antique kubernetes
template: auth/deployment.yaml
set:
clusterName: helm-lint
capabilities:
majorVersion: 1
minorVersion: 17
asserts:
- isEmpty:
path: spec.template.spec.topologySpreadConstraints
- it: uses custom topology spread constraints when set
template: auth/deployment.yaml
set:
clusterName: helm-lint
topologySpreadConstraints:
- maxSkew: 2
topologyKey: foobar
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels:
app: baz
# helm unit-test has a bug where capabilities are not reset between tests, we must set back to 1.18 after the 1.17 test.
capabilities:
majorVersion: 1
minorVersion: 18
asserts:
- equal:
path: spec.template.spec.topologySpreadConstraints
value:
- maxSkew: 2
topologyKey: foobar
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels:
app: baz