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

feat: Support multiple hostnames in ingress definitions #409

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

frankjkelly
Copy link
Contributor

@frankjkelly frankjkelly commented Nov 20, 2023

Motivation

Modifications

  • Because the number of changes was significant with a high likelihood of breaking backwards compatibility I decided to add a new ingress definition template file and the choice as to which to use is based on whether the user uses the old
    .hostname definition or the new .hosts (array of objects)

Verifying this change

  • Make sure that the change passes the CI checks.

NOTE: Testing locally in Minikube using settings such as

      ingress:
        enabled: true
        tls:
          enabled: true
        hosts:
        - host: one.saas-dev.cogitocorp.us
          excludePaths: []
          includePaths: []
          tls:
            enabled: true
            secretName: secret-one
        - host: two.saas-dev.cogitocorp.us
          excludePaths: []
          includePaths: []
          tls:
            enabled: true
            secretName: secret-two

Creates the following

kubectl get ingress
NAME                    CLASS    HOSTS                                                   ADDRESS   PORTS     AGE
pulsar-dashboard        <none>   one.saas-dev.cogitocorp.us,two.saas-dev.cogitocorp.us             80, 443   4m
pulsar-proxy            <none>   one.saas-dev.cogitocorp.us,two.saas-dev.cogitocorp.us             80, 443   4m
pulsar-pulsar-manager   <none>   one.saas-dev.cogitocorp.us,two.saas-dev.cogitocorp.us             80, 443   4m

and also

kubectl get ingress pulsar-proxy -o yaml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  annotations:
    meta.helm.sh/release-name: pulsar
    meta.helm.sh/release-namespace: cogito
  creationTimestamp: "2023-11-21T15:20:29Z"
  generation: 1
  labels:
    app: pulsar
    app.kubernetes.io/managed-by: Helm
    chart: pulsar-3.1.1
    cluster: pulsar
    component: proxy
    heritage: Helm
    release: pulsar
  name: pulsar-proxy
  namespace: cogito
  resourceVersion: "801"
  uid: 0a3ef2c4-4653-4cfa-bd70-58adce1fdf72
spec:
  rules:
  - host: one.saas-dev.cogitocorp.us
    http:
      paths:
      - backend:
          service:
            name: pulsar-proxy
            port:
              number: 443
        path: /
        pathType: ImplementationSpecific
  - host: two.saas-dev.cogitocorp.us
    http:
      paths:
      - backend:
          service:
            name: pulsar-proxy
            port:
              number: 443
        path: /
        pathType: ImplementationSpecific
  tls:
  - hosts:
    - one.saas-dev.cogitocorp.us
    secretName: secret-one
  - hosts:
    - two.saas-dev.cogitocorp.us
    secretName: secret-two
status:
  loadBalancer: {}

@frankjkelly frankjkelly changed the title Support multiple hostnames in ingress definitions feat: Support multiple hostnames in ingress definitions Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant