Skip to content

Improve ArgoCD support #2041

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 2 commits into from
Mar 20, 2023
Merged

Improve ArgoCD support #2041

merged 2 commits into from
Mar 20, 2023

Conversation

francescsanjuanmrf
Copy link
Contributor

Description

The relabelings block of the serviceMonitor configuration for the k8s-control-plane component does not include the action field.

The default value for action is replace.

Having this field undefined makes ArgoCD to be always unsynced.

The definitions in this repo code lack the action field, but when the object is created in Kubernetes, the field is written in the Kubernetes object with the default value (replace). Then, ArgoCD compares with the code in the repo and tries to sync again (removing the action field). This causes an infinite loop of adding and removing the action field.

Setting the action field to the default value (replace) in the code solves this problem and does not change the behavior of serviceMonitor.

Type of change

  • CHANGE (fix or feature that would cause existing functionality to not work as expected)
  • FEATURE (non-breaking change which adds functionality)
  • BUGFIX (non-breaking change which fixes an issue)
  • ENHANCEMENT (non-breaking change which improves existing functionality)
  • NONE (if none of the other choices apply. Example, tooling, build system, CI, docs, etc.)

Changelog entry

Modifies k8s-control-plane's serviceMonitors to be compatible with [ArgoCD](https://argo-cd.readthedocs.io/en/stable/)

Signed-off-by: Fran Sanjuán <[email protected]>
Copy link
Contributor

@philipgough philipgough left a comment

Choose a reason for hiding this comment

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

@francescsanjuanmrf change makes sense but you will need to run make --always-make generate to generate YAML and pass CI

@philipgough philipgough enabled auto-merge (squash) March 15, 2023 11:43
auto-merge was automatically disabled March 16, 2023 16:15

Head branch was pushed to by a user without write access

@francescsanjuanmrf
Copy link
Contributor Author

Just added the modified YAML.

Thanks for your help!

Signed-off-by: Fran Sanjuán <[email protected]>
@philipgough philipgough merged commit ec56f45 into prometheus-operator:main Mar 20, 2023
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.

2 participants