apiVersion: v1
kind: Service
metadata:
  annotations:
    service.beta.kubernetes.io/aws-load-balancer-connection-idle-timeout: "600"
    # TODO add security groups
    service.beta.kubernetes.io/aws-load-balancer-extra-security-groups: "sg-...,sg-...,sg-..."
    # TODO alter domain
    external-dns.alpha.kubernetes.io/hostname: "flyteadmin.subdomain.mydomain.com"
  name: flyteadmin
  namespace: flyte
spec:
  loadBalancerSourceRanges:
    # TODO change source ip range if desired
    - 0.0.0.0
  ports:
    # TODO do multiple ports work for ELB
    - name: http
      port: 80
      protocol: TCP
      targetPort: 8088
    - name: grpc
      port: 80
      protocol: TCP
      targetPort: 8089
  selector:
    app: flyteadmin
  type: LoadBalancer
