Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions hack/update-payload-crds.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@

source "$(dirname "${BASH_SOURCE}")/lib/init.sh"

shopt -s extglob

crd_globs="\
authorization/v1/zz_generated.crd-manifests/*_config-operator_*.crd*yaml\
config/v1/zz_generated.crd-manifests/*_config-operator_!(01_insightsdatagathers*).crd*yaml\
config/v1/zz_generated.crd-manifests/*_config-operator_*.crd*yaml\
machine/v1/zz_generated.crd-manifests/*.crd*yaml\
operator/v1/zz_generated.crd-manifests//*_config-operator_*.crd*yaml\
operator/v1alpha1/zz_generated.crd-manifests//*_config-operator_*.crd*yaml\
Comment on lines 9 to 10
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Typo: Double slashes in glob patterns.

Lines 9 and 10 contain double slashes (//) which appear to be typos:

  • operator/v1/zz_generated.crd-manifests//*_config-operator_*.crd*yaml
  • operator/v1alpha1/zz_generated.crd-manifests//*_config-operator_*.crd*yaml

While this may still work due to path normalization, it's inconsistent with the other patterns.

🔧 Suggested fix
-    operator/v1/zz_generated.crd-manifests//*_config-operator_*.crd*yaml\
-    operator/v1alpha1/zz_generated.crd-manifests//*_config-operator_*.crd*yaml\
+    operator/v1/zz_generated.crd-manifests/*_config-operator_*.crd*yaml\
+    operator/v1alpha1/zz_generated.crd-manifests/*_config-operator_*.crd*yaml\
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
operator/v1/zz_generated.crd-manifests//*_config-operator_*.crd*yaml\
operator/v1alpha1/zz_generated.crd-manifests//*_config-operator_*.crd*yaml\
operator/v1/zz_generated.crd-manifests/*_config-operator_*.crd*yaml\
operator/v1alpha1/zz_generated.crd-manifests/*_config-operator_*.crd*yaml\
🤖 Prompt for AI Agents
In @hack/update-payload-crds.sh around lines 9 - 10, The two glob patterns in
hack/update-payload-crds.sh contain a stray double slash; update the patterns
`operator/v1/zz_generated.crd-manifests//*_config-operator_*.crd*yaml` and
`operator/v1alpha1/zz_generated.crd-manifests//*_config-operator_*.crd*yaml` to
use a single slash (i.e., `...crd-manifests/*_config-operator_*.crd*yaml`) so
they match consistently with the other patterns.

Expand All @@ -30,8 +28,7 @@ crd_globs="\
config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_clustermonitoring*.crd.yaml
operator/v1/zz_generated.crd-manifests/*_storage_01_storages*.crd.yaml
operator/v1/zz_generated.crd-manifests/*_csi-driver_01_clustercsidrivers*.crd.yaml
insights/v1alpha2/zz_generated.crd-manifests/0000_10_insights_01_datagathers*.crd.yaml
config/v1alpha2/zz_generated.crd-manifests/0000_10_config-operator_01_insightsdatagathers*.crd.yaml
insights/v1/zz_generated.crd-manifests/0000_10_insights_01_datagathers*.crd.yaml
"

# To allow the crd_globs to be sourced in the verify script,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
api-approved.openshift.io: https://github.com/openshift/api/pull/2195
api-approved.openshift.io: https://github.com/openshift/api/pull/2448
api.openshift.io/merged-by-featuregates: "true"
include.release.openshift.io/ibm-cloud-managed: "true"
include.release.openshift.io/self-managed-high-availability: "true"
Expand All @@ -17,13 +17,13 @@ spec:
singular: insightsdatagather
scope: Cluster
versions:
- name: v1alpha2
- name: v1
schema:
openAPIV3Schema:
description: |-
InsightsDataGather provides data gather configuration options for the the Insights Operator.
InsightsDataGather provides data gather configuration options for the Insights Operator.

Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.
Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).
properties:
apiVersion:
description: |-
Expand All @@ -46,7 +46,7 @@ spec:
description: spec holds user settable values for configuration
properties:
gatherConfig:
description: gatherConfig is an optional spec attribute that includes
description: gatherConfig is a required spec attribute that includes
all the configuration options related to gathering of the Insights
data and its uploading to the ingress.
properties:
Expand All @@ -59,12 +59,13 @@ spec:
When set to WorkloadNames, the gathered data about cluster resources will not contain the workload names for your deployments. Resources UIDs will be used instead.
When omitted no obfuscation is applied.
items:
description: dataPolicyOption declares valid data policy options
description: DataPolicyOption declares valid data policy options
enum:
- ObfuscateNetworking
- WorkloadNames
type: string
maxItems: 2
minItems: 1
type: array
x-kubernetes-list-type: atomic
x-kubernetes-validations:
Expand All @@ -90,12 +91,12 @@ spec:
Run the following command to get the names of last active gatherers:
"oc get insightsoperators.operator.openshift.io cluster -o json | jq '.status.gatherStatus.gatherers[].name'"
items:
description: gathererConfig allows to configure specific
description: GathererConfig allows to configure specific
gatherers
properties:
name:
description: |-
name is the required name of a specific gatherer
name is the required name of a specific gatherer.
It may not exceed 256 characters.
The format for a gatherer name is: {gatherer}/{function} where the function is optional.
Gatherer consists of a lowercase letters only that may include underscores (_).
Expand All @@ -104,6 +105,7 @@ spec:
Run the following command to get the names of last active gatherers:
"oc get insightsoperators.operator.openshift.io cluster -o json | jq '.status.gatherStatus.gatherers[].name'"
maxLength: 256
minLength: 1
type: string
x-kubernetes-validations:
- message: gatherer name must be in the format of
Expand All @@ -126,6 +128,7 @@ spec:
- state
type: object
maxItems: 100
minItems: 1
type: array
x-kubernetes-list-map-keys:
- name
Expand All @@ -136,7 +139,7 @@ spec:
mode:
description: |-
mode is a required field that specifies the mode for gatherers. Allowed values are All, None, and Custom.
When set to All, all gatherers wil run and gather data.
When set to All, all gatherers will run and gather data.
When set to None, all gatherers will be disabled and no data will be gathered.
When set to Custom, the custom configuration from the custom field will be applied.
enum:
Expand Down Expand Up @@ -169,9 +172,11 @@ spec:
properties:
name:
description: |-
name is a string that follows the DNS1123 subdomain format.
name is the name of the PersistentVolumeClaim that will be used to store the Insights data archive.
It is a string that follows the DNS1123 subdomain format.
It must be at most 253 characters in length, and must consist only of lower case alphanumeric characters, '-' and '.', and must start and end with an alphanumeric character.
maxLength: 253
minLength: 1
type: string
x-kubernetes-validations:
- message: a lowercase RFC 1123 subdomain must consist
Expand All @@ -189,6 +194,7 @@ spec:
The current default mount path is /var/lib/insights-operator
The path may not exceed 1024 characters and must not contain a colon.
maxLength: 1024
minLength: 1
type: string
x-kubernetes-validations:
- message: mountPath must not contain a colon
Expand Down Expand Up @@ -217,15 +223,11 @@ spec:
required:
- gatherers
type: object
type: object
status:
description: status holds observed values from the cluster. They may not
be overridden.
required:
- gatherConfig
type: object
required:
- spec
type: object
served: true
storage: true
subresources:
status: {}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
api-approved.openshift.io: https://github.com/openshift/api/pull/2195
api-approved.openshift.io: https://github.com/openshift/api/pull/2448
api.openshift.io/merged-by-featuregates: "true"
include.release.openshift.io/ibm-cloud-managed: "true"
include.release.openshift.io/self-managed-high-availability: "true"
Expand All @@ -17,13 +17,13 @@ spec:
singular: insightsdatagather
scope: Cluster
versions:
- name: v1alpha2
- name: v1
schema:
openAPIV3Schema:
description: |-
InsightsDataGather provides data gather configuration options for the the Insights Operator.
InsightsDataGather provides data gather configuration options for the Insights Operator.

Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.
Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).
properties:
apiVersion:
description: |-
Expand All @@ -46,7 +46,7 @@ spec:
description: spec holds user settable values for configuration
properties:
gatherConfig:
description: gatherConfig is an optional spec attribute that includes
description: gatherConfig is a required spec attribute that includes
all the configuration options related to gathering of the Insights
data and its uploading to the ingress.
properties:
Expand All @@ -59,12 +59,13 @@ spec:
When set to WorkloadNames, the gathered data about cluster resources will not contain the workload names for your deployments. Resources UIDs will be used instead.
When omitted no obfuscation is applied.
items:
description: dataPolicyOption declares valid data policy options
description: DataPolicyOption declares valid data policy options
enum:
- ObfuscateNetworking
- WorkloadNames
type: string
maxItems: 2
minItems: 1
type: array
x-kubernetes-list-type: atomic
x-kubernetes-validations:
Expand All @@ -90,12 +91,12 @@ spec:
Run the following command to get the names of last active gatherers:
"oc get insightsoperators.operator.openshift.io cluster -o json | jq '.status.gatherStatus.gatherers[].name'"
items:
description: gathererConfig allows to configure specific
description: GathererConfig allows to configure specific
gatherers
properties:
name:
description: |-
name is the required name of a specific gatherer
name is the required name of a specific gatherer.
It may not exceed 256 characters.
The format for a gatherer name is: {gatherer}/{function} where the function is optional.
Gatherer consists of a lowercase letters only that may include underscores (_).
Expand All @@ -104,6 +105,7 @@ spec:
Run the following command to get the names of last active gatherers:
"oc get insightsoperators.operator.openshift.io cluster -o json | jq '.status.gatherStatus.gatherers[].name'"
maxLength: 256
minLength: 1
type: string
x-kubernetes-validations:
- message: gatherer name must be in the format of
Expand All @@ -126,6 +128,7 @@ spec:
- state
type: object
maxItems: 100
minItems: 1
type: array
x-kubernetes-list-map-keys:
- name
Expand All @@ -136,7 +139,7 @@ spec:
mode:
description: |-
mode is a required field that specifies the mode for gatherers. Allowed values are All, None, and Custom.
When set to All, all gatherers wil run and gather data.
When set to All, all gatherers will run and gather data.
When set to None, all gatherers will be disabled and no data will be gathered.
When set to Custom, the custom configuration from the custom field will be applied.
enum:
Expand Down Expand Up @@ -169,9 +172,11 @@ spec:
properties:
name:
description: |-
name is a string that follows the DNS1123 subdomain format.
name is the name of the PersistentVolumeClaim that will be used to store the Insights data archive.
It is a string that follows the DNS1123 subdomain format.
It must be at most 253 characters in length, and must consist only of lower case alphanumeric characters, '-' and '.', and must start and end with an alphanumeric character.
maxLength: 253
minLength: 1
type: string
x-kubernetes-validations:
- message: a lowercase RFC 1123 subdomain must consist
Expand All @@ -189,6 +194,7 @@ spec:
The current default mount path is /var/lib/insights-operator
The path may not exceed 1024 characters and must not contain a colon.
maxLength: 1024
minLength: 1
type: string
x-kubernetes-validations:
- message: mountPath must not contain a colon
Expand Down Expand Up @@ -217,15 +223,11 @@ spec:
required:
- gatherers
type: object
type: object
status:
description: status holds observed values from the cluster. They may not
be overridden.
required:
- gatherConfig
type: object
required:
- spec
type: object
served: true
storage: true
subresources:
status: {}
Loading