|
| 1 | +apiVersion: apps/v1 |
| 2 | +kind: Deployment |
| 3 | +metadata: |
| 4 | + labels: |
| 5 | + # Original Helm labels v |
| 6 | + app: {{ template "connector.name" . }} |
| 7 | + component: auth-proxy |
| 8 | + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} |
| 9 | + heritage: {{ .Release.Service }} |
| 10 | + release: {{ .Release.Name }} |
| 11 | + {{- include "connector.labels" . | nindent 4 }} |
| 12 | + name: {{ template "connector.fullname" . }} |
| 13 | + namespace: {{ .Release.Namespace | quote }} |
| 14 | +spec: |
| 15 | + replicas: 1 |
| 16 | + selector: |
| 17 | + matchLabels: |
| 18 | + app: {{ template "connector.name" . }} |
| 19 | + name: {{ template "connector.name" . }} |
| 20 | + component: auth-proxy |
| 21 | + template: |
| 22 | + metadata: |
| 23 | + labels: |
| 24 | + app: {{ template "connector.name" . }} |
| 25 | + name: {{ template "connector.name" . }} |
| 26 | + component: auth-proxy |
| 27 | + spec: |
| 28 | + {{- if .Values.accessTokenSecret }} |
| 29 | + serviceAccountName: {{ template "connector.fullname" . }} |
| 30 | + {{- end }} |
| 31 | + volumes: |
| 32 | + - name: license |
| 33 | + secret: |
| 34 | + secretName: openfaas-license |
| 35 | + {{- if .Values.accessTokenSecret }} |
| 36 | + - name: openfaas-token |
| 37 | + projected: |
| 38 | + sources: |
| 39 | + - serviceAccountToken: |
| 40 | + path: openfaas-token |
| 41 | + expirationSeconds: 7200 |
| 42 | + audience: {{ .Values.gatewayURL }} |
| 43 | + - name: access-token-secret |
| 44 | + secret: |
| 45 | + secretName: {{ .Values.accessTokenSecret }} |
| 46 | + {{- end }} |
| 47 | + {{- if .Values.iam.loginIssuer.clientSecret }} |
| 48 | + - name: oauth-client-secret |
| 49 | + secret: |
| 50 | + secretName: {{ .Values.iam.loginIssuer.clientSecret }} |
| 51 | + {{- end }} |
| 52 | + containers: |
| 53 | + - name: auth-proxy |
| 54 | + image: {{ .Values.image }} |
| 55 | + command: |
| 56 | + - "/usr/bin/proxy" |
| 57 | + - "-license-file=/var/secrets/license/license" |
| 58 | + env: |
| 59 | + - name: "public_url" |
| 60 | + value: {{ .Values.url | quote }} |
| 61 | + - name: gateway_url |
| 62 | + value: {{ .Values.gatewayURL | quote }} |
| 63 | + - name: "debug" |
| 64 | + value: "{{ .Values.logs.debug }}" |
| 65 | + - name: "log_encoding" |
| 66 | + value: "{{ .Values.logs.format }}" |
| 67 | + {{- if .Values.iam.systemIssuer.url }} |
| 68 | + - name: system_issuer |
| 69 | + value: {{ .Values.iam.systemIssuer.url }} |
| 70 | + {{- end }} |
| 71 | + {{- if .Values.iam.loginIssuer.url }} |
| 72 | + - name: login_issuer |
| 73 | + value: {{ .Values.iam.loginIssuer.url }} |
| 74 | + - name: login_issuer_client_id |
| 75 | + value: {{ .Values.iam.loginIssuer.clientId }} |
| 76 | + {{- end }} |
| 77 | + resources: |
| 78 | + {{- .Values.resources | toYaml | nindent 12 }} |
| 79 | + volumeMounts: |
| 80 | + - name: license |
| 81 | + readOnly: true |
| 82 | + mountPath: "/var/secrets/license" |
| 83 | + {{- if .Values.accessTokenSecret }} |
| 84 | + - name: openfaas-token |
| 85 | + readOnly: true |
| 86 | + mountPath: /var/secrets/tokens |
| 87 | + - name: access-token-secret |
| 88 | + readOnly: true |
| 89 | + mountPath: /var/secrets/access_token |
| 90 | + {{- end }} |
| 91 | + {{- if .Values.iam.loginIssuer.clientSecret }} |
| 92 | + - name: oauth-client-secret |
| 93 | + readOnly: true |
| 94 | + mountPath: /var/secrets/oauth |
| 95 | + {{- end }} |
| 96 | + ports: |
| 97 | + - name: http |
| 98 | + containerPort: 8080 |
| 99 | + protocol: TCP |
| 100 | + {{- with .Values.nodeSelector }} |
| 101 | + nodeSelector: |
| 102 | +{{ toYaml . | indent 8 }} |
| 103 | + {{- end }} |
| 104 | + {{- with .Values.affinity }} |
| 105 | + affinity: |
| 106 | +{{ toYaml . | indent 8 }} |
| 107 | + {{- end }} |
| 108 | + {{- with .Values.tolerations }} |
| 109 | + tolerations: |
| 110 | +{{ toYaml . | indent 8 }} |
| 111 | + {{- end }} |
0 commit comments