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

Disable Prometheus Agent fields that are unrelated in DaemonSet mode #6944

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

haanhvu
Copy link
Contributor

@haanhvu haanhvu commented Sep 17, 2024

Description

Fail Prometheus Agent operator in DaemonSet mode if unrelated fields are set

Type of change

What type of changes does your code introduce to the Prometheus operator? Put an x in the box that apply.

  • 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.)

Verification

Please check the Prometheus-Operator testing guidelines for recommendations about automated tests.

Changelog entry

Disable Prometheus Agent fields that are unrelated in DaemonSet mode

Copy link
Contributor

@simonpasquier simonpasquier left a comment

Choose a reason for hiding this comment

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

Same as for #6943: it would be nice to list the fields which are not supported in the API documentation.

Copy link
Member

@ArthurSens ArthurSens left a comment

Choose a reason for hiding this comment

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

Should we be more explicit in the error message about what forbidden field must be removed?

If a user reads DaemonSet mode doesn't support storage setting but storage fields are set in Prometheus Agent CRD in DaemonSet mode, it might not be obvious to him/her which field needs to be removed

@simonpasquier
Copy link
Contributor

My suggestion would be something like

field '.spec.xxx' is not supported with DaemonSet mode and should be unset

@github-actions github-actions bot added the stale label Nov 19, 2024
@haanhvu haanhvu removed the stale label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants