From d30bc8bcce054f20fc3a02fd72b7b0e575c0b06b Mon Sep 17 00:00:00 2001 From: Camila Macedo Date: Mon, 11 Nov 2024 11:38:03 +0000 Subject: [PATCH] Fix follow-up for bumping catalogd to v0.36.0: Update pollInterval to pollIntervalMinutes in ClusterCatalog spec In #1434, the API was updated to use pollIntervalMinutes instead of pollInterval. This commit ensures all references are properly updated. See: https://github.com/operator-framework/operator-controller/pull/1434/files#diff-93b46b0715181c9cf397eed60862261b7839ff721599fcc393a393b9edea610bR57 --- config/samples/catalogd_operatorcatalog.yaml | 2 +- docs/concepts/crd-upgrade-safety.md | 16 ++++++++-------- docs/getting-started/olmv1_getting_started.md | 2 +- docs/tutorials/add-catalog.md | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/config/samples/catalogd_operatorcatalog.yaml b/config/samples/catalogd_operatorcatalog.yaml index 48f1da573..a0e7cf68d 100644 --- a/config/samples/catalogd_operatorcatalog.yaml +++ b/config/samples/catalogd_operatorcatalog.yaml @@ -7,4 +7,4 @@ spec: type: Image image: ref: quay.io/operatorhubio/catalog:latest - pollInterval: 10m + PollIntervalMinutes: 10m diff --git a/docs/concepts/crd-upgrade-safety.md b/docs/concepts/crd-upgrade-safety.md index 47ad18d7b..ea782efb4 100644 --- a/docs/concepts/crd-upgrade-safety.md +++ b/docs/concepts/crd-upgrade-safety.md @@ -117,7 +117,7 @@ spec: type: object status: type: object - pollInterval: + PollIntervalMinutes: type: string type: object served: true @@ -173,7 +173,7 @@ In this example, the existing stored version, `v1alpha1`, has been removed: type: object status: type: object - pollInterval: + PollIntervalMinutes: type: string type: object ``` @@ -185,7 +185,7 @@ In this example, the existing stored version, `v1alpha1`, has been removed: ### Removing an existing field -In this example, the `pollInterval` field has been removed from `v1alpha1`: +In this example, the `PollIntervalMinutes` field has been removed from `v1alpha1`: ??? example ```yaml @@ -209,12 +209,12 @@ In this example, the `pollInterval` field has been removed from `v1alpha1`: ??? failure "Error output" ``` - validating upgrade for CRD "test.example.com" failed: CustomResourceDefinition test.example.com failed upgrade safety validation. "NoExistingFieldRemoved" validation failed: crd/test.example.com version/v1alpha1 field/^.spec.pollInterval may not be removed + validating upgrade for CRD "test.example.com" failed: CustomResourceDefinition test.example.com failed upgrade safety validation. "NoExistingFieldRemoved" validation failed: crd/test.example.com version/v1alpha1 field/^.spec.PollIntervalMinutes may not be removed ``` ### Adding a required field -In this example, `pollInterval` has been changed to a required field: +In this example, `PollIntervalMinutes` has been changed to a required field: ??? example ```yaml @@ -233,14 +233,14 @@ In this example, `pollInterval` has been changed to a required field: type: object status: type: object - pollInterval: + PollIntervalMinutes: type: string type: object required: - - pollInterval + - PollIntervalMinutes ``` ??? failure "Error output" ``` - validating upgrade for CRD "test.example.com" failed: CustomResourceDefinition test.example.com failed upgrade safety validation. "ChangeValidator" validation failed: version "v1alpha1", field "^": new required fields added: [pollInterval] + validating upgrade for CRD "test.example.com" failed: CustomResourceDefinition test.example.com failed upgrade safety validation. "ChangeValidator" validation failed: version "v1alpha1", field "^": new required fields added: [PollIntervalMinutes] ``` diff --git a/docs/getting-started/olmv1_getting_started.md b/docs/getting-started/olmv1_getting_started.md index efffddde8..d8e7fb9fe 100644 --- a/docs/getting-started/olmv1_getting_started.md +++ b/docs/getting-started/olmv1_getting_started.md @@ -44,7 +44,7 @@ spec: type: Image image: ref: quay.io/operatorhubio/catalog:latest - pollInterval: 10m + PollIntervalMinutes: 10m EOF ``` diff --git a/docs/tutorials/add-catalog.md b/docs/tutorials/add-catalog.md index 2b75c666d..38e06ad4d 100644 --- a/docs/tutorials/add-catalog.md +++ b/docs/tutorials/add-catalog.md @@ -35,7 +35,7 @@ This catalog is distributed as an image [quay.io/operatorhubio/catalog](https:// type: Image image: ref: - pollInterval: + PollIntervalMinutes: ``` `catalog_name` @@ -57,7 +57,7 @@ This catalog is distributed as an image [quay.io/operatorhubio/catalog](https:// type: Image image: ref: quay.io/operatorhubio/catalog:latest - pollInterval: 10m + PollIntervalMinutes: 10m ``` 2. Apply the ClusterCatalog CR: