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

Bug: If dbSslRootCrtSecret and/or dbSslClientCrtSecret are defined in default values, they will always be tried to mount #113

Closed
samip5 opened this issue Jul 15, 2023 · 7 comments · Fixed by #111

Comments

@samip5
Copy link

samip5 commented Jul 15, 2023

The conditionals in https://github.com/zitadel/zitadel-charts/blob/main/charts/zitadel/templates/initjob.yaml#L136 & https://github.com/zitadel/zitadel-charts/blob/main/charts/zitadel/templates/initjob.yaml#L141 with current default values https://github.com/zitadel/zitadel-charts/blob/main/charts/zitadel/values.yaml#L60L63 results in the initjob always trying to mount those secrets.

This results in unable to install application.

@jessebot
Copy link
Contributor

jessebot commented Aug 19, 2023

I'm also running into this issue, and it makes it so you can't install zitadel with postgresql unfortunately (using only password and username).

@samip5
Copy link
Author

samip5 commented Aug 20, 2023

I'm also running into this issue, and it makes it so you can't install zitadel with postgresql unfortunately (using only password and username).

I was able to install it despite these issues, but not a fun user experience.

See here: https://github.com/samip5/k8s-cluster/blob/24ba742b1d8cafa012528c8e7bcdf580fbb48dce/archive/zitadel/app/helm-release.yaml#L71 & https://github.com/samip5/k8s-cluster/blob/24ba742b1d8cafa012528c8e7bcdf580fbb48dce/archive/zitadel/app/helm-release.yaml#L73

@jessebot
Copy link
Contributor

jessebot commented Aug 20, 2023

That fixed that error for me! Thanks, @samip5!! Agree that it's not a good user experience though and should still be fixed. If it's fix that in the values.yaml, we probably also need to fix the docs to specify those values directly via helm in the tutorials when needed.

@jessebot
Copy link
Contributor

Did you ever end up getting this error in the browser when you go to your zitadel domain?

ID=QUERY-n0wng Message=Instance not found

It seems to produce this in the zitadel pod's container logs:

