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

monitoring: allow overriding monitoring labels #9240

Merged
merged 1 commit into from Nov 24, 2021

Conversation

LittleFox94
Copy link
Contributor

@LittleFox94 LittleFox94 commented Nov 24, 2021

Description of your changes:

This is a backport of #9180 into v1.7 branch, also making sure the tests for pkg/apis/rook.io.Labels are run by renaming labels_spec.go back to labels_test.go.

Which issue is resolved by this Pull Request:
Resolves #8502 (in v1.7)

Checklist:

  • Commit Message Formatting: Commit titles and messages follow guidelines in the developer guide.
  • Skip Tests for Docs: Add the flag for skipping the build if this is only a documentation change. See here for the flag.
  • Skip Unrelated Tests: Add a flag to run tests for a specific storage provider. See test options.
  • Reviewed the developer guide on Submitting a Pull Request
  • Documentation has been updated, if necessary.
  • Unit tests have been added, if necessary.
  • Integration tests have been added, if necessary.
  • Pending release notes updated with breaking and/or notable changes, if necessary.
  • Upgrade from previous release is tested and upgrade user guide is updated, if necessary.
  • Code generation (make codegen) has been run to update object specifications, if necessary.

The templates for the mgr-generated ServiceMonitor and PrometheusRule objects included the labels
prometheus and team, making it impossible to override them as user.

This adds a new method `OverwriteApplyToObjectMeta` to pkg/apis/rook.io.Labels,
which, contrary to the existing `ApplyToObjectMeta` method, overwrites existing
labels.

Backport of PR rook#9180
Signed-off-by: Mara Sophie Grosch <littlefox@lf-net.org>
@leseb leseb merged commit 9c0eb3e into rook:release-1.7 Nov 24, 2021
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