bitnami / charts

Bitnami Helm Charts
https://bitnami.com
Other
9.01k stars 9.22k forks source link

[bitnami/harbor] failed to initialize cache: cache type not support #29369

Closed davgia closed 1 month ago

davgia commented 1 month ago

Name and Version

bitnami/harbor 23.0.3

What architecture are you using?

amd64

What steps will reproduce the bug?

  1. create an empty namespace
  2. install the chart with the provided values.yaml

Are you using any custom parameters or values?

# NOTE: I would like to use existingSecret functionality to avoid placing plaintext secrets in the chart values
apiVersion: v1
data:
  secret: ******
  secretKey: ******
kind: Secret
metadata:
  name: harbor-setup-core
  namespace: test-harbor
type: Opaque
---
apiVersion: v1
data:
  CSRF_KEY: ******
  POSTGRESQL_PASSWORD: ******
  REGISTRY_CREDENTIAL_PASSWORD: ******
  REGISTRY_CREDENTIAL_USERNAME: ******
kind: Secret
metadata:
  name: harbor-setup-env-vars-shared
  namespace: test-harbor
type: Opaque
---
apiVersion: v1
data:
  REGISTRY_HTPASSWD: ******
  REGISTRY_HTTP_SECRET: ******
kind: Secret
metadata:
  name: harbor-setup-registry
  namespace: test-harbor
type: Opaque
---
apiVersion: v1
data:
  secret: *****
kind: Secret
metadata:
  name: harbor-jobservice
  namespace: test-harbor
type: Opaque
---
apiVersion: v1
data:
  postgres-password: *****
kind: Secret
metadata:
  name: harbor-postgresql
  namespace: test-harbor
type: Opaque
---
apiVersion: v1
data:
  redis-password: *****
kind: Secret
metadata:
  name: harbor-redis
  namespace: test-harbor
type: Opaque
---
# helm chart values
global:
  storageClass: nfs-client
# exposure configuration
externalURL: https://harbor.********
exposureType: ingress
# ingress configuration
ingress:
  core:
    hostname: harbor.********
    ingressClassName: nginx
    annotations:
      cert-manager.io/cluster-issuer: *******
    tls: true
# persistence configuration
persistence:
  persistentVolumeClaim:
    registry:
      enabled: true
      size: 8Gi
# secrets (initial password, change it)
adminPassword: ******
# core secrets
core:
  image:
    debug: true
  csrfKey: ********
  existingSecret: harbor-setup-core
  existingEnvVarsSecret: harbor-setup-env-vars-shared 
# registry secrets
registry:
  secret: harbor-setup-registry
# job service secrets
jobservice:
  existingSecret: harbor-jobservice
  existingEnvVarsSecret: harbor-setup-env-vars-shared
# postgresql configuration
postgresql:
  auth:
    existingSecret: harbor-postgresql
# redis configuration
redis:
  auth:
    existingSecret: harbor-redis

What is the expected behavior?

I should be able to deploy the helm chart successfully without errors.

What do you see instead?

Helm chart installation fails due to timeout reached. The problem is that harbor-core pod goes into CrashLoopBackOff state with the following stdout:

 15:53:36.80 INFO  ==> 
 15:53:36.80 INFO  ==> Welcome to the Bitnami harbor-core container
 15:53:36.80 INFO  ==> Subscribe to project updates by watching https://github.com/bitnami/containers
 15:53:36.80 INFO  ==> Submit issues and feature requests at https://github.com/bitnami/containers/issues
 15:53:36.80 INFO  ==> Upgrade to Tanzu Application Catalog for production environments to access custom-configured and pre-packaged software components. Gain enhanced features, including Software Bill of Materials (SBOM), CVE scan result reports, and VEX documents. To learn more, visit https://bitnami.com/enterprise
 15:53:36.80 INFO  ==> 
 15:53:36.81 INFO  ==> ** Starting harbor-core setup **
harbor-core 15:53:36.82 INFO  ==> Validating Core settings...
harbor-core 15:53:36.84 INFO  ==> No custom certificates were installed in the system
 15:53:36.84 INFO  ==> ** harbor-core setup finished! **

harbor-core 15:53:36.85 INFO  ==> ** Starting harbor-core **
2024-09-11T15:53:36Z [DEBUG] [/pkg/permission/evaluator/rbac/casbin_match.go:65]: Starting regexp store purge in 48m0s
2024/09/11 15:53:36.878 [D]  init global config instance failed. If you do not use this, just ignore it.  open conf/app.conf: no such file or directory
2024-09-11T15:53:36Z [INFO] [/controller/artifact/annotation/parser.go:85]: the annotation parser to parser artifact annotation version v1alpha1 registered
2024-09-11T15:53:36Z [INFO] [/controller/artifact/processor/processor.go:59]: the processor to process media type application/vnd.cncf.helm.config.v1+json registered
2024-09-11T15:53:36Z [INFO] [/controller/artifact/processor/processor.go:59]: the processor to process media type application/vnd.cnab.manifest.v1 registered
2024-09-11T15:53:36Z [INFO] [/controller/artifact/processor/processor.go:59]: the processor to process media type application/vnd.oci.image.index.v1+json registered
2024-09-11T15:53:36Z [INFO] [/controller/artifact/processor/processor.go:59]: the processor to process media type application/vnd.docker.distribution.manifest.list.v2+json registered
2024-09-11T15:53:36Z [INFO] [/controller/artifact/processor/processor.go:59]: the processor to process media type application/vnd.docker.distribution.manifest.v1+prettyjws registered
2024-09-11T15:53:36Z [INFO] [/controller/artifact/processor/processor.go:59]: the processor to process media type application/vnd.oci.image.config.v1+json registered
2024-09-11T15:53:36Z [INFO] [/controller/artifact/processor/processor.go:59]: the processor to process media type application/vnd.docker.container.image.v1+json registered
2024-09-11T15:53:36Z [INFO] [/controller/artifact/processor/processor.go:59]: the processor to process media type application/vnd.goharbor.harbor.sbom.v1 registered
2024-09-11T15:53:36Z [INFO] [/controller/artifact/processor/processor.go:59]: the processor to process media type application/vnd.wasm.config.v1+json registered
2024-09-11T15:53:36Z [INFO] [/pkg/reg/adapter/native/adapter.go:36]: the factory for adapter docker-registry registered
2024-09-11T15:53:36Z [INFO] [/pkg/reg/adapter/aliacr/adapter.go:44]: the factory for adapter ali-acr registered
2024-09-11T15:53:36Z [INFO] [/pkg/reg/adapter/awsecr/adapter.go:44]: the factory for adapter aws-ecr registered
2024-09-11T15:53:36Z [INFO] [/pkg/reg/adapter/azurecr/adapter.go:29]: Factory for adapter azure-acr registered
2024-09-11T15:53:36Z [INFO] [/pkg/reg/adapter/dockerhub/adapter.go:40]: Factory for adapter docker-hub registered
2024-09-11T15:53:36Z [INFO] [/pkg/reg/adapter/dtr/adapter.go:36]: the factory of dtr adapter was registered
2024-09-11T15:53:36Z [INFO] [/pkg/reg/adapter/githubcr/adapter.go:43]: the factory for adapter github-ghcr registered
2024-09-11T15:53:36Z [INFO] [/pkg/reg/adapter/gitlab/adapter.go:33]: the factory for adapter gitlab registered
2024-09-11T15:53:36Z [INFO] [/pkg/reg/adapter/googlegcr/adapter.go:37]: the factory for adapter google-gcr registered
2024-09-11T15:53:36Z [INFO] [/pkg/reg/adapter/huawei/huawei_adapter.go:40]: the factory of Huawei adapter was registered
2024-09-11T15:53:36Z [INFO] [/pkg/reg/adapter/jfrog/adapter.go:42]: the factory of jfrog artifactory adapter was registered
2024-09-11T15:53:36Z [INFO] [/pkg/reg/adapter/quay/adapter.go:53]: the factory of Quay adapter was registered
2024-09-11T15:53:36Z [INFO] [/pkg/reg/adapter/tencentcr/adapter.go:55]: the factory for adapter tencent-tcr registered
2024-09-11T15:53:36Z [INFO] [/pkg/reg/adapter/volcenginecr/adapter.go:40]: the factory for adapter volcengine-cr registered
2024-09-11T15:53:36Z [DEBUG] [/pkg/notifier/topic/topics.go:37]: topic http is subscribed
2024-09-11T15:53:36Z [DEBUG] [/pkg/notifier/topic/topics.go:37]: topic slack is subscribed
2024-09-11T15:53:36Z [INFO] [/pkg/reg/adapter/harbor/adaper.go:31]: the factory for adapter harbor registered
2024-09-11T15:53:36Z [DEBUG] [/core/auth/authenticator.go:133]: Registered authentication helper for auth mode: db_auth
2024-09-11T15:53:36Z [DEBUG] [/core/auth/authenticator.go:133]: Registered authentication helper for auth mode: uaa_auth
2024-09-11T15:53:36Z [DEBUG] [/core/auth/authenticator.go:133]: Registered authentication helper for auth mode: ldap_auth
2024-09-11T15:53:36Z [DEBUG] [/core/auth/authenticator.go:133]: Registered authentication helper for auth mode: oidc_auth
2024-09-11T15:53:36Z [DEBUG] [/core/auth/authenticator.go:133]: Registered authentication helper for auth mode: http_auth
2024-09-11T15:53:36Z [INFO] [/core/controllers/base.go:159]: Config path: /etc/core/app.conf
2024-09-11T15:53:36Z [INFO] [/core/main.go:145]: initializing cache ...
2024-09-11T15:53:36Z [FATAL] [/core/main.go:156]: failed to initialize cache: cache type  not support
Stream closed EOF for test-harbor/harbor-core-5f856fbd77-q9n9l (core)

Additional information

I have tried to deploy the chart specifying the following values and it does work as expected:

global:
  postgresql:
    auth:
      postgresPassword: test
adminPassword: test
core:
  secret: test
  secretKey: test
  csrfKey: "00000000000000000000000000000000"
registry:
  secret: test
jobservice:
  secret: test

There must be something I'm missing...

carrodher commented 1 month ago

The issue may not be directly related to the Bitnami container image/Helm chart, but rather to how the application is being utilized, configured in your specific environment, or tied to a specific scenario that is not easy to reproduce on our side.

If you think that's not the case and are interested in contributing a solution, we welcome you to create a pull request. The Bitnami team is excited to review your submission and offer feedback. You can find the contributing guidelines here.

Your contribution will greatly benefit the community. Feel free to reach out if you have any questions or need assistance.

Suppose you have any questions about the application, customizing its content, or technology and infrastructure usage. In that case, we highly recommend that you refer to the forums and user guides provided by the project responsible for the application or technology.

With that said, we'll keep this ticket open until the stale bot automatically closes it, in case someone from the community contributes valuable insights.

davgia commented 1 month ago

Hi @carrodher,

as I said specifying the secrets in the chart values does not result in this error. It must be something related to the chart. I will keep looking.

github-actions[bot] commented 1 month 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.

github-actions[bot] commented 1 month ago

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.