click here for logs
time="2023-08-20T09:50:59Z" level=warning msg="postgres is currently in beta" caller="/home/runner/work/zitadel/zitadel/internal/database/postgres/config.go:62"
time="2023-08-20T09:50:59Z" level=warning msg="execution logs are currently in beta" caller="/home/runner/work/zitadel/zitadel/cmd/start/start.go:207"
time="2023-08-20T09:50:59Z" level=info msg="spooler started" caller="/home/runner/work/zitadel/zitadel/internal/eventstore/v1/spooler/spooler.go:73" lockerID=228218892072255517 workers=1
time="2023-08-20T09:50:59Z" level=info msg="spooler started" caller="/home/runner/work/zitadel/zitadel/internal/eventstore/v1/spooler/spooler.go:73" lockerID=228218892072321053 workers=1
time="2023-08-20T09:51:00Z" level=info msg="query failed" aggregate=system aggregateId=SYSTEM aggregateType=system caller="/home/runner/work/zitadel/zitadel/internal/eventstore/repository/sql/crdb.go:143" error="ERROR: duplicate key value violates unique constraint \"previous_sequence_unique\" (SQLSTATE 23505)" eventType=system.projections.scheduler.succeeded instanceID=
time="2023-08-20T09:51:00Z" level=info msg="query failed" aggregate=system aggregateId=SYSTEM aggregateType=system caller="/home/runner/work/zitadel/zitadel/internal/eventstore/repository/sql/crdb.go:143" error="ERROR: duplicate key value violates unique constraint \"previous_sequence_unique\" (SQLSTATE 23505)" eventType=system.projections.scheduler.succeeded instanceID=
time="2023-08-20T09:51:00Z" level=info msg="query failed" aggregate=system aggregateId=SYSTEM aggregateType=system caller="/home/runner/work/zitadel/zitadel/internal/eventstore/repository/sql/crdb.go:143" error="ERROR: duplicate key value violates unique constraint \"previous_sequence_unique\" (SQLSTATE 23505)" eventType=system.projections.scheduler.succeeded instanceID=
time="2023-08-20T09:51:00Z" level=info msg="query failed" aggregate=system aggregateId=SYSTEM aggregateType=system caller="/home/runner/work/zitadel/zitadel/internal/eventstore/repository/sql/crdb.go:143" error="ERROR: duplicate key value violates unique constraint \"previous_sequence_unique\" (SQLSTATE 23505)" eventType=system.projections.scheduler.succeeded instanceID=
time="2023-08-20T09:51:00Z" level=warning msg="unable to push first schedule succeeded" caller="/home/runner/work/zitadel/zitadel/internal/eventstore/handler/handler_projection.go:275" error="ID=SQL-SBP37 Message=unable to create event Parent=(ERROR: duplicate key value violates unique constraint \"previous_sequence_unique\" (SQLSTATE 23505))" projection=projections.personal_access_tokens3
time="2023-08-20T09:51:00Z" level=warning msg="unable to push first schedule succeeded" caller="/home/runner/work/zitadel/zitadel/internal/eventstore/handler/handler_projection.go:275" error="ID=SQL-SBP37 Message=unable to create event Parent=(ERROR: duplicate key value violates unique constraint \"previous_sequence_unique\" (SQLSTATE 23505))" projection=projections.projects3
time="2023-08-20T09:51:00Z" level=warning msg="unable to push first schedule succeeded" caller="/home/runner/work/zitadel/zitadel/internal/eventstore/handler/handler_projection.go:275" error="ID=SQL-SBP37 Message=unable to create event Parent=(ERROR: duplicate key value violates unique constraint \"previous_sequence_unique\" (SQLSTATE 23505))" projection=projections.keys4
time="2023-08-20T09:51:00Z" level=warning msg="unable to push first schedule succeeded" caller="/home/runner/work/zitadel/zitadel/internal/eventstore/handler/handler_projection.go:275" error="ID=SQL-SBP37 Message=unable to create event Parent=(ERROR: duplicate key value violates unique constraint \"previous_sequence_unique\" (SQLSTATE 23505))" projection=projections.orgs
time="2023-08-20T09:51:00Z" level=info msg="query failed" aggregate=system aggregateId=SYSTEM aggregateType=system caller="/home/runner/work/zitadel/zitadel/internal/eventstore/repository/sql/crdb.go:143" error="ERROR: duplicate key value violates unique constraint \"previous_sequence_unique\" (SQLSTATE 23505)" eventType=system.projections.scheduler.succeeded instanceID=
time="2023-08-20T09:51:00Z" level=info msg="query failed" aggregate=system aggregateId=SYSTEM aggregateType=system caller="/home/runner/work/zitadel/zitadel/internal/eventstore/repository/sql/crdb.go:143" error="ERROR: duplicate key value violates unique constraint \"previous_sequence_unique\" (SQLSTATE 23505)" eventType=system.projections.scheduler.succeeded instanceID=
time="2023-08-20T09:51:00Z" level=warning msg="unable to push first schedule succeeded" caller="/home/runner/work/zitadel/zitadel/internal/eventstore/handler/handler_projection.go:275" error="ID=SQL-SBP37 Message=unable to create event Parent=(ERROR: duplicate key value violates unique constraint \"previous_sequence_unique\" (SQLSTATE 23505))" projection=projections.authn_keys2
time="2023-08-20T09:51:00Z" level=warning msg="unable to push first schedule succeeded" caller="/home/runner/work/zitadel/zitadel/internal/eventstore/handler/handler_projection.go:275" error="ID=SQL-SBP37 Message=unable to create event Parent=(ERROR: duplicate key value violates unique constraint \"previous_sequence_unique\" (SQLSTATE 23505))" projection=projections.user_grants3
time="2023-08-20T09:51:00Z" level=info msg="query failed" aggregate=system aggregateId=SYSTEM aggregateType=system caller="/home/runner/work/zitadel/zitadel/internal/eventstore/repository/sql/crdb.go:143" error="ERROR: duplicate key value violates unique constraint \"previous_sequence_unique\" (SQLSTATE 23505)" eventType=system.projections.scheduler.succeeded instanceID=
time="2023-08-20T09:51:00Z" level=warning msg="unable to push first schedule succeeded" caller="/home/runner/work/zitadel/zitadel/internal/eventstore/handler/handler_projection.go:275" error="ID=SQL-SBP37 Message=unable to create event Parent=(ERROR: duplicate key value violates unique constraint \"previous_sequence_unique\" (SQLSTATE 23505))" projection=projections.idp_templates5
time="2023-08-20T09:51:00Z" level=info msg="query failed" aggregate=system aggregateId=SYSTEM aggregateType=system caller="/home/runner/work/zitadel/zitadel/internal/eventstore/repository/sql/crdb.go:143" error="ERROR: duplicate key value violates unique constraint \"previous_sequence_unique\" (SQLSTATE 23505)" eventType=system.projections.scheduler.succeeded instanceID=
time="2023-08-20T09:51:00Z" level=info msg="query failed" aggregate=system aggregateId=SYSTEM aggregateType=system caller="/home/runner/work/zitadel/zitadel/internal/eventstore/repository/sql/crdb.go:143" error="ERROR: duplicate key value violates unique constraint \"previous_sequence_unique\" (SQLSTATE 23505)" eventType=system.projections.scheduler.succeeded instanceID=
time="2023-08-20T09:51:00Z" level=warning msg="unable to push first schedule succeeded" caller="/home/runner/work/zitadel/zitadel/internal/eventstore/handler/handler_projection.go:275" error="ID=SQL-SBP37 Message=unable to create event Parent=(ERROR: duplicate key value violates unique constraint \"previous_sequence_unique\" (SQLSTATE 23505))" projection=projections.actions3
time="2023-08-20T09:51:00Z" level=warning msg="unable to push first schedule succeeded" caller="/home/runner/work/zitadel/zitadel/internal/eventstore/handler/handler_projection.go:275" error="ID=SQL-SBP37 Message=unable to create event Parent=(ERROR: duplicate key value violates unique constraint \"previous_sequence_unique\" (SQLSTATE 23505))" projection=projections.idp_login_policy_links5
time="2023-08-20T09:51:00Z" level=info msg="query failed" aggregate=system aggregateId=SYSTEM aggregateType=system caller="/home/runner/work/zitadel/zitadel/internal/eventstore/repository/sql/crdb.go:143" error="ERROR: duplicate key value violates unique constraint \"previous_sequence_unique\" (SQLSTATE 23505)" eventType=system.projections.scheduler.succeeded instanceID=
time="2023-08-20T09:51:00Z" level=info msg="query failed" aggregate=system aggregateId=SYSTEM aggregateType=system caller="/home/runner/work/zitadel/zitadel/internal/eventstore/repository/sql/crdb.go:143" error="ERROR: duplicate key value violates unique constraint \"previous_sequence_unique\" (SQLSTATE 23505)" eventType=system.projections.scheduler.succeeded instanceID=
time="2023-08-20T09:51:00Z" level=warning msg="unable to push first schedule succeeded" caller="/home/runner/work/zitadel/zitadel/internal/eventstore/handler/handler_projection.go:275" error="ID=SQL-SBP37 Message=unable to create event Parent=(ERROR: duplicate key value violates unique constraint \"previous_sequence_unique\" (SQLSTATE 23505))" projection=projections.idps3
time="2023-08-20T09:51:00Z" level=info msg="query failed" aggregate=system aggregateId=SYSTEM aggregateType=system caller="/home/runner/work/zitadel/zitadel/internal/eventstore/repository/sql/crdb.go:143" error="ERROR: duplicate key value violates unique constraint \"previous_sequence_unique\" (SQLSTATE 23505)" eventType=system.projections.scheduler.succeeded instanceID=
time="2023-08-20T09:51:00Z" level=info msg="query failed" aggregate=system aggregateId=SYSTEM aggregateType=system caller="/home/runner/work/zitadel/zitadel/internal/eventstore/repository/sql/crdb.go:143" error="ERROR: duplicate key value violates unique constraint \"previous_sequence_unique\" (SQLSTATE 23505)" eventType=system.projections.scheduler.succeeded instanceID=
time="2023-08-20T09:51:00Z" level=warning msg="unable to push first schedule succeeded" caller="/home/runner/work/zitadel/zitadel/internal/eventstore/handler/handler_projection.go:275" error="ID=SQL-SBP37 Message=unable to create event Parent=(ERROR: duplicate key value violates unique constraint \"previous_sequence_unique\" (SQLSTATE 23505))" projection=projections.user_auth_methods4
time="2023-08-20T09:51:00Z" level=warning msg="unable to push first schedule succeeded" caller="/home/runner/work/zitadel/zitadel/internal/eventstore/handler/handler_projection.go:275" error="ID=SQL-SBP37 Message=unable to create event Parent=(ERROR: duplicate key value violates unique constraint \"previous_sequence_unique\" (SQLSTATE 23505))" projection=projections.smtp_configs
time="2023-08-20T09:51:00Z" level=info msg="query failed" aggregate=system aggregateId=SYSTEM aggregateType=system caller="/home/runner/work/zitadel/zitadel/internal/eventstore/repository/sql/crdb.go:143" error="ERROR: duplicate key value violates unique constraint \"previous_sequence_unique\" (SQLSTATE 23505)" eventType=system.projections.scheduler.succeeded instanceID=
time="2023-08-20T09:51:00Z" level=warning msg="unable to push first schedule succeeded" caller="/home/runner/work/zitadel/zitadel/internal/eventstore/handler/handler_projection.go:275" error="ID=SQL-SBP37 Message=unable to create event Parent=(ERROR: duplicate key value violates unique constraint \"previous_sequence_unique\" (SQLSTATE 23505))" projection=projections.security_policies
time="2023-08-20T09:51:00Z" level=info msg="query failed" aggregate=system aggregateId=SYSTEM aggregateType=system caller="/home/runner/work/zitadel/zitadel/internal/eventstore/repository/sql/crdb.go:143" error="ERROR: duplicate key value violates unique constraint \"previous_sequence_unique\" (SQLSTATE 23505)" eventType=system.projections.scheduler.succeeded instanceID=
time="2023-08-20T09:51:00Z" level=warning msg="unable to push first schedule succeeded" caller="/home/runner/work/zitadel/zitadel/internal/eventstore/handler/handler_projection.go:275" error="ID=SQL-SBP37 Message=unable to create event Parent=(ERROR: duplicate key value violates unique constraint \"previous_sequence_unique\" (SQLSTATE 23505))" projection=projections.flow_triggers2
time="2023-08-20T09:51:00Z" level=warning msg="unable to push first schedule succeeded" caller="/home/runner/work/zitadel/zitadel/internal/eventstore/handler/handler_projection.go:275" error="ID=SQL-SBP37 Message=unable to create event Parent=(ERROR: duplicate key value violates unique constraint \"previous_sequence_unique\" (SQLSTATE 23505))" projection=projections.label_policies2
time="2023-08-20T09:51:00Z" level=info msg="query failed" aggregate=system aggregateId=SYSTEM aggregateType=system caller="/home/runner/work/zitadel/zitadel/internal/eventstore/repository/sql/crdb.go:143" error="ERROR: duplicate key value violates unique constraint \"previous_sequence_unique\" (SQLSTATE 23505)" eventType=system.projections.scheduler.succeeded instanceID=
time="2023-08-20T09:51:00Z" level=info msg="query failed" aggregate=system aggregateId=SYSTEM aggregateType=system caller="/home/runner/work/zitadel/zitadel/internal/eventstore/repository/sql/crdb.go:143" error="ERROR: duplicate key value violates unique constraint \"previous_sequence_unique\" (SQLSTATE 23505)" eventType=system.projections.scheduler.succeeded instanceID=
time="2023-08-20T09:51:00Z" level=warning msg="unable to push first schedule succeeded" caller="/home/runner/work/zitadel/zitadel/internal/eventstore/handler/handler_projection.go:275" error="ID=SQL-SBP37 Message=unable to create event Parent=(ERROR: duplicate key value violates unique constraint \"previous_sequence_unique\" (SQLSTATE 23505))" projection=projections.oidc_settings2
time="2023-08-20T09:51:00Z" level=info msg="query failed" aggregate=system aggregateId=SYSTEM aggregateType=system caller="/home/runner/work/zitadel/zitadel/internal/eventstore/repository/sql/crdb.go:143" error="ERROR: duplicate key value violates unique constraint \"previous_sequence_unique\" (SQLSTATE 23505)" eventType=system.projections.scheduler.succeeded instanceID=
time="2023-08-20T09:51:00Z" level=info msg="query failed" aggregate=system aggregateId=SYSTEM aggregateType=system caller="/home/runner/work/zitadel/zitadel/internal/eventstore/repository/sql/crdb.go:143" error="ERROR: duplicate key value violates unique constraint \"previous_sequence_unique\" (SQLSTATE 23505)" eventType=system.projections.scheduler.succeeded instanceID=
time="2023-08-20T09:51:00Z" level=warning msg="unable to push first schedule succeeded" caller="/home/runner/work/zitadel/zitadel/internal/eventstore/handler/handler_projection.go:275" error="ID=SQL-SBP37 Message=unable to create event Parent=(ERROR: duplicate key value violates unique constraint \"previous_sequence_unique\" (SQLSTATE 23505))" projection=projections.org_domains2
time="2023-08-20T09:51:00Z" level=warning msg="unable to push first schedule succeeded" caller="/home/runner/work/zitadel/zitadel/internal/eventstore/handler/handler_projection.go:275" error="ID=SQL-SBP37 Message=unable to create event Parent=(ERROR: duplicate key value violates unique constraint \"previous_sequence_unique\" (SQLSTATE 23505))" projection=projections.lockout_policies2
time="2023-08-20T09:51:00Z" level=warning msg="unable to push first schedule succeeded" caller="/home/runner/work/zitadel/zitadel/internal/eventstore/handler/handler_projection.go:275" error="ID=SQL-SBP37 Message=unable to create event Parent=(ERROR: duplicate key value violates unique constraint \"previous_sequence_unique\" (SQLSTATE 23505))" projection=projections.org_metadata2
time="2023-08-20T09:51:00Z" level=info msg="query failed" aggregate=system aggregateId=SYSTEM aggregateType=system caller="/home/runner/work/zitadel/zitadel/internal/eventstore/repository/sql/crdb.go:143" error="ERROR: duplicate key value violates unique constraint \"previous_sequence_unique\" (SQLSTATE 23505)" eventType=system.projections.scheduler.succeeded instanceID=
time="2023-08-20T09:51:00Z" level=info msg="query failed" aggregate=system aggregateId=SYSTEM aggregateType=system caller="/home/runner/work/zitadel/zitadel/internal/eventstore/repository/sql/crdb.go:143" error="ERROR: duplicate key value violates unique constraint \"previous_sequence_unique\" (SQLSTATE 23505)" eventType=system.projections.scheduler.succeeded instanceID=
time="2023-08-20T09:51:00Z" level=warning msg="unable to push first schedule succeeded" caller="/home/runner/work/zitadel/zitadel/internal/eventstore/handler/handler_projection.go:275" error="ID=SQL-SBP37 Message=unable to create event Parent=(ERROR: duplicate key value violates unique constraint \"previous_sequence_unique\" (SQLSTATE 23505))" projection=projections.instance_members3
time="2023-08-20T09:51:00Z" level=warning msg="unable to push first schedule succeeded" caller="/home/runner/work/zitadel/zitadel/internal/eventstore/handler/handler_projection.go:275" error="ID=SQL-SBP37 Message=unable to create event Parent=(ERROR: duplicate key value violates unique constraint \"previous_sequence_unique\" (SQLSTATE 23505))" projection=projections.secret_generators2
time="2023-08-20T09:51:00Z" level=info msg="query failed" aggregate=system aggregateId=SYSTEM aggregateType=system caller="/home/runner/work/zitadel/zitadel/internal/eventstore/repository/sql/crdb.go:143" error="ERROR: duplicate key value violates unique constraint \"previous_sequence_unique\" (SQLSTATE 23505)" eventType=system.projections.scheduler.succeeded instanceID=
time="2023-08-20T09:51:00Z" level=warning msg="unable to push first schedule succeeded" caller="/home/runner/work/zitadel/zitadel/internal/eventstore/handler/handler_projection.go:275" error="ID=SQL-SBP37 Message=unable to create event Parent=(ERROR: duplicate key value violates unique constraint \"previous_sequence_unique\" (SQLSTATE 23505))" projection=projections.notification_policies
time="2023-08-20T09:51:00Z" level=info msg="query failed" aggregate=system aggregateId=SYSTEM aggregateType=system caller="/home/runner/work/zitadel/zitadel/internal/eventstore/repository/sql/crdb.go:143" error="ERROR: duplicate key value violates unique constraint \"previous_sequence_unique\" (SQLSTATE 23505)" eventType=system.projections.scheduler.succeeded instanceID=
time="2023-08-20T09:51:00Z" level=warning msg="unable to push first schedule succeeded" caller="/home/runner/work/zitadel/zitadel/internal/eventstore/handler/handler_projection.go:275" error="ID=SQL-SBP37 Message=unable to create event Parent=(ERROR: duplicate key value violates unique constraint \"previous_sequence_unique\" (SQLSTATE 23505))" projection=projections.privacy_policies3
time="2023-08-20T09:51:00Z" level=info msg="query failed" aggregate=system aggregateId=SYSTEM aggregateType=system caller="/home/runner/work/zitadel/zitadel/internal/eventstore/repository/sql/crdb.go:143" error="ERROR: duplicate key value violates unique constraint \"previous_sequence_unique\" (SQLSTATE 23505)" eventType=system.projections.scheduler.succeeded instanceID=
time="2023-08-20T09:51:00Z" level=warning msg="unable to push first schedule succeeded" caller="/home/runner/work/zitadel/zitadel/internal/eventstore/handler/handler_projection.go:275" error="ID=SQL-SBP37 Message=unable to create event Parent=(ERROR: duplicate key value violates unique constraint \"previous_sequence_unique\" (SQLSTATE 23505))" projection=projections.custom_texts2
time="2023-08-20T09:51:00Z" level=info msg="query failed" aggregate=system aggregateId=SYSTEM aggregateType=system caller="/home/runner/work/zitadel/zitadel/internal/eventstore/repository/sql/crdb.go:143" error="ERROR: duplicate key value violates unique constraint \"previous_sequence_unique\" (SQLSTATE 23505)" eventType=system.projections.scheduler.succeeded instanceID=
time="2023-08-20T09:51:00Z" level=warning msg="unable to push first schedule succeeded" caller="/home/runner/work/zitadel/zitadel/internal/eventstore/handler/handler_projection.go:275" error="ID=SQL-SBP37 Message=unable to create event Parent=(ERROR: duplicate key value violates unique constraint \"previous_sequence_unique\" (SQLSTATE 23505))" projection=projections.org_members3
time="2023-08-20T09:51:00Z" level=info msg="server is listening on [::]:8080" caller="/home/runner/work/zitadel/zitadel/cmd/start/start.go:412"

I have a fairly similar values.yaml to you for zitadel when using postgres like:

click here zitadel values.yaml
zitadel:
  # See all defaults here:
  # https://github.com/zitadel/zitadel/blob/main/cmd/defaults.yaml
  configmapConfig:
    Database:
      postgres:
        Host: zitadel-postgres
        Port: 5432
        Database: zitadel
        User:
          SSL:
            Mode: disable
        Admin:
          SSL:
            Mode: disable
    TLS:
      Enabled: false

    # specifies if ZITADEL is exposed externally through TLS
    # this must be set to true even if TLS is not enabled on ZITADEL itself
    # but TLS traffic is terminated on a reverse proxy
    # !!! Changing this after initial setup breaks your system !!!
    ExternalSecure: true
    ExternalPort: 443

    Machine:
      Identification:
        Hostname:
          Enabled: true
        Webhook:
          Enabled: false

    # setup ZITADEL with a service account
    FirstInstance:
      Org:
        Machine:
          Machine:
            # Creates a service account with the name zitadel-admin-sa,
            # which results in a secret 'zitadel-admin-sa' with a key 'zitadel-admin-sa.json'
            Username: zitadel-admin-sa
            Name: Admin
          MachineKey:
            Type: 1
  # these must be set as is until https://github.com/zitadel/zitadel-charts/issues/113 is resolved
  dbSslRootCrtSecret:
  dbSslClientCrtSecret:
  # Reference the name of the secret that contains the masterkey.
  # The key should be named "masterkey".
  masterkeySecretName: "zitadel-core-key"

replicaCount: 1

# Additional environment variables
# see more here: https://github.com/zitadel/zitadel/blob/main/cmd/defaults.yaml
env:
  - name: ZITADEL_EXTERNAL_DOMAIN
    value: "**REDACTED**"
  # all of these come from an external secret
  - name: ZITADEL_DATABASE_POSTGRES_USER_USERNAME
    valueFrom:
      secretKeyRef:
        name: zitadel-db-credentials
        key: username
  - name: ZITADEL_DATABASE_POSTGRES_USER_PASSWORD
    valueFrom:
      secretKeyRef:
        name: zitadel-db-credentials
        key: password
  - name: ZITADEL_DATABASE_POSTGRES_ADMIN_USERNAME
    valueFrom:
      secretKeyRef:
        name: zitadel-db-credentials
        key: adminUser
  - name: ZITADEL_DATABASE_POSTGRES_ADMIN_PASSWORD
    valueFrom:
      secretKeyRef:
        name: zitadel-db-credentials
        key: adminPassword

ingress:
  enabled: true
  className: "nginx"
  annotations:
    kubernetes.io/tls-acme: "true"
    cert-manager.io/cluster-issuer: letsencrypt-staging
  hosts:
    - host:  "**REDACTED**"
      paths:
        - path: /
          pathType: Prefix
  tls:
    - secretName: zitadel-tls
      hosts:
        -  "**REDACTED**"

