Skip to content

fix(helm): Fix statefulset templates to not show diffs in ArgoCD #15192

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

Merged
merged 1 commit into from
Dec 9, 2024

Conversation

sviatlo
Copy link
Contributor

@sviatlo sviatlo commented Nov 29, 2024

What this PR does / why we need it:
This PR fixes PersistentVolumeClaim definition in statefulset templates for various apps to avoid diffs in ArgoCD.

Checklist

  • Reviewed the CONTRIBUTING.md guide (required)
  • Documentation added
  • Tests updated
  • Title matches the required conventional commits format, see here
    • Note that Promtail is considered to be feature complete, and future development for logs collection will be in Grafana Alloy. As such, feat PRs are unlikely to be accepted unless a case can be made for the feature actually being a bug fix to existing behavior.
  • Changes that require user attention or interaction to upgrade are documented in docs/sources/setup/upgrade/_index.md
  • If the change is deprecating or removing a configuration option, update the deprecated-config.yaml and deleted-config.yaml files respectively in the tools/deprecated-config-checker directory. Example PR
@sviatlo sviatlo requested a review from a team as a code owner November 29, 2024 20:37
@CLAassistant
Copy link

CLAassistant commented Nov 29, 2024

CLA assistant check
All committers have signed the CLA.

This comment has been minimized.

1 similar comment

This comment has been minimized.

@sviatlo
Copy link
Contributor Author

sviatlo commented Dec 1, 2024

Hi @trevorwhitney! Sorry to ping you like that, but I saw that you have reviewed a loki/helm PR recently and thought to ask you to take a look at this PR when you will have time. Thanks in advance!

This comment has been minimized.

2 similar comments

This comment has been minimized.

This comment has been minimized.

Copy link
Collaborator

@trevorwhitney trevorwhitney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the contribution. can you explain how this change fixes your problem of diffs in ArgoCD? have you considered any other approaches that would allow a user, such as yourself, to template in the changes they need for their CD env without changing the defaults for everyone, or can you explain why everyone would benefit from this change?

@sviatlo
Copy link
Contributor Author

sviatlo commented Dec 5, 2024

This is the diff in argocd:
image
The cause of the diff is that argocd reads k8s resource that has these fields set and compares it to a manifest generated from the helm chart where the fields are omitted as a shorthand. I can technically ignore this diff in argocd, but I don't see a reason why not to fix this upstream.
You can see the same changes done in mimir and tempo charts: mimir, tempo.

Copy link
Contributor

github-actions bot commented Dec 9, 2024

Kubernetes Manifest Diff Summary

Scenario: default-single-binary-values (Added: 0, Modified: 0, Removed: 0)

Summary:

  • Added: 0

  • Modified: 0

  • Removed: 0

Added Files

No added files

Modified Files

No modified files

Removed Files

No removed files

Scenario: default-values (Added: 0, Modified: 0, Removed: 0)

Summary:

  • Added: 0

  • Modified: 0

  • Removed: 0

Added Files

No added files

Modified Files

No modified files

Removed Files

No removed files

Scenario: ingress-values (Added: 0, Modified: 0, Removed: 0)

Summary:

  • Added: 0

  • Modified: 0

  • Removed: 0

Added Files

No added files

Modified Files

No modified files

Removed Files

No removed files

Scenario: legacy-monitoring-values (Added: 0, Modified: 0, Removed: 0)

Summary:

  • Added: 0

  • Modified: 0

  • Removed: 0

Added Files

No added files

Modified Files

No modified files

Removed Files

No removed files

Scenario: simple-scalable-aws-kube-irsa-values (Added: 0, Modified: 0, Removed: 0)

Summary:

  • Added: 0

  • Modified: 0

  • Removed: 0

Added Files

No added files

Modified Files

No modified files

Removed Files

No removed files

Copy link
Collaborator

@trevorwhitney trevorwhitney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the explanation and examples from tempo and mimir. lgtm!

@trevorwhitney trevorwhitney merged commit 3c71c83 into grafana:main Dec 9, 2024
61 checks passed
@aslafy-z aslafy-z mentioned this pull request Jun 12, 2025
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants