bitnami / charts

Bitnami Helm Charts
https://bitnami.com
Other
8.88k stars 9.16k forks source link

[bitnami/mongodb] never makes it past validting env variables on KinD only #18640

Open jessebot opened 1 year ago

jessebot commented 1 year ago

Name and Version

bitnami/mongodb 13.16.4

What architecture are you using?

arm64 (tested on linux/amd with k3s and it works fine btw 👍 )

What steps will reproduce the bug?

On KIND on macOS ventura on an M1: I am using argocd to deploy mongodb through helm with the following manifest:

project: infisical
source:
  repoURL: registry-1.docker.io
  targetRevision: 13.16.4
  helm:
    values: |
      auth:
        enabled: true
        usernames:
          - "infisical"
        databases:
          - "infisical"
        # keys: mongodb-passwords, mongodb-root-password, mongodb-metrics-password, mongodb-replica-set-key
        existingSecret: "infisical-mongo-credentials"
      persistence:
        enabled: true
        existingClaim: ""
  chart: bitnamicharts/mongodb
destination:
  server: 'https://kubernetes.default.svc'
  namespace: infisical
syncPolicy:
  automated:
    prune: true
    selfHeal: true
  syncOptions:
    - ApplyOutOfSyncOnly=true

ArgoCD uses helm template to inflate the manifests and then applies them, so the most important thing here is just the values.yaml, which I'll also show directly below.

Are you using any custom parameters or values?

values.yaml:

auth:
  enabled: true
  usernames:
    - "infisical"
  databases:
    - "infisical"
  ## Existing secret with MongoDB credentials
  # keys: mongodb-passwords, mongodb-root-password, mongodb-metrics-password, mongodb-replica-set-key
  existingSecret: "infisical-mongo-credentials"
persistence:
  enabled: true

secret in the same namespace (this is an autogenerated secret from a test env):

apiVersion: v1
data:
  mongodb-metrics-password: ZWFxZzFKWmV5RGdLOGdCeVM4M0NBdkY4dWtTVWwyUzk=
  mongodb-passwords: eW9jVE9mak8yNTg3Y3Nwd0dtVWFZOGZkbnFtUzFEaUg=
  mongodb-root-password: Unk1ZzJtVHNLaU1qeW53QUxKQURBNnpQUHhWbHdOMGs=
kind: Secret
metadata:
  name: infisical-mongo-credentials
  namespace: infisical
type: Opaque

What is the expected behavior?

the pod would be up and the chart shown as deployed and healthy in argocd

What do you see instead?

The container never becomes ready and the liveness and readiness probes both show failed:

Liveness probe failed: Current Mongosh Log ID: 64dfcf47f1840009e797ecbe Connecting to: mongodb://127.0.0.1:27017/?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+1.10.3 MongoNetworkError: connect ECONNREFUSED 127.0.0.1:27017
Readiness probe failed: command "/bitnami/scripts/readiness-probe.sh" timed out
Readiness probe errored: rpc error: code = NotFound desc = failed to exec in container: failed to create exec "47b7107e8317aaf8632656ff72ab2b4f48125cba26a9bfeb84d54cae223f2bcd": task 713bc36050bbca1b68c9ab25f424964a05b925345196c7b99de0fbe2280cfc04 not found: not found

pod logs show:

mongodb 19:59:42.09 

mongodb 19:59:42.11 Welcome to the Bitnami mongodb container

mongodb 19:59:42.13 Subscribe to project updates by watching https://github.com/bitnami/containers

mongodb 19:59:42.15 Submit issues and feature requests at https://github.com/bitnami/containers/issues

mongodb 19:59:42.17 

mongodb 19:59:42.19 INFO  ==> ** Starting MongoDB setup **

mongodb 19:59:42.32 INFO  ==> Validating settings in MONGODB_* env vars...

pod env vars (noting again that the passwords were are all autogenerated test passwords (with no special characters during the tesitng phase) in an env that has been blown away):

