apiVersion: networking.k8s.io/v1 kind: Ingress metadata: annotations: cert-manager.io/cluster-issuer: letsencrypt-production-issuer kubernetes.io/ingress.class: traefik traefik.ingress.kubernetes.io/router.entrypoints: websecure traefik.ingress.kubernetes.io/router.tls: "true" name: gitea namespace: gitea spec: rules: - host: git.sapian.cloud http: paths: - backend: service: name: gitea-http port: number: 80 path: / pathType: Prefix - host: gitea.sapian.cloud http: paths: - backend: service: name: gitea-http port: number: 80 path: / pathType: Prefix - host: git.sapian.com.co http: paths: - backend: service: name: gitea-http port: number: 80 path: / pathType: Prefix tls: - hosts: - git.sapian.cloud - git.sapian.com.co - gitea.sapian.cloud secretName: gitea-sapian-cloud-tls-le --- # Note: in a kubernetes secret the string (e.g. generated by htpasswd) must be base64-encoded first. # To create an encoded user:password pair, the following command can be used: # htpasswd -nb user password | openssl base64 apiVersion: v1 kind: Secret metadata: name: sapian-authsecret data: user: |2 c2FwaWFuOiRhcHIxJE1TdlJhL3RTJDV3ak5LdlZ6ekpwRFR5aGppN1J3eDAKCg== --- apiVersion: traefik.containo.us/v1alpha1 kind: Middleware metadata: name: sapian-auth spec: basicAuth: secret: sapian-authsecret