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

Helm Chart is broken since 1.13.2 #206

Closed
biancode opened this issue Nov 5, 2023 · 22 comments · Fixed by FlowFuse/flowfuse#3046
Closed

Helm Chart is broken since 1.13.2 #206

biancode opened this issue Nov 5, 2023 · 22 comments · Fixed by FlowFuse/flowfuse#3046
Labels
needs-triage Needs looking at to decide what to do

Comments

@biancode
Copy link

biancode commented Nov 5, 2023

Current Behavior

Hi team, it looks like the helm chart is broken since 1.13.2 with sentry and postgres it wants to get the host of postgres and sentry got to be an object not a string

Error: template: flowforge/templates/deployment.yaml:61:76: executing "flowforge/templates/deployment.yaml" at <.Values.forge.telemetry.sentry>: wrong type for value; expected map[string]interface {}; got interface {}

Error: template: flowforge/templates/configmap.yaml:28:66: executing "flowforge/templates/configmap.yaml" at <.Values.forge.postgres>: wrong type for value; expected map[string]interface {}; got interface {}

discussed on Slack before

Expected Behavior

Helm Chart should install with minimum at Digital Ocean as described by FlowFuse Docs

Steps To Reproduce

set up a fresh Kube Cluster on Digital Ocean and use Helm as the FlowFuse Docs do

Environment

  • FlowFuse version: 1.13.2
  • Node.js version: 16.20
  • Platform/OS: Digital Ocean
  • Browser: Firefox, Chrome
@biancode biancode added the needs-triage Needs looking at to decide what to do label Nov 5, 2023
@hardillb
Copy link
Contributor

hardillb commented Nov 5, 2023

Please include the actual values.yml file you provided to the helm install and the actual command run.

@hardillb
Copy link
Contributor

hardillb commented Nov 5, 2023

Also did you run helm repo update before trying to install?

@biancode
Copy link
Author

biancode commented Nov 5, 2023

It is the exact minimum of the FlowFuse Docs

forge:
  domain: mydomain.com
  https: false
  localPostgresql: true
  projectSelector: 
  managementSelector: 
  broker:
    enabled: true

@hardillb
Copy link
Contributor

hardillb commented Nov 5, 2023

What version of helm are you using? helm version?

@biancode
Copy link
Author

biancode commented Nov 5, 2023

Also did you run helm repo update before trying to install?

I followed each step of the FlowFuse Docs and helm update is included. The version of helm at Digital Ocean is v3.6.0 by default for me.

@biancode
Copy link
Author

biancode commented Nov 5, 2023

I tried this to gete it installed without errors, but that did not work for me and flowforge-postgres was pending and hang up for more than 20 minutes and I killed it after forge goes to Error from the timeouts of flowforge-postgres.

forge:
  domain: mydomain.com
  https: false
  localPostgresql: true
  projectSelector: 
  managementSelector: 
  broker:
    enabled: true
  telemetry:
    sentry: {}
  postgres: {
    host: flowforge-postgresql
  }

@hardillb
Copy link
Contributor

hardillb commented Nov 5, 2023

Yes, but what version of helm are you running locally on your machine? As this will render the templates before they are sent to the cluster.

@biancode
Copy link
Author

biancode commented Nov 5, 2023

Yes, but what version of helm are you running locally on your machine? As this will render the templates before they are sent to the cluster.

image

@hardillb
Copy link
Contributor

hardillb commented Nov 5, 2023

Please try running the following command:

helm template flowforge flowforge/flowforge -f values.yaml

And let me know if you get the same errors?

@hardillb
Copy link
Contributor

hardillb commented Nov 5, 2023

The current templates all render correctly with helm v3.13.1 for me here.

@biancode
Copy link
Author

biancode commented Nov 5, 2023

Please try running the following command:

helm template flowforge flowforge/flowforge -f values.yaml

And let me know if you get the same errors?

image

@hardillb
Copy link
Contributor

hardillb commented Nov 5, 2023

Please post the actual text not screen shots, I can't read that.

@biancode
Copy link
Author

biancode commented Nov 5, 2023

OK, then it doesn't work with Portainer BE. There is just 3.6.0 available. I give it a try with the helm 3.13.x

here the text errors from helm 3.6.0:

> helm template flowforge flowforge/flowforge -f values.yaml --debug
install.go:173: [debug] Original chart version: ""
install.go:190: [debug] CHART PATH: /home/shell/.cache/helm/repository/flowforge-1.13.2.tgz


Error: template: flowforge/templates/deployment.yaml:61:76: executing "flowforge/templates/deployment.yaml" at <.Values.forge.telemetry.sentry>: wrong type for value; expected map[string]interface {}; got interface {}
helm.go:81: [debug] template: flowforge/templates/deployment.yaml:61:76: executing "flowforge/templates/deployment.yaml" at <.Values.forge.telemetry.sentry>: wrong type for value; expected map[string]interface {}; got interface {}

if that error gets fixed it will bring the postgres error host has to be exist.

@hardillb
Copy link
Contributor

hardillb commented Nov 5, 2023

One problem at a time, but to investigate that we need to see details about the postgres database pod (e.g. kubectl describe flowforge-postgresql-0)

What CPU architecture did you pick for your DO Kube cluster? If it was ARM64 then the Postgres chart will only install on AMD64 machines at the version we are using.

@biancode
Copy link
Author

biancode commented Nov 5, 2023

