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