123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- # Copyright (c) 2020 TriggerMesh Inc.
- #
- # Licensed under the Apache License, Version 2.0 (the "License");
- # you may not use this file except in compliance with the License.
- # You may obtain a copy of the License at
- #
- # http://www.apache.org/licenses/LICENSE-2.0
- #
- # Unless required by applicable law or agreed to in writing, software
- # distributed under the License is distributed on an "AS IS" BASIS,
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- # See the License for the specific language governing permissions and
- # limitations under the License.
- apiVersion: apps/v1
- kind: Deployment
- metadata:
- name: {{ include "aws-event-sources.fullname" . }}-controller
- labels:
- {{- include "aws-event-sources.labels" . | nindent 4 }}
- spec:
- replicas: 1
- selector:
- matchLabels:
- {{- include "aws-event-sources.selectorLabels" . | nindent 6}}
- template:
- metadata:
- labels:
- {{- include "aws-event-sources.labels" . | nindent 8 }}
- {{- with .Values.podAnnotations }}
- annotations:
- {{- toYaml . | nindent 8 }}
- {{- end }}
- spec:
- {{- with .Values.imagePullSecrets }}
- imagePullSecrets:
- {{- toYaml . | nindent 8 }}
- {{- end }}
- serviceAccountName: {{ template "aws-event-sources.serviceAccountName" . }}
- securityContext:
- {{- toYaml .Values.podSecurityContext | nindent 8 }}
- containers:
- - name: controller
- image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag }}"
- imagePullPolicy: {{ .Values.image.pullPolicy}}
- terminationMessagePolicy: FallbackToLogsOnError
- env:
- - name: SYSTEM_NAMESPACE
- valueFrom:
- fieldRef:
- fieldPath: metadata.namespace
- # Logging/observability configuration
- - name: CONFIG_LOGGING_NAME
- value: config-logging
- - name: CONFIG_OBSERVABILITY_NAME
- value: config-observability
- - name: METRICS_DOMAIN
- value: triggermesh.io/sources
- # Global settings
- - name: KNATIVE_URL_SCHEME
- value: {{ .Values.knative.urlScheme }}
- - name: KNATIVE_DOMAIN
- value: {{ .Values.knative.domain }}
- # Source adapters
- - name: AWSCODECOMMITSOURCE_IMAGE
- value: "{{ .Values.image.registry }}/{{ .Values.adapters.awscodecommit.repository }}:{{ default .Values.image.tag .Values.adapters.awscodecommit.tag }}"
- - name: AWSCOGNITOIDENTITYSOURCE_IMAGE
- value: "{{ .Values.image.registry }}/{{ .Values.adapters.awscognitoidentity.repository }}:{{ default .Values.image.tag .Values.adapters.awscognitoidentity.tag }}"
- - name: AWSCOGNITOUSERPOOLSOURCE_IMAGE
- value: "{{ .Values.image.registry }}/{{ .Values.adapters.awscognitouserpool.repository }}:{{ default .Values.image.tag .Values.adapters.awscognitouserpool.tag }}"
- - name: AWSDYNAMODBSOURCE_IMAGE
- value: "{{ .Values.image.registry }}/{{ .Values.adapters.awsdynamodb.repository }}:{{ default .Values.image.tag .Values.adapters.awsdynamodb.tag }}"
- - name: AWSKINESISSOURCE_IMAGE
- value: "{{ .Values.image.registry }}/{{ .Values.adapters.awskinesis.repository }}:{{ default .Values.image.tag .Values.adapters.awskinesis.tag }}"
- - name: AWSSNSSOURCE_IMAGE
- value: "{{ .Values.image.registry }}/{{ .Values.adapters.awssns.repository }}:{{ default .Values.image.tag .Values.adapters.awssns.tag }}"
- - name: AWSSQSSOURCE_IMAGE
- value: "{{ .Values.image.registry }}/{{ .Values.adapters.awssqs.repository }}:{{ default .Values.image.tag .Values.adapters.awssqs.tag }}"
- ports:
- - name: metrics
- containerPort: 9090
- - name: profiling
- containerPort: 8008
- securityContext:
- allowPrivilegeEscalation: false
- {{- with .Values.securityContext }}
- {{- toYaml . | nindent 12 }}
- {{- end }}
- resources:
- {{- toYaml .Values.resources | nindent 12 }}
- {{- with .Values.nodeSelector }}
- nodeSelector:
- {{- toYaml . | nindent 8 }}
- {{- end }}
- {{- with .Values.affinity }}
- affinity:
- {{- toYaml . | nindent 8 }}
- {{- end }}
- {{- with .Values.tolerations }}
- tolerations:
- {{- toYaml . | nindent 8 }}
- {{- end }}
|