Skip to content
This repository has been archived by the owner on Feb 2, 2024. It is now read-only.

Unable to install RHDH helm chart on non-OpenShift cluster #155

Closed
josephca opened this issue Nov 23, 2023 · 5 comments · Fixed by #157
Closed

Unable to install RHDH helm chart on non-OpenShift cluster #155

josephca opened this issue Nov 23, 2023 · 5 comments · Fixed by #157
Assignees
Labels
kind/bug Something isn't working status/triage

Comments

@josephca
Copy link
Member

josephca commented Nov 23, 2023

Describe the bug

Installing RHDH failed on non-OpenShift clusters even after enabling ingress.

Expected Behavior

RHDH is installed successfully and supports ingress with minimum configuration changes in values yarml.

What are the steps to reproduce this bug?

  1. login to non-OpenShift cluster
  2. create a namespace: kubectl create namespace rhdh
  3. create a quay pull secretkubectl apply -f rhdh-quay-pull-secret.yaml --namespace=rhdh
  4. run helm install by setting [ingress.enabled=true, route.enabled=false, global.host=[host-name]]
helm upgrade -i developer-hub -n rhdh https://github.com/rhdh-bot/openshift-helm-charts/raw/developer-hub-1.0-190-CI/charts/redhat/redhat/developer-hub/1.0-190-CI/developer-hub-1.0-190-CI.tgz -f values_rhdh.yaml --set ingress.enabled=true --set route.enabled=false --set global.host=backstage.127.0.0.1.nip.io

File used in the command line above:

  1. verify the install: kubectl get pods -n rhdh
  output: 
  NAME                             READY   STATUS                  RESTARTS      AGE
  developer-hub-849c59bfd6-7mmvl   0/1     Init:CrashLoopBackOff   5 (24s ago)   3m50s

In addition, in the default 'values.yaml' file, 'upstream.ingress.* ' should be located in 'ingress.* ' like

ingress:
 enabled: true
 host: '{{ .Values.global.host }}'

Otherwise, helm install by using avalues.yaml file with the enabled ingress results in an error:

Error: YAML parse error on developer-hub/charts/upstream/templates/ingress.yaml: error converting YAML to JSON: yaml: invalid map key: map[interface {}]interface {}{".Values.global.host":interface {}(nil)}

Versions of software used and environment

quay.io/rhdh/rhdh-hub-rhel9:1.0-190

@josephca josephca added kind/bug Something isn't working status/triage labels Nov 23, 2023
@tumido
Copy link
Member

tumido commented Nov 24, 2023

In addition, in the default 'values.yaml' file, 'upstream.ingress.* ' should be located in 'ingress.* ' like

There is no top level ingress key. This comes from our dependency called upstream in the chart dependencies. This is not true. All this change does is that you don't get the ingress values propagated at all.

Otherwise, helm install by using avalues.yaml file with the enabled ingress result in an error:

This seems like a templating error, rather than value placement error. I'll look into it.

We regularly install this chart to a kind cluster, aka non-OCP cluster. It works fine. I suspect the error is elsewhere. We do not regularly propagate the host value though.

@tumido
Copy link
Member

tumido commented Nov 24, 2023

@josephca upstream.ingress.host is not being templated correctly. This PR in upstream chart should fix it:

backstage/charts#153

FTR:

In addition, in the default 'values.yaml' file, 'upstream.ingress.* ' should be located in 'ingress.* ' like

You can always test if the values are propagating properly by running helm template. If you move ingress from upstream.ingress to YAML root and run helm template, you can actually see the values are not being used at all.

@tumido tumido self-assigned this Nov 24, 2023
@tumido
Copy link
Member

tumido commented Nov 24, 2023

Quick workaround for you:

global:
  host: <host>
upstream:
  ingress:
    enabled: true
    host: <host_again>
route: 
  enabled: false

@tumido
Copy link
Member

tumido commented Nov 24, 2023

Should be resolved via #155

@tumido tumido linked a pull request Nov 24, 2023 that will close this issue
1 task
@josephca
Copy link
Member Author

Quick workaround for you:

global:
  host: <host>
upstream:
  ingress:
    enabled: true
    host: <host_again>
route: 
  enabled: false

Hi @tumido, I tried the workaround but still no luck. Can you try the workaround from your side and provide a values yaml file and command line that you run with it? I ran helm template command and verified that the ingress values are propagated with your fix. Thanks,

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working status/triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants