Code Monkey home page Code Monkey logo

Comments (6)

javsalgar avatar javsalgar commented on September 25, 2024

Hi!

Did you try master.persistence.labels and replica.persistence.labels?

from charts.

MauroSoli avatar MauroSoli commented on September 25, 2024

Hi all, thanks for the help.

I will give you some context: I use the Redis Sentinel setup, here is the replica.persistence and sentinel sections of my values.yaml:

replica:
  replicaCount: 3
  persistence:
    storageClass: "gp3-retain"
    ## @param replica.persistence.accessModes Persistent Volume access modes
    ##
    accessModes:
      - ReadWriteOnce
    ## @param replica.persistence.size Persistent Volume size
    ##
    size: 8Gi
    ## @param replica.persistence.labels Additional custom labels for the PVC
    ##
    labels:
      snapshotScheduler: enabled
  resources:
    limits:
      memory: 1Gi
    requests:
      cpu: 100m
      memory: 100Mi


sentinel:
  enabled: true
  image:
    repository: bitnami/redis-sentinel
    tag: 7.2.4-debian-11-r3
    ## Enable debug mode
    ##
    debug: false
  downAfterMilliseconds: 30000
  failoverTimeout: 120000
  ## @param sentinel.masterSet Master set name
  ##
  masterSet: master
  resources:
    limits:
      memory: 500Mi
    requests:
      cpu: 100m
      memory: 100Mi

I attempted to utilize the commonLabels but it did not function as expected: the labels were not successfully added to the PVC. Furthermore, this approach does not appear to be an optimal or clean solution.

from charts.

javsalgar avatar javsalgar commented on September 25, 2024

Hi!

I see the issue. In sentinel/statefulset.yaml I see that the labels section is not set

      kind: PersistentVolumeClaim
      metadata:
        name: redis-data
        labels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 10 }}
          app.kubernetes.io/component: node

It should be

      kind: PersistentVolumeClaim
      metadata:
        name: redis-data
        {{- $claimLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.replica.persistence.labels .Values.commonLabels ) "context" . ) }}
        labels: {{- include "common.labels.matchLabels" ( dict "customLabels" $claimLabels "context" $ ) | nindent 10 }}
          app.kubernetes.io/component: node

Would you like to submit a PR updating the file?

from charts.

SiebelsTim avatar SiebelsTim commented on September 25, 2024

Aren't these thrown away in matchLabels? Is matchLabels the correct function here? It is not used in a match context.

from charts.

github-actions avatar github-actions commented on September 25, 2024

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.

from charts.

github-actions avatar github-actions commented on September 25, 2024

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.

from charts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.