nicholaswilde / helm-charts

My collection of Helm charts.
https://artifacthub.io/packages/search?repo=nicholaswilde
Apache License 2.0
70 stars 32 forks source link

Ingress backend service name and ports for a path not being accepted #68

Open brandtkeller opened 2 years ago

brandtkeller commented 2 years ago

Details

Ask your question: What is the preferred way to enable additional paths in the ingress declaration to be accepted?

I am orchestrating code-server and wanting to open an additional path on the ingress for some react development. So I created an additionalService for the react port.

service:
      additionalServices:
      - enabled: true
        nameSuffix: react
        type: ClusterIP
        # Specify the default port information
        port:
          port: 3000
          # name defaults to http
          name: http-react
          protocol: TCP
          # targetPort defaults to http
          targetPort: 3000
          # nodePort:
        additionalPorts: []
        annotations: {}
        labels: {}

Then I created a path in the ingress for this:

ingress:
      enabled: true
      annotations:
        kubernetes.io/ingress.class: nginx
      hosts:
        - host: code.dev.home.local
          paths:
          - path: /
            # Ignored if not kubeVersion >= 1.14-0
            pathType: Prefix
          - path: /react
            pathType: Prefix
            backend:
              service:
                port:
                  name: cicd-code-code-server-react
                  number: 3000
      tls:
      - secretName: code-tls
        hosts:
          - code.dev.home.local

No matter what I configure in the backend section, helm outputs:

- host: code.dev.home.local
    http:
      paths:
      - backend:
          service:
            name: cicd-code-code-server
            port:
              number: 8443
        path: /
        pathType: Prefix
      - backend:
          service:
            name: cicd-code-code-server
            port:
              number: 8443
        path: /react
        pathType: Prefix

Thoughts?