apiVersion: v1
kind: Service
metadata:
  name: api
  labels:
    name: api
  annotations:
    service.beta.kubernetes.io/do-loadbalancer-algorithm: 'least_connections'
    service.beta.kubernetes.io/do-loadbalancer-protocol: 'http'
    service.beta.kubernetes.io/do-loadbalancer-healthcheck-path: '/health'
    service.beta.kubernetes.io/do-loadbalancer-tls-ports: '443'
    service.beta.kubernetes.io/do-loadbalancer-certificate-id: 'ce8666ab-f43b-4b4f-bab3-a3fa5e0a0c79'
    service.beta.kubernetes.io/do-loadbalancer-hostname: 'api.shkola.app'
    service.beta.kubernetes.io/do-loadbalancer-redirect-http-to-https: 'false'
    service.beta.kubernetes.io/do-loadbalancer-enable-proxy-protocol: 'false'
spec:
  type: LoadBalancer
  # externalTrafficPolicy: Cluster
  ports:
    - name: http
      port: 80
      targetPort: api-port
    - name: https
      port: 443
      targetPort: api-port
  selector:
    name: api
