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

Make PrometheusRule.spec.groups[].rules optional #5484

Closed

Conversation

mcbenjemaa
Copy link
Contributor

@mcbenjemaa mcbenjemaa commented Apr 11, 2023

Description

This PR makes PrometheusRule.spec.groups[].rules optional,
so, a manifest without rules defined can be accepted.

apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
  name: example
spec:
  groups:
  - name: example
    rules:

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

Changelog entry

Please put a one-line changelog entry below. This will be copied to the changelog file during the release process.

Change field `PrometheusRule.spec.groups[*].rules` to optional

Closes #5480

@mcbenjemaa mcbenjemaa requested a review from a team as a code owner April 11, 2023 00:51
@slashpai
Copy link
Contributor

Looks like a PR already created for this #5481

@mcbenjemaa
Copy link
Contributor Author

Oh, didn’t know that

@slashpai
Copy link
Contributor

Closing in favour of #5481

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.

PrometheusRules CR: Allow empty rule groups
2 participants