apiVersion: v1
kind: Service
metadata:
  name: internal-gateway
  labels:
    app: internal-gateway
  annotations:
    cloud.google.com/load-balancer-type: "Internal"
    networking.gke.io/internal-load-balancer-allow-global-access: "true"
spec:
  ports:
  - name: http
    port: 80
    protocol: TCP
    targetPort: 80
  - name: https
    port: 443
    protocol: TCP
    targetPort: 443
  selector:
    app: internal-gateway
  loadBalancerIP: "{{ global.internal_ip }}"
  # https://kubernetes.io/docs/tutorials/services/source-ip/#source-ip-for-services-with-type-loadbalancer
  externalTrafficPolicy: Local
  type: LoadBalancer
