Bump teleport to version 15.3.3
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 }}
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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 }}
|
||||
|
||||
@@ -22,7 +22,8 @@ kind: Certificate
|
||||
metadata:
|
||||
name: {{ .Release.Name }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels: {{- include "teleport-cluster.proxy.labels" . | nindent 4 }}
|
||||
labels:
|
||||
{{- include "teleport-cluster.proxy.labels" . | nindent 4 }}
|
||||
spec:
|
||||
secretName: teleport-tls
|
||||
{{- if $proxy.highAvailability.certManager.addCommonName }}
|
||||
@@ -36,8 +37,13 @@ spec:
|
||||
name: {{ required "highAvailability.certManager.issuerName is required in chart values" $proxy.highAvailability.certManager.issuerName }}
|
||||
kind: {{ required "highAvailability.certManager.issuerKind is required in chart values" $proxy.highAvailability.certManager.issuerKind }}
|
||||
group: {{ required "highAvailability.certManager.issuerGroup is required in chart values" $proxy.highAvailability.certManager.issuerGroup }}
|
||||
{{- with $proxy.annotations.certSecret }}
|
||||
{{- if or $proxy.annotations.certSecret $proxy.extraLabels.certSecret }}
|
||||
secretTemplate:
|
||||
{{- with $proxy.annotations.certSecret }}
|
||||
annotations: {{- toYaml . | nindent 6 }}
|
||||
{{- end }}
|
||||
{{- with $proxy.extraLabels.certSecret }}
|
||||
labels: {{- toYaml . | nindent 6 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
@@ -8,6 +8,11 @@ kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-proxy
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "teleport-cluster.proxy.labels" . | nindent 4 }}
|
||||
{{- if $proxy.extraLabels.config }}
|
||||
{{- toYaml $proxy.extraLabels.config | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if $proxy.annotations.config }}
|
||||
annotations: {{- toYaml $proxy.annotations.config | nindent 4 }}
|
||||
{{- end }}
|
||||
|
||||
@@ -13,7 +13,11 @@ kind: Deployment
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-proxy
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels: {{- include "teleport-cluster.proxy.labels" . | nindent 4 }}
|
||||
labels:
|
||||
{{- include "teleport-cluster.proxy.labels" . | nindent 4 }}
|
||||
{{- if $proxy.extraLabels.deployment }}
|
||||
{{- toYaml $proxy.extraLabels.deployment | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if $proxy.annotations.deployment }}
|
||||
annotations: {{- toYaml $proxy.annotations.deployment | nindent 4 }}
|
||||
{{- end }}
|
||||
@@ -49,7 +53,11 @@ spec:
|
||||
{{- if $proxy.annotations.pod }}
|
||||
{{- toYaml $proxy.annotations.pod | nindent 8 }}
|
||||
{{- end }}
|
||||
labels: {{- include "teleport-cluster.proxy.labels" . | nindent 8 }}
|
||||
labels:
|
||||
{{- include "teleport-cluster.proxy.labels" . | nindent 8 }}
|
||||
{{- if $proxy.extraLabels.pod }}
|
||||
{{- toYaml $proxy.extraLabels.pod | nindent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if $proxy.nodeSelector }}
|
||||
nodeSelector: {{- toYaml $proxy.nodeSelector | nindent 8 }}
|
||||
@@ -109,6 +117,17 @@ spec:
|
||||
- wait
|
||||
- no-resolve
|
||||
- '{{ include "teleport-cluster.auth.previousVersionServiceName" . }}.{{ .Release.Namespace }}.svc.cluster.local'
|
||||
# propagating through the limits from the main resources section would double the requested amounts
|
||||
# and may prevent scheduling on the cluster. as such, we hardcode small limits for this tiny container.
|
||||
{{- if $proxy.resources }}
|
||||
resources:
|
||||
requests:
|
||||
cpu: 0.1
|
||||
memory: 256Mi
|
||||
limits:
|
||||
cpu: 1
|
||||
memory: 512Mi
|
||||
{{- end }}
|
||||
{{- if $proxy.securityContext }}
|
||||
securityContext: {{- toYaml $proxy.securityContext | nindent 12 }}
|
||||
{{- end }}
|
||||
@@ -305,6 +324,9 @@ spec:
|
||||
{{- end }}
|
||||
{{- if $proxy.priorityClassName }}
|
||||
priorityClassName: {{ $proxy.priorityClassName }}
|
||||
{{- end }}
|
||||
{{- if $proxy.podSecurityContext }}
|
||||
securityContext: {{- toYaml $proxy.podSecurityContext | nindent 8 }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ include "teleport-cluster.proxy.serviceAccountName" . }}
|
||||
terminationGracePeriodSeconds: {{ $proxy.terminationGracePeriodSeconds }}
|
||||
|
||||
@@ -23,7 +23,11 @@ kind: Ingress
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-proxy
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels: {{- include "teleport-cluster.proxy.labels" . | nindent 4 }}
|
||||
labels:
|
||||
{{- include "teleport-cluster.proxy.labels" . | nindent 4 }}
|
||||
{{- if $proxy.extraLabels.ingress }}
|
||||
{{- toYaml $proxy.extraLabels.ingress | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if $proxy.annotations.ingress }}
|
||||
annotations: {{- toYaml $proxy.annotations.ingress | nindent 4 }}
|
||||
{{- end }}
|
||||
|
||||
@@ -9,7 +9,11 @@ kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-proxy
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels: {{- include "teleport-cluster.proxy.labels" . | nindent 4 }}
|
||||
labels:
|
||||
{{- include "teleport-cluster.proxy.labels" . | nindent 4 }}
|
||||
{{- if $proxy.extraLabels.podDisruptionBudget }}
|
||||
{{- toYaml $proxy.extraLabels.podDisruptionBudget | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
minAvailable: {{ $proxy.highAvailability.podDisruptionBudget.minAvailable }}
|
||||
selector:
|
||||
|
||||
@@ -6,6 +6,11 @@ kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-proxy-test
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "teleport-cluster.proxy.labels" . | nindent 4 }}
|
||||
{{- if $proxy.extraLabels.config }}
|
||||
{{- toYaml $proxy.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 }}-proxy-test
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels: {{- include "teleport-cluster.labels" . | nindent 4 }}
|
||||
labels:
|
||||
{{- include "teleport-cluster.proxy.labels" . | nindent 4 }}
|
||||
{{- if $proxy.extraLabels.job }}
|
||||
{{- toYaml $proxy.extraLabels.job | nindent 4 }}
|
||||
{{- end }}
|
||||
annotations:
|
||||
"helm.sh/hook": pre-install,pre-upgrade
|
||||
"helm.sh/hook-weight": "5"
|
||||
|
||||
@@ -1,66 +0,0 @@
|
||||
{{- $proxy := mustMergeOverwrite (mustDeepCopy .Values) .Values.proxy -}}
|
||||
{{- $backendProtocol := ternary "ssl" "tcp" (hasKey $proxy.annotations.service "service.beta.kubernetes.io/aws-load-balancer-ssl-cert") -}}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-lb
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels: {{- include "teleport-cluster.proxy.labels" . | nindent 4 }}
|
||||
{{- if (or ($proxy.annotations.service) (eq $proxy.chartMode "aws")) }}
|
||||
annotations:
|
||||
{{- if and (eq $proxy.chartMode "aws") (not $proxy.ingress.enabled) }}
|
||||
{{- if not (hasKey $proxy.annotations.service "service.beta.kubernetes.io/aws-load-balancer-backend-protocol")}}
|
||||
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: {{ $backendProtocol }}
|
||||
{{- end }}
|
||||
{{- if not (or (hasKey $proxy.annotations.service "service.beta.kubernetes.io/aws-load-balancer-cross-zone-load-balancing-enabled") (hasKey $proxy.annotations.service "service.beta.kubernetes.io/aws-load-balancer-attributes"))}}
|
||||
service.beta.kubernetes.io/aws-load-balancer-cross-zone-load-balancing-enabled: "true"
|
||||
{{- end }}
|
||||
{{- if not (hasKey $proxy.annotations.service "service.beta.kubernetes.io/aws-load-balancer-type")}}
|
||||
service.beta.kubernetes.io/aws-load-balancer-type: nlb
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if $proxy.annotations.service }}
|
||||
{{- toYaml $proxy.annotations.service | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
type: "LoadBalancer"
|
||||
{{- with $proxy.service.spec }}
|
||||
{{- toYaml . | nindent 2 }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: tls
|
||||
port: 443
|
||||
targetPort: 3080
|
||||
protocol: TCP
|
||||
{{- if ne $proxy.proxyListenerMode "multiplex" }}
|
||||
- name: sshproxy
|
||||
port: 3023
|
||||
targetPort: 3023
|
||||
protocol: TCP
|
||||
- name: k8s
|
||||
port: 3026
|
||||
targetPort: 3026
|
||||
protocol: TCP
|
||||
- name: sshtun
|
||||
port: 3024
|
||||
targetPort: 3024
|
||||
protocol: TCP
|
||||
- name: mysql
|
||||
port: 3036
|
||||
targetPort: 3036
|
||||
protocol: TCP
|
||||
{{- if $proxy.separatePostgresListener }}
|
||||
- name: postgres
|
||||
port: 5432
|
||||
targetPort: 5432
|
||||
protocol: TCP
|
||||
{{- end }}
|
||||
{{- if $proxy.separateMongoListener }}
|
||||
- name: mongo
|
||||
port: 27017
|
||||
targetPort: 27017
|
||||
protocol: TCP
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
selector: {{- include "teleport-cluster.proxy.selectorLabels" . | nindent 4 }}
|
||||
@@ -9,7 +9,11 @@ kind: Service
|
||||
metadata:
|
||||
name: {{ .Release.Name }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels: {{- include "teleport-cluster.proxy.labels" . | nindent 4 }}
|
||||
labels:
|
||||
{{- include "teleport-cluster.proxy.labels" . | nindent 4 }}
|
||||
{{- if $proxy.extraLabels.service }}
|
||||
{{- toYaml $proxy.extraLabels.service | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if (or ($proxy.annotations.service) (eq $proxy.chartMode "aws")) }}
|
||||
annotations:
|
||||
{{- if and (eq $proxy.chartMode "aws") (not $proxy.ingress.enabled) }}
|
||||
|
||||
@@ -5,6 +5,11 @@ kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ include "teleport-cluster.proxy.serviceAccountName" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "teleport-cluster.proxy.labels" . | nindent 4 }}
|
||||
{{- if $proxy.extraLabels.serviceAccount }}
|
||||
{{- toYaml $proxy.extraLabels.serviceAccount | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if $proxy.annotations.serviceAccount }}
|
||||
annotations: {{- toYaml $proxy.annotations.serviceAccount | nindent 4 }}
|
||||
{{- end -}}
|
||||
|
||||
Reference in New Issue
Block a user