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

[kube-prometheus-stack] introduce PVC claim retention field in prometheus operator #4570

Conversation

Woojciech
Copy link
Contributor

@Woojciech Woojciech commented May 27, 2024

What this PR does / why we need it

This PR exposes persistentVolumeClaimRetentionPolicy field of Prometheus / PrometheusAgent, a CRD resource from Prometheus operator. PersistentVolumeClaimRetentionPolicy is a feature introduced for StatefulSets (by default in K8s 1.27.0+), this feature lets us decide whether the StatefulSet should delete or retain it's corresponding PVC's it is deleted or scaled. It is particularly useful in environments where stale volumes can grow in amount, causing additional costs or clutter in general. The CRD field itself was added to Prometheus operator around October last year, however not yet exposed in kube-prometheus-stack.

Change provided in this PR is based on the work already present in the prometheus chart , please see the special notes section.

Special notes for your reviewer

This PR is based on the previous work which was made in the prometheus chart, as per links provided below. I wanted to add this exact feature into the chart and I found that it was already done in the linked prometheus operator chart.

Please let me know if relying on the previous implementation has any legal implications (licensing etc.) - if I should for example add authors of mentioned changes as co-authors or provide credits for their work in any other way.

Checklist

  • DCO signed
  • Chart Version bumped
  • Title of the PR starts with chart name (e.g. [prometheus-couchdb-exporter])

…erator

Signed-off-by: Wojciech Suszko <wsuszko14@gmail.com>
Signed-off-by: Wojciech Suszko <wsuszko14@gmail.com>
Signed-off-by: Wojciech Suszko <wsuszko14@gmail.com>
Woojciech and others added 3 commits May 28, 2024 23:12
Signed-off-by: Wojciech Suszko <wsuszko14@gmail.com>
Signed-off-by: Wojciech Suszko <53919286+Woojciech@users.noreply.github.com>
Signed-off-by: Wojciech Suszko <wsuszko14@gmail.com>
jkroepke
jkroepke previously approved these changes May 28, 2024
Signed-off-by: Wojciech Suszko <wsuszko14@gmail.com>
@Woojciech
Copy link
Contributor Author

fixed trailing spaces, hopefully everything will be well formatted this time :)

@Woojciech Woojciech requested a review from jkroepke May 29, 2024 15:04
@Woojciech
Copy link
Contributor Author

Hi @jkroepke can I please ask you for re-approval, as I fixed all the required checks?

@jkroepke jkroepke merged commit db15dcf into prometheus-community:main May 31, 2024
4 checks passed
lukas-unity pushed a commit to lukas-unity/helm-charts-1 that referenced this pull request Jun 6, 2024
…heus operator (prometheus-community#4570)

Signed-off-by: Lukas Monkevicius <lukas.monkevicius@unity3d.com>
Maven35 pushed a commit to Maven35/helm-charts that referenced this pull request Jun 6, 2024
Maven35 pushed a commit to Maven35/helm-charts that referenced this pull request Jun 6, 2024
…heus operator (prometheus-community#4570)

Signed-off-by: Maven35 <Charles.Tony.Gibbs@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants