|
| 1 | +{{/* |
| 2 | +Deployment template |
| 3 | +*/}} |
| 4 | +{{- define "codefresh-tunnel-client.deployment" -}} |
| 5 | +apiVersion: apps/v1 |
| 6 | +kind: Deployment |
| 7 | +metadata: |
| 8 | + name: {{ include "codefresh-tunnel-client.name" . }} |
| 9 | + labels: |
| 10 | + {{- include "codefresh-tunnel-client.labels" . | nindent 4 }} |
| 11 | + annotations: |
| 12 | + checksum/config: {{ include "codefresh-tunnel-client.config" . | sha256sum }} |
| 13 | +spec: |
| 14 | + replicas: 1 |
| 15 | + selector: |
| 16 | + matchLabels: |
| 17 | + {{- include "codefresh-tunnel-client.selectorLabels" . | nindent 6 }} |
| 18 | + template: |
| 19 | + metadata: |
| 20 | + {{- with .Values.podAnnotations }} |
| 21 | + annotations: |
| 22 | + {{- toYaml . | nindent 8 }} |
| 23 | + {{- end }} |
| 24 | + labels: |
| 25 | + {{- include "codefresh-tunnel-client.selectorLabels" . | nindent 8 }} |
| 26 | + spec: |
| 27 | + {{- with .Values.imagePullSecrets }} |
| 28 | + imagePullSecrets: |
| 29 | + {{- toYaml . | nindent 8 }} |
| 30 | + {{- end }} |
| 31 | + serviceAccountName: {{ include "codefresh-tunnel-client.serviceAccountName" . }} |
| 32 | + securityContext: |
| 33 | + {{- toYaml .Values.podSecurityContext | nindent 8 }} |
| 34 | + containers: |
| 35 | + - name: tunnel-client |
| 36 | + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" |
| 37 | + env: |
| 38 | + - name: AUTHORIZATION |
| 39 | + valueFrom: |
| 40 | + secretKeyRef: |
| 41 | + name: {{ .Values.tunnelServer.authorization.secretKeyRef.name }} |
| 42 | + key: {{ .Values.tunnelServer.authorization.secretKeyRef.key }} |
| 43 | + optional: false |
| 44 | + {{- with .Values.env -}} |
| 45 | + {{ . | toYaml | nindent 10 }} |
| 46 | + {{- end }} |
| 47 | + imagePullPolicy: {{ .Values.image.pullPolicy }} |
| 48 | + resources: |
| 49 | + {{- toYaml .Values.resources | nindent 12 }} |
| 50 | + volumeMounts: |
| 51 | + - mountPath: /etc/frp |
| 52 | + name: client-config |
| 53 | + volumes: |
| 54 | + - name: client-config |
| 55 | + projected: |
| 56 | + sources: |
| 57 | + - configMap: |
| 58 | + name: codefresh-tunnel-client-config |
| 59 | + optional: false |
| 60 | + items: |
| 61 | + - key: frpc.ini |
| 62 | + path: frpc.ini |
| 63 | + {{- with .Values.nodeSelector | default .Values.global.nodeSelector }} |
| 64 | + nodeSelector: {{ toYaml . | nindent 8 }} |
| 65 | + {{- end }} |
| 66 | + {{- with .Values.tolerations | default .Values.global.tolerations}} |
| 67 | + tolerations: {{ toYaml . | nindent 6 }} |
| 68 | + {{- end }} |
| 69 | + {{- with .Values.affinity }} |
| 70 | + affinity: {{ toYaml . | nindent 8 }} |
| 71 | + {{- end }} |
| 72 | +{{- end }} |
0 commit comments