Collectd operator utilties
[demo.git] / vnfs / DAaaS / deploy / 00-init / gloo / templates / 8-gateway-proxy-service.yaml
1 {{- if .Values.gateway.enabled }}
2 {{- range $key, $spec := .Values.gatewayProxies }}
3 ---
4 apiVersion: v1
5 kind: Service
6 metadata:
7   labels:
8     app: gloo
9     gloo: {{ $key }}
10   name: {{ $key }}
11   namespace: {{ $.Release.Namespace }}
12   {{- with $spec.service.extraAnnotations }}
13   annotations:
14 {{toYaml  . | indent 8}}{{- end }}
15 spec:
16   ports:
17   - port: {{ $spec.service.httpPort }}
18     targetPort: {{ $spec.deployment.httpPort }}
19     protocol: TCP
20     name: http
21   - port: {{ $spec.service.httpsPort }}
22     targetPort: {{ $spec.deployment.httpsPort }}
23     protocol: TCP
24     name: https
25   selector:
26     gloo: {{ $key }}
27   type: {{ $spec.service.type }}
28   {{- if and (eq $spec.service.type "ClusterIP") $spec.service.clusterIP }}
29   clusterIP: {{ $spec.service.clusterIP }}
30   {{- end }}
31   {{- if and (eq $spec.service.type "LoadBalancer") $spec.service.loadBalancerIP }}
32   loadBalancerIP: {{ $spec.service.loadBalancerIP }}
33   {{- end }}
34 {{- end }}
35 {{- end }}