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

[bitnami/redis] Redis trying to use values from postgres #20504

Closed
jankovicgd opened this issue Oct 30, 2023 · 6 comments
Closed

[bitnami/redis] Redis trying to use values from postgres #20504

jankovicgd opened this issue Oct 30, 2023 · 6 comments
Assignees
Labels
redis solved tech-issues The user has a technical issue about an application

Comments

@jankovicgd
Copy link

Name and Version

bitnami/redis:17.17.1

What architecture are you using?

amd64

What steps will reproduce the bug?

  1. Using postgresql-12.5.6 & redis:17.17.1 (also tried 18.2.x & 18.1.x)
  2. Values and chart below

values.yaml

global: ...

database:
  auth:
    username: dbuser
    password: dbpw
    database: dbname
    postgresPassword: dbpgpw
  primary:
    persistence:
      enabled: false
      existingClaim: data-access-db
    initdb:
      scripts:
        enablePostgis.sh: |
          echo "Enabling postgis"
          PGPASSWORD="${POSTGRES_POSTGRES_PASSWORD}" psql -U postgres -d "${POSTGRES_DB}" -c "CREATE EXTENSION postgis;"
  replicaCount: 1
  resources:
    limits:
      cpu: "1.5"
      memory: 6Gi
    requests:
      cpu: "0.1"
      memory: 0.5Gi
  affinity: {}

redis:
  auth:
    password: ""
  master:
    persistence:
      existingClaim: data-access-redis
      enabled: true
      storageClass: managed-nfs-storage
  architecture: standalone

... other values

Chart.yaml

apiVersion: v2
name: vs
description: A Helm chart for a Kubernetes deployment of the View Server (VS)
type: application
version: "4.3.0"
appVersion: "4.3.0"
maintainers:
  - name: EOX IT Services GmbH
    url: https://eox.at
dependencies:
  - name: "postgresql"
    version: "12.5.6"
    repository: "https://charts.bitnami.com/bitnami"
    alias: database
  - name: "redis"
    version: "17.17.1"
    repository: "https://charts.bitnami.com/bitnami"
    alias: redis
  1. run
helm template default path/to/chart

Are you using any custom parameters or values?

No response

What is the expected behavior?

Rendered templates

What do you see instead?

Error: template: vs/charts/redis/templates/master/service.yaml:12:14: 
executing "vs/charts/redis/templates/master/service.yaml" at <include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" $)>: 
error calling include: template: vs/charts/database/charts/common/templates/_labels.tpl:6:27: 
executing "common.labels.standard" at <include "common.names.name" .>: 
error calling include: template: vs/charts/database/charts/common/templates/_names.tpl:6:18: 
executing "common.names.name" at <.Chart.Name>: nil pointer evaluating interface {}.Name

Additional information

The chart was working prior but I wanted to update redis to a newer version (old was 10.9). Seems like the redis service.yaml is trying to use .tpl files from postgres.

Any help would be greatly appreciated. I am unsure if this is a bug or something on my side.

@jankovicgd jankovicgd added the tech-issues The user has a technical issue about an application label Oct 30, 2023
@github-actions github-actions bot added the triage Triage is needed label Oct 30, 2023
@javsalgar javsalgar changed the title Redis trying to use values from postgres [bitnami/redis] Redis trying to use values from postgres Oct 31, 2023
@javsalgar
Copy link
Contributor

Hi!

Just to ensure, are you creating a custom chart with these subcharts? We would like to reproduce the issue

@jankovicgd
Copy link
Author

@javsalgar Yes, the whole thing is here at the moment: https://gitlab.eox.at/vs/vs/-/tree/csc-production-updates/chart

@github-actions github-actions bot added in-progress and removed triage Triage is needed labels Nov 2, 2023
@bitnami-bot bitnami-bot assigned migruiz4 and unassigned javsalgar Nov 2, 2023
@psych0d0g
Copy link

psych0d0g commented Nov 4, 2023

same issue aswell with mariadb and redis. if both are enabled in values i get the same error, chart is in development and available here: https://github.com/psych0d0g/romm/tree/helm/helm/romm

dependencies:
  - name: redis
    version: ~18.2.0
    repository: https://charts.bitnami.com/bitnami
    alias: redis
    condition: redis.enabled
  - name: mariadb
    version: ~11.1.2
    repository: https://charts.bitnami.com/bitnami
    alias: mariadb
    condition: mariadb.enabled
Error: template: romm/charts/redis/templates/replicas/statefulset.yaml:12:14: executing "romm/charts/redis/templates/replicas/statefulset.yaml" at <include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" $)>: error calling include: template: romm/charts/mariadb/charts/common/templates/_labels.tpl:6:27: executing "common.labels.standard" at <include "common.names.name" .>: error calling include: template: romm/charts/mariadb/charts/common/templates/_names.tpl:6:18: executing "common.names.name" at <.Chart.Name>: nil pointer evaluating interface {}.Name

@migruiz4
Copy link
Member

migruiz4 commented Nov 17, 2023

Hi @jankovicgd,

We are currently investigating an issue with the bitnami/common chart, where it appears we may have introduced some non-backward compatible changes accidentally.

Charts bitnami/postgresql:12.5.6 and bitnami/redis:17.17.1 are using incompatible versions of bitnami/common. The issue can be fixed by updating the bitnami/postgresql chart to a version later than 12.9.0.

@psych0d0g Same case with MariaDB prior to 13.1.0.

Edit: Version 2.9.0 of bitnami/common was indeed backward-compatible (#18154). The issue appears to be with Helm handling conflicting dependencies.

In this case, redis:18.2.0 uses bitnami/common:2.13.3, while postgresql:12.5.6 uses bitnami/common:2.8.0. IMO, expected behavior should be that Helm should prioritise bitnami/common:2.13.3 over 2.8.0, because it is the latest under the same major.

Real behavior appears to be that Helm is using a 'last to be loaded is taken' criteria, which does not consider versioning, as mentioned here: helm/helm#11561 (comment)

@jankovicgd
Copy link
Author

Hey @migruiz4 thanks for the help! I will see to update postgresql to >= 12.9.0 and write here the findings.

@jankovicgd
Copy link
Author

I updated to 12.12.10 and am able to render charts again, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
redis solved tech-issues The user has a technical issue about an application
Projects
None yet
Development

No branches or pull requests

4 participants