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

fix: do not strip essential fields #6008

Merged
merged 1 commit into from Oct 15, 2023
Merged

Conversation

rexagod
Copy link
Contributor

@rexagod rexagod commented Oct 14, 2023

Description

Avoid stripping away the "description" field that collided with kubebuilder's appended "description" metadata field while generating the CRD schema.

Fixes: #5129

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

Avoid stripping away the "description" field that collided with
kubebuilder's appended "description" metadata field while generating the
CRD schema.

Fixes: prometheus-operator#5129

Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>
@rexagod rexagod requested a review from a team as a code owner October 14, 2023 21:11
Copy link
Contributor

@xiu xiu left a comment

Choose a reason for hiding this comment

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

LGTM, I see the field in pagerdutyConfigs and opsgenieConfigs.

❯ diff -u stripped-down-crds.yaml stripped-down-crds.yaml-new
--- stripped-down-crds.yaml     2023-10-15 08:32:45
+++ stripped-down-crds.yaml-new 2023-10-15 08:32:31
@@ -505,6 +505,8 @@
                             - key
                             type: object
                           apiURL:
+                            type: string
+                          description:
                             type: string
                           details:
                             items:
@@ -761,6 +763,8 @@
                           clientURL:
                             type: string
                           component:
+                            type: string
+                          description:
                             type: string
                           details:
                             items:

Thanks!

@xiu xiu merged commit 75f05e1 into prometheus-operator:main Oct 15, 2023
17 checks passed
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.

Missing "description" filed in AlertmanagerConfig / pagerdutyConfigs when using stripped-down-crds.yaml CRDs
2 participants