Skip to content

Commit

Permalink
Fix follow-up for bumping catalogd to v0.36.0: Update pollInterval to…
Browse files Browse the repository at this point in the history
… pollIntervalMinutes in ClusterCatalog spec

In operator-framework#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
  • Loading branch information
camilamacedo86 committed Nov 11, 2024
1 parent 6c2be08 commit 9ef9369
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion config/samples/catalogd_operatorcatalog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ spec:
type: Image
image:
ref: quay.io/operatorhubio/catalog:latest
pollInterval: 10m
PollIntervalMinutes: 10m
16 changes: 8 additions & 8 deletions docs/concepts/crd-upgrade-safety.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ spec:
type: object
status:
type: object
pollInterval:
PollIntervalMinutes:
type: string
type: object
served: true
Expand Down Expand Up @@ -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
```
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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]
```
2 changes: 1 addition & 1 deletion docs/getting-started/olmv1_getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ spec:
type: Image
image:
ref: quay.io/operatorhubio/catalog:latest
pollInterval: 10m
PollIntervalMinutes: 10m
EOF
```

Expand Down
4 changes: 2 additions & 2 deletions docs/tutorials/add-catalog.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ This catalog is distributed as an image [quay.io/operatorhubio/catalog](https://
type: Image
image:
ref: <catalog_image>
pollInterval: <poll_interval_duration>
PollIntervalMinutes: <poll_interval_duration>
```
`catalog_name`
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion hack/test/pre-upgrade-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ spec:
type: Image
image:
ref: ${TEST_CATALOG_IMG}
pollInterval: 24h
PollIntervalMinutes: 24h
EOF

kubectl apply -f - <<EOF
Expand Down

0 comments on commit 9ef9369

Please sign in to comment.