Troubleshooting Ingress Configuration in Helm Chart for Application Deployment

Original Slack Thread

Using helm/app versions listed below

NAME            NAMESPACE       REVISION        UPDATED                                 STATUS          CHART                        APP VERSION
datahub         default         4               2024-01-04 17:24:54.161958078 +0000 UTC failed          datahub-0.3.23               0.12.1     
prerequisites   default         1               2024-01-03 19:54:53.274859431 +0000 UTC deployed        datahub-prerequisites-0.1.6             ```
Working on deploying the application with both frontend and gms as ClusterIP services instead of loadbalancers and directing traffic using ingress.
`values.yaml`:
```datahub-gms:
  enabled: true
  service:
    type: ClusterIP

datahub-frontend:
  enabled: true
  ingress:
    enabled: true
  service:
    type: ClusterIP```
Getting this error:
```Error: UPGRADE FAILED: failed to create resource: Ingress.extensions "datahub-datahub-frontend" is invalid: spec.rules[0].http.paths: Required value```
which appears to be a problem with how the ingress is configured in the helm chart.  I can make adjustments to the helm chart if needed, but wanted to post here first to determine if it was user error first.

Hey there! :wave: Make sure your message includes the following information if relevant, so we can help more effectively!

  1. Which DataHub version are you using? (e.g. 0.12.0)
  2. Please post any relevant error logs on the thread!

<@U06C2852V1V> were you able to configure ingress controlling for datahub-frontend?

Yes, we used Traefik as our ingress controller

did you have to configure the ingress upfront? Or was the ingress object created during the Helm chart installation?

With datahub? I think the default values allowed for it to be configured. Let me check.

yes, datahub.

I changed an existing datahub frontend chart to these vaules:

  enabled: true
  ingress:
    enabled: true
  service:
    type: ClusterIP```

but I then got this error: Error: UPGRADE FAILED: failed to create resource: Ingress.extensions "datahub-datahub-frontend" is invalid: spec.rules[0].http.paths: Required value

Oh right, you had to look into the helm chart to see what was available as values you could pass in. It wasn’t clearly defined in the defaults. Here’s what we did

  enabled: true
  ingress:
    enabled: true
    className: "traefik" #substitute your ingressclassName
    hosts:
      - host: &lt;substitute your hostname that you are directing traffic on&gt;
        paths: ["/"]```
Make sense?

yes make sense, but from where did you get those additional parameters in the value.yaml?

No I looked in the source code of the helm chart to see how they defining the ingress spec and saw that they were accepting those values as input from the values file (even though the values file doesn’t explain that).

interesting good to know - thank you very much. I will try to add those parameters.

<@U06GPTU2KCG> did you have any luck by adding those parameters?

<@U06C2852V1V> I’m facing the same error that you were getting. Did adding those two additional parameters fix this for you?

It did. Though the helm chart values doesn’t explain it, you need to pass the hosts: object list and a className: if you have multiple ingressClassNames configured in your cluster

Alright cool, I’ll give this a try

<@U06C2852V1V> <@U06K1CZ6059> I was finally able to test this implementation myself and it works!

here my code:

  [...]
  ingress:
    enabled: true
    annotations:
      cert-manager.io/cluster-issuer: <name of cert-manager issuer>
      kubernetes.io/ingress.class: <name of desired ingress>
    hosts:
      - host: <fqdn-datahub-frontend>
        paths: ["/"]
    tls:
    - hosts:
      - <fqdn-datahub-frontend>
      secretName: <name-of-secret-where-cert-is-stored-in>
  [...]```

I was able to get past the errors above but am now seeing: Unable to emit metadata to DataHub GMS', {'message': '401 Client Error: Unauthorized for url: &lt;datahub-gms-url&gt;) is this something you all faced as well?

No

no