From 49c5082c23b95d81854f681f0a8a450266e9bf3a Mon Sep 17 00:00:00 2001 From: Martin Schuppert Date: Thu, 12 Dec 2024 12:31:04 +0100 Subject: [PATCH 1/2] crd-schema-check: allow new CRDs If the 'git show BASE_REF' fails assume it is a net new CRD and should be fine. Signed-off-by: Martin Schuppert --- hack/crd-schema-checker.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/hack/crd-schema-checker.sh b/hack/crd-schema-checker.sh index c431ae50..3a252acd 100755 --- a/hack/crd-schema-checker.sh +++ b/hack/crd-schema-checker.sh @@ -14,8 +14,9 @@ trap cleanup EXIT for crd in config/crd/bases/*.yaml; do mkdir -p "$(dirname "$TMP_DIR/$crd")" - git show "$BASE_REF:$crd" > "$TMP_DIR/$crd" - $CHECKER check-manifests \ - --existing-crd-filename="$TMP_DIR/$crd" \ - --new-crd-filename="$crd" + if git show "$BASE_REF:$crd" > "$TMP_DIR/$crd"; then + $CHECKER check-manifests \ + --existing-crd-filename="$TMP_DIR/$crd" \ + --new-crd-filename="$crd" + fi done From 098babba7afd52d0888b754692b690f443d44194 Mon Sep 17 00:00:00 2001 From: jlarriba Date: Thu, 12 Dec 2024 14:46:09 +0100 Subject: [PATCH 2/2] Fix pre-commit --- api/bases/telemetry.openstack.org_ceilometers.yaml | 10 +++++----- api/bases/telemetry.openstack.org_telemetries.yaml | 10 +++++----- .../crd/bases/telemetry.openstack.org_ceilometers.yaml | 10 +++++----- .../crd/bases/telemetry.openstack.org_telemetries.yaml | 10 +++++----- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/api/bases/telemetry.openstack.org_ceilometers.yaml b/api/bases/telemetry.openstack.org_ceilometers.yaml index 25b88b3b..c08e9d2a 100644 --- a/api/bases/telemetry.openstack.org_ceilometers.yaml +++ b/api/bases/telemetry.openstack.org_ceilometers.yaml @@ -151,11 +151,11 @@ spec: type: object mysqldExporterDatabaseAccountPrefix: default: mysqld-exporter - description: MysqldExporterDatabaseAccountPrefix - Database account - prefix for the mysqld-exporter. A mariadbaccount CR named "-" for each galera instance needs to be either created by - the user or if it's missing, it'll be created by the telemetry-operator - automatically. + description: |- + MysqldExporterDatabaseAccountPrefix - Database account prefix for the mysqld-exporter. + A mariadbaccount CR named "-" for each + galera instance needs to be either created by the user or if it's missing, it'll be + created by the telemetry-operator automatically. type: string mysqldExporterEnabled: description: Whether mysqld_exporter should be deployed diff --git a/api/bases/telemetry.openstack.org_telemetries.yaml b/api/bases/telemetry.openstack.org_telemetries.yaml index d4d10123..887a0781 100644 --- a/api/bases/telemetry.openstack.org_telemetries.yaml +++ b/api/bases/telemetry.openstack.org_telemetries.yaml @@ -448,11 +448,11 @@ spec: type: object mysqldExporterDatabaseAccountPrefix: default: mysqld-exporter - description: MysqldExporterDatabaseAccountPrefix - Database account - prefix for the mysqld-exporter. A mariadbaccount CR named "-" for each galera instance needs to be either created - by the user or if it's missing, it'll be created by the telemetry-operator - automatically. + description: |- + MysqldExporterDatabaseAccountPrefix - Database account prefix for the mysqld-exporter. + A mariadbaccount CR named "-" for each + galera instance needs to be either created by the user or if it's missing, it'll be + created by the telemetry-operator automatically. type: string mysqldExporterEnabled: description: Whether mysqld_exporter should be deployed diff --git a/config/crd/bases/telemetry.openstack.org_ceilometers.yaml b/config/crd/bases/telemetry.openstack.org_ceilometers.yaml index 25b88b3b..c08e9d2a 100644 --- a/config/crd/bases/telemetry.openstack.org_ceilometers.yaml +++ b/config/crd/bases/telemetry.openstack.org_ceilometers.yaml @@ -151,11 +151,11 @@ spec: type: object mysqldExporterDatabaseAccountPrefix: default: mysqld-exporter - description: MysqldExporterDatabaseAccountPrefix - Database account - prefix for the mysqld-exporter. A mariadbaccount CR named "-" for each galera instance needs to be either created by - the user or if it's missing, it'll be created by the telemetry-operator - automatically. + description: |- + MysqldExporterDatabaseAccountPrefix - Database account prefix for the mysqld-exporter. + A mariadbaccount CR named "-" for each + galera instance needs to be either created by the user or if it's missing, it'll be + created by the telemetry-operator automatically. type: string mysqldExporterEnabled: description: Whether mysqld_exporter should be deployed diff --git a/config/crd/bases/telemetry.openstack.org_telemetries.yaml b/config/crd/bases/telemetry.openstack.org_telemetries.yaml index d4d10123..887a0781 100644 --- a/config/crd/bases/telemetry.openstack.org_telemetries.yaml +++ b/config/crd/bases/telemetry.openstack.org_telemetries.yaml @@ -448,11 +448,11 @@ spec: type: object mysqldExporterDatabaseAccountPrefix: default: mysqld-exporter - description: MysqldExporterDatabaseAccountPrefix - Database account - prefix for the mysqld-exporter. A mariadbaccount CR named "-" for each galera instance needs to be either created - by the user or if it's missing, it'll be created by the telemetry-operator - automatically. + description: |- + MysqldExporterDatabaseAccountPrefix - Database account prefix for the mysqld-exporter. + A mariadbaccount CR named "-" for each + galera instance needs to be either created by the user or if it's missing, it'll be + created by the telemetry-operator automatically. type: string mysqldExporterEnabled: description: Whether mysqld_exporter should be deployed