_=/usr/bin/env
OS_ARCH=amd64
MONGODB_SERVICE_PORT_MONGODB=27017
INFISICAL_WEB_APP_FRONTEND_PORT=tcp://10.96.216.150:3000
PATH=/opt/bitnami/mongodb/bin:/opt/bitnami/common/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
OS_NAME=linux
KUBERNETES_PORT_443_TCP_PORT=443
KUBERNETES_PORT=tcp://10.96.0.1:443
INFISICAL_WEB_APP_FRONTEND_PORT_3000_TCP_PORT=3000
KUBERNETES_SERVICE_HOST=10.96.0.1
INFISICAL_WEB_APP_FRONTEND_PORT_3000_TCP_ADDR=10.96.216.150
MONGODB_DISABLE_JAVASCRIPT=no
ALLOW_EMPTY_PASSWORD=no
INFISICAL_WEB_APP_BACKEND_SERVICE_PORT=4000
MONGODB_SYSTEM_LOG_VERBOSITY=0
APP_VERSION=6.0.8
MONGODB_ENABLE_DIRECTORY_PER_DB=no
MONGODB_ROOT_PASSWORD=Ry5g2mTsKiMjynwALJADA6zPPxVlwN0k
INFISICAL_WEB_APP_BACKEND_PORT=tcp://10.96.220.213:4000
MONGODB_PORT=tcp://10.96.11.64:27017
INFISICAL_WEB_APP_BACKEND_PORT_4000_TCP_PORT=4000
INFISICAL_SECRE_CONTROLLER_MANAGER_METRICS_SERVICE_PORT_8443_TCP_PORT=8443
MONGODB_ENABLE_JOURNAL=yes
KUBERNETES_PORT_443_TCP_ADDR=10.96.0.1
INFISICAL_SECRE_CONTROLLER_MANAGER_METRICS_SERVICE_SERVICE_PORT_HTTPS=8443
BITNAMI_APP_NAME=mongodb
INFISICAL_SECRE_CONTROLLER_MANAGER_METRICS_SERVICE_SERVICE_PORT=8443
KUBERNETES_PORT_443_TCP_PROTO=tcp
SHLVL=1
INFISICAL_WEB_APP_BACKEND_SERVICE_HOST=10.96.220.213
INFISICAL_WEB_APP_FRONTEND_PORT_3000_TCP_PROTO=tcp
MONGODB_EXTRA_PASSWORDS=yocTOfjO2587cspwGmUaY8fdnqmS1DiH
TERM=xterm
MONGODB_PORT_27017_TCP_PORT=27017
INFISICAL_SECRE_CONTROLLER_MANAGER_METRICS_SERVICE_SERVICE_HOST=10.96.144.49
INFISICAL_WEB_APP_BACKEND_PORT_4000_TCP_ADDR=10.96.220.213
MONGODB_PORT_NUMBER=27017
BITNAMI_DEBUG=false
MONGODB_ENABLE_IPV6=no
MONGODB_SERVICE_HOST=10.96.11.64
MONGODB_PORT_27017_TCP_ADDR=10.96.11.64
INFISICAL_SECRE_CONTROLLER_MANAGER_METRICS_SERVICE_PORT_8443_TCP_PROTO=tcp
INFISICAL_WEB_APP_BACKEND_PORT_4000_TCP_PROTO=tcp
MONGODB_PORT_27017_TCP_PROTO=tcp
KUBERNETES_PORT_443_TCP=tcp://10.96.0.1:443
MONGODB_ROOT_USER=root
HOME=/
MONGODB_DISABLE_SYSTEM_LOG=no
INFISICAL_SECRE_CONTROLLER_MANAGER_METRICS_SERVICE_PORT=tcp://10.96.144.49:8443
INFISICAL_WEB_APP_FRONTEND_PORT_3000_TCP=tcp://10.96.216.150:3000
OS_FLAVOUR=debian-11
PWD=/
INFISICAL_WEB_APP_FRONTEND_SERVICE_PORT=3000
INFISICAL_SECRE_CONTROLLER_MANAGER_METRICS_SERVICE_PORT_8443_TCP_ADDR=10.96.144.49
MONGODB_EXTRA_USERNAMES=infisical
MONGODB_SERVICE_PORT=27017
INFISICAL_SECRE_CONTROLLER_MANAGER_METRICS_SERVICE_PORT_8443_TCP=tcp://10.96.144.49:8443
MONGODB_EXTRA_DATABASES=infisical
INFISICAL_WEB_APP_BACKEND_PORT_4000_TCP=tcp://10.96.220.213:4000
MONGODB_PORT_27017_TCP=tcp://10.96.11.64:27017
INFISICAL_WEB_APP_FRONTEND_SERVICE_HOST=10.96.216.150
HOSTNAME=mongodb-6b5fccf7d6-wdzcp
KUBERNETES_SERVICE_PORT=443
KUBERNETES_SERVICE_PORT_HTTPS=443

Additional information

I could be doing something wrong, and if I am, please let me know. I've been trying to get this working all day.

javsalgar commented 1 year ago

Hi!

Right now we do not have support for MongoDB in arm. As soon as we add support on it, we will notify the community.

github-actions[bot] commented 1 year ago

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

jessebot commented 1 year ago

no problem. Where can we find your official announcements for the community, so I can keep an eye out? :)

javsalgar commented 1 year ago

Hi!

Here you can check the announcements https://blog.bitnami.com/