Collectd operator utilties
[demo.git] / vnfs / DAaaS / deploy / 00-init / gloo / templates / 7-gateway-proxy-deployment.yaml
1 {{- if .Values.gateway.enabled }}
2 {{- range $key, $spec := .Values.gatewayProxies }}
3 ---
4 apiVersion: extensions/v1beta1
5 kind: Deployment
6 metadata:
7   labels:
8     app: gloo
9     gloo: {{ $key }}
10   name: {{ $key }}
11   namespace: {{ $.Release.Namespace }}
12 spec:
13   replicas: {{ $spec.deployment.replicas }}
14   selector:
15     matchLabels:
16       gloo: {{ $key }}
17   template:
18     metadata:
19       labels:
20         gloo: {{ $key }}
21 {{- with $spec.deployment.extraAnnotations }}
22       annotations:
23 {{toYaml  . | indent 8}}{{- end }}
24     spec:
25       containers:
26       - args: ["--disable-hot-restart"]
27         env:
28         - name: POD_NAMESPACE
29           valueFrom:
30             fieldRef:
31               fieldPath: metadata.namespace
32         - name: POD_NAME
33           valueFrom:
34             fieldRef:
35               fieldPath: metadata.name
36         image: {{ $spec.deployment.image.repository }}:{{ $spec.deployment.image.tag }}
37         imagePullPolicy: {{ $spec.deployment.image.pullPolicy }}
38         name: gateway-proxy
39         securityContext:
40           readOnlyRootFilesystem: true
41           allowPrivilegeEscalation: false
42           capabilities:
43             drop:
44             - ALL
45             add:
46             - NET_BIND_SERVICE
47         ports:
48         - containerPort: {{ $spec.deployment.httpPort }}
49           name: http
50           protocol: TCP
51         - containerPort: {{ $spec.deployment.httpsPort }}
52           name: https
53           protocol: TCP
54 {{- with $spec.deployment.extraPorts }}
55 {{toYaml  . | indent 8}}{{- end }}
56         volumeMounts:
57         - mountPath: /etc/envoy
58           name: envoy-config
59       {{- if $spec.deployment.image.pullSecret }}
60       imagePullSecrets:
61         - name: {{ $spec.deployment.image.pullSecret }}{{end}}
62       volumes:
63       - configMap:
64           name: {{ $key }}-envoy-config
65         name: envoy-config
66 {{- end }}
67 {{- end }}