apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: code-server-ingress
  namespace: code-server
  annotations:
    cert-manager.io/cluster-issuer: "letsencrypt-prod"
    traefik.ingress.kubernetes.io/router.middlewares: authelia-authelia-auth@kubernetescrd
spec:
  ingressClassName: traefik
  tls:
  - hosts:
    - vscode0213.kro.kr
    - www.vscode0213.kro.kr
    secretName: code-server-tls
  rules:
    - host: vscode0213.kro.kr
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: code-server
                port:
                  number: 8080
    - host: www.vscode0213.kro.kr
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: code-server
                port:
                  number: 8080
