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

Installation as describe on the website fails with a nil pointer #53

Closed
stranljip opened this issue Dec 17, 2022 · 7 comments
Closed

Installation as describe on the website fails with a nil pointer #53

stranljip opened this issue Dec 17, 2022 · 7 comments
Labels
bug Something isn't working

Comments

@stranljip
Copy link

When I try to install the chart as described on https://zitadel.com/docs/guides/deploy/kubernetes I get a nil pointer error:

helm install my-zitadel zitadel/zitadel \
  --set zitadel.masterkey="my-sophisticated-password" \
  --set zitadel.configmapConfig.ExternalSecure=false \
  --set zitadel.configmapConfig.TLS.Enabled=false \
  --set zitadel.secretConfig.Database.cockroach.User.Password="my-other-sophisticated-password" \
  --set replicaCount=1 \
  --set cockroachdb.single-node=true \
  --set cockroachdb.statefulset.replicas=1
Error: INSTALLATION FAILED: template: zitadel/templates/setupjob.yaml:82:74: executing "zitadel/templates/setupjob.yaml" at <.Values.zitadel.configmapConfig.FirstInstance.Org>: nil pointer evaluating interface {}.Org

I have not dug into the logic here but it seems to me that you have to apply a check on those values or use a nested if construction.

@AltF02
Copy link

AltF02 commented Dec 17, 2022

I managed to work around this by adding under zitadel:

    FirstInstance:
      MachineKeyPath: /machinekey/zitadel-admin-sa.json 
      Org:
        Machine:
          Machine:
            Username: zitadel-admin-sa
            Name: Admin
          MachineKey:
            Type: 1

@eliobischof
Copy link
Member

Thank you for reporting this.

The behavior in go templates was changed for go 1.18 which was just recently bumped in Helm, I guess. helm/helm#11070.
With the newest helm version, helm uses a short circuit evaluation for and and or functions, so if you upgrade helm, you should get rid of the nil pointer.

Nevertheless, I'm going to change the templates so they are compatible with older versions as well.

@eliobischof eliobischof self-assigned this Dec 19, 2022
@eliobischof eliobischof added the bug Something isn't working label Dec 19, 2022
@eliobischof
Copy link
Member

eliobischof commented Dec 19, 2022

@stranljip @AltF02, which helm version do you use?

@stranljip
Copy link
Author

I have to stall - I am currently on my private machine. I use the Helm version provided by Ranger Desktop, it is possible that this is not the latest version - I have to check that.

@eliobischof eliobischof removed their assignment Jan 3, 2023
@hifabienne
Copy link
Member

@stranljip Do you have any updates on this?

@stranljip
Copy link
Author

I just tried the installation again and have a different error now (which I have to debug, I am probably missing something important in the setup). The initially described error is gone, from my side we can close this issue.
My Helm version atm is v3.10.2 (where the error does no longer occur ...). Thanks for your support!

@hifabienne
Copy link
Member

I just tried the installation again and have a different error now (which I have to debug, I am probably missing something important in the setup). The initially described error is gone, from my side we can close this issue. My Helm version atm is v3.10.2 (where the error does no longer occur ...). Thanks for your support!

Thanks for the reply. I will close this issue. Feel free to open up a new one if you have other problems. Or join our discord channel: https://zitadel.com/chat

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Status: Done
Development

No branches or pull requests

4 participants