metrics:
  enabled: false
  serviceMonitor:
    enabled: false

readinessProbe:
  enabled: true
  initialDelaySeconds: 15
  periodSeconds: 10
  failureThreshold: 6

livenessProbe:
  enabled: true
  initialDelaySeconds: 15
  periodSeconds: 10
  failureThreshold: 6
click here for postgres values.yaml

I am still using bitnami's helm chart for postgres and am only passing in a few values:

fullnameOverride: zitadel-postgres
global:
  postgresql:
    auth:
      username: zitadel
      existingSecret: zitadel-db-credentials
      secretKeys:
        userPasswordKey: password
        adminPasswordKey: adminPassword
volumePermissions:
  enabled: true
primary:
  pgHbaConfiguration: |-
    local all all trust
    host all all 127.0.0.1/32 md5
    host all zitadel 10.0.0.0/8 md5
    host all postgres 10.0.0.0/8 md5
  persistence:
    enabled: true
    # Use an existing Persistent Volume Claim (must be created ahead of time)
    existingClaim: "zitadel-postgres"

The weird thing is that everything shows as healthy:
Screenshot showing the Argo CD web interface for the zitadel app which shows all resources healthy and up

I wonder if this is a weird thing where Argo CD doesn't play nice with the helm hooks. I don't know if this something you see in flux at all. If you didn't encounter this, no problem. Just thought I'd ask since I'm a bit puzzled.

@samip5
Copy link
Author

samip5 commented Aug 20, 2023

Did you ever end up getting this error in the browser when you go to your zitadel domain?

ID=QUERY-n0wng Message=Instance not found

Yes, I did get that error and the official docs tell you about it.

@jessebot
Copy link
Contributor

jessebot commented Aug 20, 2023

Weird that I'm still getting it, because I'm specifying the following in my values.yaml:

# Additional environment variables
# see more here: https://github.com/zitadel/zitadel/blob/main/cmd/defaults.yaml
env:
  - name: ZITADEL_EXTERNAL_DOMAIN
    value: "**REDACTED**"

It looks like I was running into this though: zitadel/zitadel#6367 After updating ZITADEL_EXTERNAL_DOMAIN to ZITADEL_EXTERNALDOMAIN all is working!! Thanks again for all your help and I hope you have a great day :)

@eliobischof
Copy link
Member

If I didn't miss anything, PR #111 should resolve this issue.

@eliobischof eliobischof linked a pull request Aug 29, 2023 that will close this issue
11 tasks
@hifabienne hifabienne moved this to 🏗 In progress in Product Management Sep 6, 2023
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in Product Management Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants