| 
 | 1 | +---  | 
 | 2 | +apiVersion: apps/v1  | 
 | 3 | +kind: Deployment  | 
 | 4 | +metadata:  | 
 | 5 | +  name: coturn-pgbouncer  | 
 | 6 | +  labels:  | 
 | 7 | +    app: coturn-pgbouncer  | 
 | 8 | +spec:  | 
 | 9 | +  replicas: {{ .Values.coturn.pgbouncer.replicas }}  | 
 | 10 | +  selector:  | 
 | 11 | +    matchLabels:  | 
 | 12 | +      app: coturn-pgbouncer  | 
 | 13 | +  template:  | 
 | 14 | +    metadata:  | 
 | 15 | +      labels:  | 
 | 16 | +        app: coturn-pgbouncer  | 
 | 17 | +    spec:  | 
 | 18 | +      containers:  | 
 | 19 | +      - name: pgbouncer  | 
 | 20 | +        mage: {{ .Values.coturn.pgbouncer.image.repository }}:{{ .Values.coturn.pgbouncer.image.tag }}  | 
 | 21 | +        imagePullPolicy: {{ .Values.coturn.pgbouncer.image.pullPolicy }}  | 
 | 22 | +        resources:  | 
 | 23 | +          {{ toYaml .Values.coturn.pgbouncer.resources | nindent 10 }}  | 
 | 24 | +        env:  | 
 | 25 | +          - name: PGBOUNCER_PORT  | 
 | 26 | +            value: "5432"  | 
 | 27 | +          - name: POSTGRESQL_HOST  | 
 | 28 | +            value: {{ .Values.coturn.postgres.host | quote }}  | 
 | 29 | +          - name: PGBOUNCER_DATABASE  | 
 | 30 | +            value: {{ .Values.coturn.postgres.dbname | quote }}  | 
 | 31 | +          - name: POSTGRESQL_USERNAME  | 
 | 32 | +            value: {{ .Values.coturn.postgres.user | quote }}  | 
 | 33 | +          - name: POSTGRESQL_PASSWORD  | 
 | 34 | +            value: {{ .Values.coturn.postgres.password | quote }}  | 
 | 35 | +          - name: PGBOUNCER_AUTH_TYPE  | 
 | 36 | +            value: {{ .Values.coturn.pgbouncer.authType | quote }}  | 
 | 37 | +          - name: PGBOUNCER_MAX_CLIENT_CONN  | 
 | 38 | +            value: {{ .Values.coturn.pgbouncer.maxClientConn | quote }}  | 
 | 39 | +          - name: PGBOUNCER_DEFAULT_POOL_SIZE  | 
 | 40 | +            value: {{ .Values.coturn.pgbouncer.poolSize | quote }}  | 
 | 41 | +          - name: PGBOUNCER_POOL_MODE  | 
 | 42 | +            value: {{ .Values.coturn.pgbouncer.poolMode | quote }}  | 
 | 43 | +        ports:  | 
 | 44 | +          - containerPort: 5432  | 
 | 45 | +            name: pgbouncer  | 
 | 46 | +            protocol: TCP  | 
 | 47 | +      {{- if .Values.coturn.pgbouncer.nodeSelector }}  | 
 | 48 | +      nodeSelector:  | 
 | 49 | +        {{ toYaml .Values.coturn.pgbouncer.nodeSelector | nindent 8 }}  | 
 | 50 | +      {{- end }}  | 
 | 51 | +      {{- if .Values.coturn.pgbouncer.tolerations }}  | 
 | 52 | +      tolerations:  | 
 | 53 | +        {{ toYaml .Values.coturn.pgbouncer.tolerations | nindent 8 }}  | 
 | 54 | +      {{- end }}  | 
 | 55 | +      {{- if .Values.coturn.pgbouncer.affinity }}  | 
 | 56 | +      affinity:  | 
 | 57 | +        {{ toYaml .Values.coturn.pgbouncer.affinity | nindent 8 }}  | 
 | 58 | +      {{- end }}  | 
 | 59 | +      terminationGracePeriodSeconds: 10  | 
0 commit comments