Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on using cross namespace tls secret. #1024

Open
a180285 opened this issue Sep 21, 2023 · 2 comments
Open

Error on using cross namespace tls secret. #1024

a180285 opened this issue Sep 21, 2023 · 2 comments

Comments

@a180285
Copy link

a180285 commented Sep 21, 2023

Description of the problem

I want to reuse a tls secret from another namespace, instead of copy tls to new namespaces.

But when I try to create following ingress. I got an Error

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: test
  namespace: default
spec:
  tls:
    - hosts:
        - test.abc.com
      secretName: ns1/abc.com-tls
  rules:
    - host: test.abc.com
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: test
                port:
                  number: 80
The Ingress "test" is invalid: spec.tls[0].secretName: Invalid value: "ns1/abc.com-tls": a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')

Environment information

HAProxy Ingress version: v0.14.4
k8s version: 1.25.2

Command-line options:

      image: quay.io/jcmoraisjr/haproxy-ingress:v0.14.4
      args:
        - '--configmap=ingress-controller-80/haproxy-ingress-80'
        - '--ingress-class=haproxy-80'
        - '--sort-backends'
        - '--allow-cross-namespace=true'
@a180285
Copy link
Author

a180285 commented Oct 4, 2023

@jcmoraisjr Could you help give some tips on how to using secrets in other namespace. Does Haproxy-ingress support it. I read the doc, But didn't find more useful doc on how to use secrets in other namespace.

@jcmoraisjr
Copy link
Owner

This is a limitation added on ingress v1, unfortunately, which didn't exist in v1beta1, hence the current docs suggesting it. Maybe we need to add some config that allows one to assign hostnames and secrets in a more global way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants