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

Better handle multiple hostnames in synchronized Ingress #76

Open
axisofentropy opened this issue Nov 17, 2023 · 0 comments
Open

Better handle multiple hostnames in synchronized Ingress #76

axisofentropy opened this issue Nov 17, 2023 · 0 comments

Comments

@axisofentropy
Copy link
Member

Builds upon #42

Just now I tested an Ingress for @copytesting that had multiple hostnames. Our plugin dutifully changed all of them... to the same value. This could probably be improved by making each one unique in some way, preferably using some part of the initially specified hostname.

Example to test:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  annotations:
    cert-manager.io/cluster-issuer: letsencrypt
    kubernetes.io/tls-acme: "true"
    nginx.ingress.kubernetes.io/proxy-body-size: 100m
    nginx.ingress.kubernetes.io/proxy-read-timeout: "180"
  name: ship-too
  namespace: app
spec:
  ingressClassName: uffizzi
  rules:
  - host: demo
    http:
      paths:
      - backend:
          service:
            name: web
            port:
              number: 80
        path: /
        pathType: Prefix
  - host: demo-api
    http:
      paths:
      - backend:
          service:
            name: api
            port:
              number: 80
        path: /
        pathType: Prefix

Our plugin changed it to this:

spec:
  ingressClassName: uffizzi
  rules:
  - host: ship-too-app-pr-3426-c2021.uclusters.app.uffizzi.com
    http:
      paths:
      - backend:
          service:
            name: web
            port:
              number: 80
        path: /
        pathType: Prefix
  - host: ship-too-app-pr-3426-c2021.uclusters.app.uffizzi.com
    http:
      paths:
      - backend:
          service:
            name: api
            port:
              number: 80
        path: /
        pathType: Prefix

If each of those hostnames were unique, I think that would be an improvement.

Workaround

Splitting this Ingress up into multiple Ingresses would probably Work without modifying our plugin. We may end up doing this for this client so I'm not sure of the urgency here.

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

No branches or pull requests

1 participant