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

PriorityClassName is not set in redis-ha components #2704

Open
zoispag opened this issue May 21, 2024 · 7 comments
Open

PriorityClassName is not set in redis-ha components #2704

zoispag opened this issue May 21, 2024 · 7 comments

Comments

@zoispag
Copy link

zoispag commented May 21, 2024

Describe the bug

When setting global.priorityClassName and redis-ha.enabled: true the redis components (redis-ha-servers and redis-ha-proxys) do not set the same priorityClassName.

Related helm chart

argo-cd

Helm chart version

6.9.3

To Reproduce

Deploy HA ArgoCD with the following values.yml:

global:
  priorityClassName: system-cluster-critical

redis-ha:
  enabled: true

controller:
  replicas: 1

server:
  replicas: 2

repoServer:
  replicas: 2

applicationSet:
  replicas: 2

Expected behavior

Global priorityClassName should be also set to ha-redis components. In case of non ha-redis, redis deployment does get the priorityClassName as expected.

Screenshots

No response

Additional context

redis-ha is a dependency:

dependencies:
  - name: redis-ha
    version: 4.26.1
    repository: https://dandydeveloper.github.io/charts/
    condition: redis-ha.enabled

and has support for setting priorityClassName:

https://github.com/DandyDeveloper/charts/blob/0fe831e1c5171dd0217e1f543d40798f473a561f/charts/redis-ha/templates/redis-haproxy-deployment.yaml#L181-L183

https://github.com/DandyDeveloper/charts/blob/0fe831e1c5171dd0217e1f543d40798f473a561f/charts/redis-ha/templates/redis-ha-statefulset.yaml#L523-L525

@mkilchhofer
Copy link
Member

I think this is outside of our control. Is a comment inside the table enough? Or shall we try to contribute to @DandyDeveloper's chart?

@zoispag
Copy link
Author

zoispag commented May 21, 2024

I thought about contributing this myself but remembered that templating is not possible inside values file.

I think this is outside of our control. Is a comment inside the table enough? Or shall we try to contribute to @DandyDeveloper's chart?

I am not sure what contributing to @DandyDeveloper's chart would mean in this case.

It would be perfect if this was possible:

  • when redis-ha.enabled=true and global.priorityClassName=system-cluster-critical
  • then redis-ha.priorityClassName=system-cluster-critical and redis-ha.haproxy.priorityClassName=system-cluster-critical

But I am not sure how this can be achieved.

That being said, the best next thing is probably adding a reminder/note in README.md and/or in values.yaml, to include these values too.

@mkilchhofer
Copy link
Member

mkilchhofer commented May 21, 2024

So it seems that you are new to helms internals? Did you read https://helm.sh/docs/chart_template_guide/subcharts_and_globals/#global-chart-values ?
In summary:
.Values.global.xyz is a reserved section which is passed to all dependency charts inside a helm chart (also called subcharts).

What we can do is contributing the feature that the redis-ha chart is also respecting .Values.global.priorityClassName.

@mkilchhofer
Copy link
Member

I filed a PR over there:

Let's see if @DandyDeveloper supports our use case 🤞

@zoispag
Copy link
Author

zoispag commented May 22, 2024

I was not aware of the globals values namespace. I always thought it was just a naming convention among maintainers. TIL 💡

Thanks for sharing! 🙏🏼

And thanks for creating a PR to redis-ha chart! Let's see! 🤞🏼

@DandyDeveloper
Copy link

DandyDeveloper commented May 26, 2024

Sorry for the delay. I see no issue with this, especially with the benefit of this making it more compatible with other charts that depend on this as a dep.

Working through the PR.

Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants