mirror of
https://github.com/gravitational/teleport.git
synced 2026-11-02 23:31:08 +08:00
44 lines
1.3 KiB
YAML
44 lines
1.3 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
namespace: agents
|
|
name: {{ .Release.Name }}
|
|
spec:
|
|
replicas: {{ .Values.replicaCount }}
|
|
minReadySeconds: {{ .Values.minReadySeconds }}
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: {{ .Release.Name }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: {{ .Release.Name }}
|
|
spec:
|
|
serviceAccountName: {{ .Release.Name }}
|
|
containers:
|
|
{{- range $i, $_ := until (int .Values.agentsPerPod) }}
|
|
{{- $id := printf "%02d" $i }}
|
|
- image: "{{ $.Values.image.repository }}:{{ default $.Chart.AppVersion $.Values.image.tag }}"
|
|
name: agent-{{ $id }}
|
|
command: ["bash", "/etc/teleport-config/entrypoint.sh"]
|
|
env:
|
|
- name: REPLICA
|
|
value: "{{ $id }}"
|
|
volumeMounts:
|
|
- mountPath: /etc/teleport-config
|
|
name: config
|
|
readOnly: true
|
|
resources: {{- toYaml $.Values.resources | nindent 12 }}
|
|
{{- end }}
|
|
volumes:
|
|
- configMap:
|
|
name: {{ .Release.Name }}
|
|
defaultMode: 0766
|
|
name: config
|
|
{{- if .Values.tolerations }}
|
|
tolerations: {{ toYaml .Values.tolerations | nindent 8}}
|
|
{{- end }}
|
|
{{- if .Values.affinity }}
|
|
affinity: {{ toYaml .Values.affinity | nindent 8}}
|
|
{{- end }}
|