|
| 1 | +apiVersion: apps/v1 |
| 2 | +kind: Deployment |
| 3 | +metadata: |
| 4 | + labels: |
| 5 | + app: {{ template "connector.name" . }} |
| 6 | + component: gcp-pubsub-connector |
| 7 | + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} |
| 8 | + heritage: {{ .Release.Service }} |
| 9 | + release: {{ .Release.Name }} |
| 10 | + app.kubernetes.io/name: {{ template "connector.name" . }} |
| 11 | + app.kubernetes.io/instance: {{ .Release.Name }} |
| 12 | + app.kubernetes.io/version: {{ .Chart.Version }} |
| 13 | + app.kubernetes.io/component: gcp-pubsub-connector |
| 14 | + app.kubernetes.io/part-of: openfaas |
| 15 | + app.kubernetes.io/managed-by: {{ .Release.Service }} |
| 16 | + helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} |
| 17 | + name: {{ template "connector.fullname" . }} |
| 18 | + namespace: {{ .Release.Namespace | quote }} |
| 19 | +spec: |
| 20 | + replicas: {{ .Values.replicas }} |
| 21 | + selector: |
| 22 | + matchLabels: |
| 23 | + app: {{ template "connector.name" . }} |
| 24 | + component: gcp-pubsub-connector |
| 25 | + |
| 26 | + template: |
| 27 | + metadata: |
| 28 | + annotations: |
| 29 | + prometheus.io/scrape: "false" |
| 30 | + labels: |
| 31 | + app: {{ template "connector.name" . }} |
| 32 | + component: gcp-pubsub-connector |
| 33 | + spec: |
| 34 | + volumes: |
| 35 | + - name: openfaas-license |
| 36 | + secret: |
| 37 | + secretName: openfaas-license |
| 38 | + {{- if .Values.basic_auth }} |
| 39 | + - name: auth |
| 40 | + secret: |
| 41 | + secretName: basic-auth |
| 42 | + {{- end }} |
| 43 | + {{- if .Values.gcpCredentialsSecret }} |
| 44 | + - name: gcp-pubsub-credentials |
| 45 | + secret: |
| 46 | + secretName: {{ .Values.gcpCredentialsSecret }} |
| 47 | + {{- end }} |
| 48 | + containers: |
| 49 | + - name: connector |
| 50 | + image: {{ .Values.image }} |
| 51 | + command: |
| 52 | + - "/usr/bin/connector" |
| 53 | + - "-license-file=/var/secrets/license/license" |
| 54 | + env: |
| 55 | + - name: gateway_url |
| 56 | + value: {{ .Values.gatewayURL | quote }} |
| 57 | + - name: print_response |
| 58 | + value: {{ .Values.printResponse | quote }} |
| 59 | + - name: print_response_body |
| 60 | + value: {{ .Values.printResponseBody | quote }} |
| 61 | + - name: print_request_body |
| 62 | + value: {{ .Values.printRequestBody | quote }} |
| 63 | + - name: asynchronous_invocation |
| 64 | + value: {{ .Values.asyncInvocation | quote }} |
| 65 | + - name: project_id |
| 66 | + value: {{ .Values.projectID | quote }} |
| 67 | + - name: subscriptions |
| 68 | + value: {{ .Values.subscriptions | toJson | quote }} |
| 69 | + {{- if .Values.basic_auth }} |
| 70 | + - name: basic_auth |
| 71 | + value: "true" |
| 72 | + - name: secret_mount_path |
| 73 | + value: "/var/secrets" |
| 74 | + {{- end }} |
| 75 | + {{- if .Values.upstreamTimeout }} |
| 76 | + - name: upstream_timeout |
| 77 | + value: {{ .Values.upstreamTimeout | quote }} |
| 78 | + {{- end }} |
| 79 | + {{- if .Values.rebuildInterval }} |
| 80 | + - name: rebuild_interval |
| 81 | + value: {{ .Values.rebuildInterval | quote }} |
| 82 | + {{- end }} |
| 83 | + - name: content_type |
| 84 | + value: {{ .Values.contentType | quote }} |
| 85 | + - name: "debug" |
| 86 | + value: "{{ .Values.logs.debug }}" |
| 87 | + - name: "log_encoding" |
| 88 | + value: "{{ .Values.logs.format }}" |
| 89 | + {{- if .Values.gcpCredentialsSecret }} |
| 90 | + - name: GOOGLE_APPLICATION_CREDENTIALS |
| 91 | + value: /var/secrets/gcp-pubsub-credentials/gcp-pubsub-credentials |
| 92 | + {{- end}} |
| 93 | + resources: |
| 94 | + {{- .Values.resources | toYaml | nindent 12 }} |
| 95 | + |
| 96 | + {{- if .Values.securityContext }} |
| 97 | + securityContext: |
| 98 | + {{- toYaml .Values.securityContext | nindent 12 }} |
| 99 | + {{- end }} |
| 100 | + volumeMounts: |
| 101 | + - name: openfaas-license |
| 102 | + readOnly: true |
| 103 | + mountPath: "/var/secrets/license" |
| 104 | + {{- if .Values.basic_auth }} |
| 105 | + - name: auth |
| 106 | + readOnly: true |
| 107 | + mountPath: "/var/secrets" |
| 108 | + {{- end }} |
| 109 | + {{- if .Values.gcpCredentialsSecret }} |
| 110 | + - name: gcp-pubsub-credentials |
| 111 | + readOnly: true |
| 112 | + mountPath: "/var/secrets/gcp-pubsub-credentials" |
| 113 | + {{- end }} |
| 114 | + |
| 115 | + {{- with .Values.nodeSelector }} |
| 116 | + nodeSelector: |
| 117 | +{{ toYaml . | indent 8 }} |
| 118 | + {{- end }} |
| 119 | + {{- with .Values.affinity }} |
| 120 | + affinity: |
| 121 | +{{ toYaml . | indent 8 }} |
| 122 | + {{- end }} |
| 123 | + {{- with .Values.tolerations }} |
| 124 | + tolerations: |
| 125 | +{{ toYaml . | indent 8 }} |
| 126 | + {{- end }} |
0 commit comments