Bump teleport to version 15.3.3

This commit is contained in:
2024-05-10 20:56:53 +08:00
parent c7413eae10
commit df6da4aabb
236 changed files with 6866 additions and 1322 deletions
@@ -1,17 +1,17 @@
{{- define "teleport-cluster.auth.config.aws" -}}
{{ include "teleport-cluster.auth.config.common" . }}
{{ mustMergeOverwrite (include "teleport-cluster.auth.config.common" . | fromYaml) (include "teleport-cluster.auth.config.aws.overrides" . | fromYaml) | toYaml }}
{{- end -}}
{{- define "teleport-cluster.auth.config.aws.overrides" -}}
teleport:
storage:
type: dynamodb
region: {{ required "aws.region is required in chart values" .Values.aws.region }}
table_name: {{ required "aws.backendTable is required in chart values" .Values.aws.backendTable }}
{{- if .Values.aws.auditLogMirrorOnStdout }}
audit_events_uri: ['dynamodb://{{ required "aws.auditLogTable is required in chart values" .Values.aws.auditLogTable }}', 'stdout://']
{{- else }}
audit_events_uri: ['dynamodb://{{ required "aws.auditLogTable is required in chart values" .Values.aws.auditLogTable }}']
{{- end }}
audit_events_uri: {{- include "teleport-cluster.auth.config.aws.audit" . | nindent 4 }}
audit_sessions_uri: s3://{{ required "aws.sessionRecordingBucket is required in chart values" .Values.aws.sessionRecordingBucket }}
continuous_backups: {{ required "aws.backups is required in chart values" .Values.aws.backups }}
{{- if .Values.aws.dynamoAutoScaling }}
{{- if .Values.aws.dynamoAutoScaling }}
auto_scaling: true
billing_mode: provisioned
read_min_capacity: {{ required "aws.readMinCapacity is required when aws.dynamoAutoScaling is true" .Values.aws.readMinCapacity }}
@@ -20,7 +20,41 @@
write_min_capacity: {{ required "aws.writeMinCapacity is required when aws.dynamoAutoScaling is true" .Values.aws.writeMinCapacity }}
write_max_capacity: {{ required "aws.writeMaxCapacity is required when aws.dynamoAutoScaling is true" .Values.aws.writeMaxCapacity }}
write_target_value: {{ required "aws.writeTargetValue is required when aws.dynamoAutoScaling is true" .Values.aws.writeTargetValue }}
{{- else }}
{{- else }}
auto_scaling: false
{{- end }}
{{- if .Values.aws.accessMonitoring.enabled }}
{{- if not .Values.aws.athenaURL }}
{{- fail "AccessMonitoring requires an Athena Event backend" }}
{{- end }}
auth_service:
access_monitoring:
enabled: true
report_results: {{ .Values.aws.accessMonitoring.reportResults | quote }}
role_arn: {{ .Values.aws.accessMonitoring.roleARN | quote }}
workgroup: {{ .Values.aws.accessMonitoring.workgroup | quote }}
{{- end }}
{{- end -}}
{{- define "teleport-cluster.auth.config.aws.audit" -}}
{{- if and .Values.aws.auditLogTable (not .Values.aws.athenaURL) -}}
- 'dynamodb://{{.Values.aws.auditLogTable}}'
{{- else if and (not .Values.aws.auditLogTable) .Values.aws.athenaURL -}}
- {{ .Values.aws.athenaURL | quote }}
{{- else if and .Values.aws.auditLogTable .Values.aws.athenaURL -}}
{{- if eq .Values.aws.auditLogPrimaryBackend "dynamo" -}}
- 'dynamodb://{{.Values.aws.auditLogTable}}'
- {{ .Values.aws.athenaURL | quote }}
{{- else if eq .Values.aws.auditLogPrimaryBackend "athena" -}}
- {{ .Values.aws.athenaURL | quote }}
- 'dynamodb://{{.Values.aws.auditLogTable}}'
{{- else -}}
{{- fail "Both Dynamo and Athena audit backends are enabled. You must specify the primary backend by setting `aws.auditLogPrimaryBackend` to either 'dynamo' or 'athena'." -}}
{{- end -}}
{{- else -}}
{{- fail "You need an audit backend. In AWS mode, you must set at least one of `aws.auditLogTable` (Dynamo) and `aws.athenaURL` (Athena)." -}}
{{- end -}}
{{- if .Values.aws.auditLogMirrorOnStdout }}
- 'stdout://'
{{- end -}}
{{- end -}}
@@ -49,7 +49,7 @@ auth_service:
{{- end }}
{{- end }}
{{- if .Values.sessionRecording }}
session_recording: {{ .Values.sessionRecording }}
session_recording: {{ .Values.sessionRecording | squote }}
{{- end }}
{{- if .Values.proxyListenerMode }}
proxy_listener_mode: {{ .Values.proxyListenerMode }}
@@ -1,8 +1,14 @@
{{- if .Values.rbac.create -}}
{{- $auth := mustMergeOverwrite (mustDeepCopy .Values) .Values.auth -}}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ .Release.Name }}
labels:
{{- include "teleport-cluster.auth.labels" . | nindent 4 }}
{{- if $auth.extraLabels.clusterRole }}
{{- toYaml $auth.extraLabels.clusterRole | nindent 4 }}
{{- end }}
rules:
- apiGroups:
- ""
@@ -1,9 +1,14 @@
{{- if .Values.rbac.create -}}
{{- $auth := mustMergeOverwrite (mustDeepCopy .Values) .Values.auth -}}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ .Release.Namespace }}-{{ .Release.Name }}
labels: {{- include "teleport-cluster.auth.labels" . | nindent 4 }}
labels:
{{- include "teleport-cluster.auth.labels" . | nindent 4 }}
{{- if $auth.extraLabels.clusterRoleBinding }}
{{- toYaml $auth.extraLabels.clusterRoleBinding | nindent 4 }}
{{- end }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
@@ -19,7 +24,11 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ .Release.Namespace}}-{{ .Release.Name }}-auth
labels: {{- include "teleport-cluster.auth.labels" . | nindent 4 }}
labels:
{{- include "teleport-cluster.auth.labels" . | nindent 4 }}
{{- if $auth.extraLabels.clusterRoleBinding }}
{{- toYaml $auth.extraLabels.clusterRoleBinding | nindent 4 }}
{{- end }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
+13 -1
View File
@@ -5,7 +5,11 @@ kind: ConfigMap
metadata:
name: {{ .Release.Name }}-auth
namespace: {{ .Release.Namespace }}
labels: {{- include "teleport-cluster.auth.labels" . | nindent 4 }}
labels:
{{- include "teleport-cluster.auth.labels" . | nindent 4 }}
{{- if $auth.extraLabels.config }}
{{- toYaml $auth.extraLabels.config | nindent 4 }}
{{- end }}
{{- if $auth.annotations.config }}
annotations: {{- toYaml $auth.annotations.config | nindent 4 }}
{{- end }}
@@ -119,6 +123,14 @@ data:
- read
- update
- delete
- resources:
- node
verbs:
- list
- create
- read
- update
- delete
deny: {}
version: v7
---
@@ -9,6 +9,9 @@ metadata:
labels:
{{- include "teleport-cluster.auth.labels" . | nindent 4 }}
app: {{ .Release.Name }}
{{- if $auth.extraLabels.deployment }}
{{- toYaml $auth.extraLabels.deployment | nindent 4 }}
{{- end }}
{{- if $auth.annotations.deployment }}
annotations: {{- toYaml $auth.annotations.deployment | nindent 4 }}
{{- end }}
@@ -43,6 +46,9 @@ spec:
labels:
{{- include "teleport-cluster.auth.labels" . | nindent 8 }}
app: {{ .Release.Name }}
{{- if $auth.extraLabels.pod }}
{{- toYaml $auth.extraLabels.pod | nindent 8 }}
{{- end }}
{{- if eq $auth.chartMode "azure"}}
azure.workload.identity/use: "true"
{{- end }}
@@ -287,6 +293,9 @@ spec:
{{- end }}
{{- if $auth.priorityClassName }}
priorityClassName: {{ $auth.priorityClassName }}
{{- end }}
{{- if $auth.podSecurityContext }}
securityContext: {{- toYaml $auth.podSecurityContext | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "teleport-cluster.auth.serviceAccountName" . }}
terminationGracePeriodSeconds: {{ $auth.terminationGracePeriodSeconds }}
+5 -1
View File
@@ -9,7 +9,11 @@ kind: PodDisruptionBudget
metadata:
name: {{ .Release.Name }}-auth
namespace: {{ .Release.Namespace }}
labels: {{- include "teleport-cluster.auth.labels" . | nindent 4 }}
labels:
{{- include "teleport-cluster.auth.labels" . | nindent 4 }}
{{- if $auth.extraLabels.podDisruptionBudget }}
{{- toYaml $auth.extraLabels.podDisruptionBudget | nindent 4 }}
{{- end }}
spec:
minAvailable: {{ $auth.highAvailability.podDisruptionBudget.minAvailable }}
selector:
@@ -6,7 +6,11 @@ kind: ConfigMap
metadata:
name: {{ .Release.Name }}-auth-test
namespace: {{ .Release.Namespace }}
labels: {{- include "teleport-cluster.labels" . | nindent 4 }}
labels:
{{- include "teleport-cluster.auth.labels" . | nindent 4 }}
{{- if $auth.extraLabels.config }}
{{- toYaml $auth.extraLabels.config | nindent 4 }}
{{- end }}
annotations:
"helm.sh/hook": pre-install,pre-upgrade
"helm.sh/hook-weight": "4"
@@ -5,7 +5,11 @@ kind: Job
metadata:
name: {{ .Release.Name }}-auth-test
namespace: {{ .Release.Namespace }}
labels: {{- include "teleport-cluster.labels" . | nindent 4 }}
labels:
{{- include "teleport-cluster.labels" . | nindent 4 }}
{{- if $auth.extraLabels.job }}
{{- toYaml $auth.extraLabels.job | nindent 4 }}
{{- end }}
annotations:
"helm.sh/hook": pre-install,pre-upgrade
"helm.sh/hook-weight": "5"
+5 -1
View File
@@ -9,7 +9,11 @@ kind: PersistentVolumeClaim
metadata:
name: {{ .Release.Name }}
namespace: {{ .Release.Namespace }}
labels: {{- include "teleport-cluster.auth.labels" . | nindent 4 }}
labels:
{{- include "teleport-cluster.auth.labels" . | nindent 4 }}
{{- if $auth.extraLabels.persistentVolumeClaim }}
{{- toYaml $auth.extraLabels.persistentVolumeClaim | nindent 4 }}
{{- end }}
spec:
accessModes:
- ReadWriteOnce
@@ -1,9 +1,14 @@
{{- $auth := mustMergeOverwrite (mustDeepCopy .Values) .Values.auth -}}
apiVersion: v1
kind: Service
metadata:
name: {{ include "teleport-cluster.auth.previousVersionServiceName" . }}
namespace: {{ .Release.Namespace }}
labels: {{- include "teleport-cluster.auth.labels" . | nindent 4 }}
labels:
{{- include "teleport-cluster.auth.labels" . | nindent 4 }}
{{- if $auth.extraLabels.service }}
{{- toYaml $auth.extraLabels.service | nindent 4 }}
{{- end }}
spec:
# This is a headless service. Resolving it will return the list of all auth pods running the previous major version
# Proxies should not connect to auth pods from the previous major version
@@ -20,7 +25,11 @@ kind: Service
metadata:
name: {{ include "teleport-cluster.auth.currentVersionServiceName" . }}
namespace: {{ .Release.Namespace }}
labels: {{- include "teleport-cluster.auth.labels" . | nindent 4 }}
labels:
{{- include "teleport-cluster.auth.labels" . | nindent 4 }}
{{- if $auth.extraLabels.service }}
{{- toYaml $auth.extraLabels.service | nindent 4 }}
{{- end }}
spec:
# This is a headless service. Resolving it will return the list of all auth pods running the current major version
clusterIP: "None"
+5 -1
View File
@@ -4,7 +4,11 @@ kind: Service
metadata:
name: {{ include "teleport-cluster.auth.serviceName" . }}
namespace: {{ .Release.Namespace }}
labels: {{- include "teleport-cluster.auth.labels" . | nindent 4 }}
labels:
{{- include "teleport-cluster.auth.labels" . | nindent 4 }}
{{- if $auth.extraLabels.service }}
{{- toYaml $auth.extraLabels.service | nindent 4 }}
{{- end }}
{{- if $auth.annotations.service }}
annotations: {{- toYaml $auth.annotations.service | nindent 4 }}
{{- end }}
@@ -5,6 +5,11 @@ kind: ServiceAccount
metadata:
name: {{ template "teleport-cluster.auth.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "teleport-cluster.auth.labels" . | nindent 4 }}
{{- if $auth.extraLabels.serviceAccount }}
{{- toYaml $auth.extraLabels.serviceAccount | nindent 4 }}
{{- end }}
{{- if or $auth.annotations.serviceAccount $auth.azure.clientID }}
annotations:
{{- if $auth.annotations.serviceAccount }}