#
# Service for NGINX Ingress controller.
# This is the only Service that is exposed by a public LoadBalancer.
# Requests get routed by the Ingress controller.
#
apiVersion: v1
kind: Service
metadata:
  name: nginx-ic-internal
  labels:
    app: nginx-ic-internal
    dns: route53
  annotations:
    external-dns.alpha.kubernetes.io/hostname: "elasticsearch.prod-elk.yournetwork.net,kibana.prod-elk.yournetwork.net,grafana.prod-elk.yournetwork.net,*.prod-elk.yournetwork.net"
    service.beta.kubernetes.io/aws-load-balancer-internal: 0.0.0.0/0
    service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http
    service.beta.kubernetes.io/aws-load-balancer-connection-idle-timeout: "900"
    service.beta.kubernetes.io/aws-load-balancer-ssl-ports: https
    service.beta.kubernetes.io/aws-load-balancer-ssl-cert: "arn:aws:acm:us-west-2:700038471469:certificate/b6a2ac6e-8ab3-4e21-94a0-3d5eed075fac"
    service.beta.kubernetes.io/aws-load-balancer-access-log-emit-interval: "5"
    service.beta.kubernetes.io/aws-load-balancer-access-log-enabled: "true"
    service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-name: "prod-elb-logs"
    service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-prefix: prod-elk/main-elb
spec:
  type: LoadBalancer
  selector:
    app: nginx-ic-internal
  ports:
    - name: http
      port: 80
      targetPort: http
    - name: https
      port: 443
      targetPort: http