kubectl describe pod/flowforge-postgresql-0
Name:           flowforge-postgresql-0
Namespace:      default
Priority:       0
Node:           <none>
Labels:         app.kubernetes.io/component=primary
                app.kubernetes.io/instance=flowforge
                app.kubernetes.io/managed-by=Helm
                app.kubernetes.io/name=postgresql
                apps.kubernetes.io/pod-index=0
                controller-revision-hash=flowforge-postgresql-7947dfd699
                helm.sh/chart=postgresql-10.14.0
                role=primary
                statefulset.kubernetes.io/pod-name=flowforge-postgresql-0
Annotations:    <none>
Status:         Pending
IP:             
IPs:            <none>
Controlled By:  StatefulSet/flowforge-postgresql
Containers:
  flowforge-postgresql:
    Image:      docker.io/bitnami/postgresql:11.14.0-debian-10-r17
    Port:       5432/TCP
    Host Port:  0/TCP
    Requests:
      cpu:      250m
      memory:   256Mi
    Liveness:   exec [/bin/sh -c exec pg_isready -U "forge" -d "dbname=flowforge" -h 127.0.0.1 -p 5432] delay=30s timeout=5s period=10s #success=1 #failure=6
    Readiness:  exec [/bin/sh -c -e exec pg_isready -U "forge" -d "dbname=flowforge" -h 127.0.0.1 -p 5432
[ -f /opt/bitnami/postgresql/tmp/.initialized ] || [ -f /bitnami/postgresql/.initialized ]
] delay=5s timeout=5s period=10s #success=1 #failure=6
    Environment:
      BITNAMI_DEBUG:                        false
      POSTGRESQL_PORT_NUMBER:               5432
      POSTGRESQL_VOLUME_DIR:                /bitnami/postgresql
      PGDATA:                               /bitnami/postgresql/data
      POSTGRES_POSTGRES_PASSWORD:           <set to the key 'postgresql-postgres-password' in secret 'flowforge-postgresql'>  Optional: false
      POSTGRES_USER:                        forge
      POSTGRES_PASSWORD:                    <set to the key 'postgresql-password' in secret 'flowforge-postgresql'>  Optional: false
      POSTGRES_DB:                          flowforge
      POSTGRESQL_ENABLE_LDAP:               no
      POSTGRESQL_ENABLE_TLS:                no
      POSTGRESQL_LOG_HOSTNAME:              false
      POSTGRESQL_LOG_CONNECTIONS:           false
      POSTGRESQL_LOG_DISCONNECTIONS:        false
      POSTGRESQL_PGAUDIT_LOG_CATALOG:       off
      POSTGRESQL_CLIENT_MIN_MESSAGES:       error
      POSTGRESQL_SHARED_PRELOAD_LIBRARIES:  pgaudit
    Mounts:
      /bitnami/postgresql from data (rw)
      /dev/shm from dshm (rw)
Conditions:
  Type           Status
  PodScheduled   False 
Volumes:
  data:
    Type:       PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
    ClaimName:  data-flowforge-postgresql-0
    ReadOnly:   false
  dshm:
    Type:        EmptyDir (a temporary directory that shares a pod's lifetime)
    Medium:      Memory
    SizeLimit:   <unset>
QoS Class:       Burstable
Node-Selectors:  <none>
Tolerations:     node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
                 node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
  Type     Reason             Age                  From                Message
  ----     ------             ----                 ----                -------
  Warning  FailedScheduling   5m29s                default-scheduler   0/2 nodes are available: pod has unbound immediate PersistentVolumeClaims. preemption: 0/2 nodes are available: 2 Preemption is not helpful for scheduling..
  Warning  FailedScheduling   16s                  default-scheduler   0/2 nodes are available: pod has unbound immediate PersistentVolumeClaims. preemption: 0/2 nodes are available: 2 Preemption is not helpful for scheduling..
  Normal   NotTriggerScaleUp  21s (x6 over 5m23s)  cluster-autoscaler  pod didn't trigger scale-up: 1 pod has unbound immediate PersistentVolumeClaims

@hardillb
Copy link
Contributor

hardillb commented Nov 5, 2023

OK, looks like no default storage class attached to your cluster.

Will look at that in the morning.

@hardillb
Copy link
Contributor

hardillb commented Nov 5, 2023

But in the mean time please run

kubectl get pvc

And

kubectl get sc

@biancode
Copy link
Author

biancode commented Nov 5, 2023

data-flowforge-postgresql-0   Pending                                                                        default            15m

@biancode
Copy link
Author

biancode commented Nov 5, 2023

NAME                          PROVISIONER                 RECLAIMPOLICY   VOLUMEBINDINGMODE   ALLOWVOLUMEEXPANSION   AGE
do-block-storage (default)    dobs.csi.digitalocean.com   Delete          Immediate           true                   106m
do-block-storage-retain       dobs.csi.digitalocean.com   Retain          Immediate           true                   106m
do-block-storage-xfs          dobs.csi.digitalocean.com   Delete          Immediate           true                   106m
do-block-storage-xfs-retain   dobs.csi.digitalocean.com   Retain          Immediate           true                   106m

@hardillb
Copy link
Contributor

hardillb commented Nov 6, 2023

I've fixed the helm chart URL and the default storageClass for Digital Ocean (this is an update to the customization.yaml in the documentaion) and the helm chart installs properly with helm v3.10.1

@hardillb
Copy link
Contributor

hardillb commented Nov 6, 2023

The docs will update next time the website rebuilds. The changes are in the linked PR

@biancode
Copy link
Author

biancode commented Nov 6, 2023

Works very well. "Thank you for installing flowforge v1.13.2" 💯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage Needs looking at to decide what to do
Projects
Status: Closed / Done
Development

Successfully merging a pull request may close this issue.

2 participants