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
@@ -1,6 +1,7 @@
{{- $proxy := mustMergeOverwrite (mustDeepCopy .Values) .Values.proxy -}}
{{- $replicable := or $proxy.highAvailability.certManager.enabled $proxy.tls.existingSecretName $proxy.ingress.enabled -}}
{{- $projectedServiceAccountToken := semverCompare ">=1.20.0-0" .Capabilities.KubeVersion.Version }}
{{- $topologySpreadConstraints := and (semverCompare ">=1.18.0-0" .Capabilities.KubeVersion.Version) (not $proxy.disableTopologySpreadConstraints) }}
# Deployment is {{ if not $replicable }}not {{end}}replicable
{{- if and $proxy.highAvailability.certManager.enabled $proxy.tls.existingSecretName }}
{{- fail "Cannot set both highAvailability.certManager.enabled and tls.existingSecretName, choose one or the other" }}
@@ -61,6 +62,23 @@ spec:
spec:
{{- if $proxy.nodeSelector }}
nodeSelector: {{- toYaml $proxy.nodeSelector | nindent 8 }}
{{- end }}
{{- if $topologySpreadConstraints }}
{{- if $proxy.topologySpreadConstraints }}
topologySpreadConstraints: {{- toYaml $proxy.topologySpreadConstraints | nindent 8 }}
{{- else }}
topologySpreadConstraints:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels: {{- include "teleport-cluster.proxy.selectorLabels" . | nindent 14 }}
- maxSkew: 1
topologyKey: topology.kubernetes.io/zone
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels: {{- include "teleport-cluster.proxy.selectorLabels" . | nindent 14 }}
{{- end }}
{{- end }}
affinity:
{{- if $proxy.affinity }}
@@ -224,9 +242,10 @@ spec:
httpGet:
path: /readyz
port: diag
initialDelaySeconds: 5 # wait 5s for agent to register
periodSeconds: 5 # poll health every 5s
failureThreshold: 12 # consider agent unhealthy after 60s (12 * 5s)
initialDelaySeconds: {{ $proxy.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ $proxy.readinessProbe.periodSeconds }}
failureThreshold: {{$proxy.readinessProbe.failureThreshold}}
successThreshold: {{$proxy.readinessProbe.successThreshold}}
timeoutSeconds: {{ $proxy.probeTimeoutSeconds }}
lifecycle:
# waiting during preStop ensures no new request will hit the Terminating pod