forked from argoproj/argo-cd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Wait for Subscription resources to reach AtLatestKnown (argoproj…
…#21425) If using the sync waves annotations currently ArgoCD does not wait for the Subscription to be fully installed. Root cause is that the first update that includes `.status` doesn't include the information that the installation is still pending. To be able to wait for the operator to be installed, the `.status.state` can be checked. Signed-off-by: Thomas Müller <[email protected]>
- Loading branch information
Showing
3 changed files
with
84 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 11 additions & 7 deletions
18
resource_customizations/operators.coreos.com/Subscription/health_test.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,29 @@ | ||
tests: | ||
- healthStatus: | ||
status: Progressing | ||
message: "An install plan for a subscription is pending installation" | ||
message: "1: CatalogSourcesUnhealthy | False\n.status.state not yet known\n" | ||
inputPath: testdata/first_update_with_status.yaml | ||
- healthStatus: | ||
status: Progressing | ||
message: "1: CatalogSourcesUnhealthy | False\n2: InstallPlanPending | True\n.status.state is 'UpgradePending'\n" | ||
inputPath: testdata/install_plan_pending.yaml | ||
- healthStatus: | ||
status: Degraded | ||
message: "1: CatalogSourcesUnhealthy | True\n" | ||
message: "1: CatalogSourcesUnhealthy | True\n.status.state not yet known\n" | ||
inputPath: testdata/catalog_sources_unhealthy.yaml | ||
- healthStatus: | ||
status: Healthy | ||
message: "1: CatalogSourcesUnhealthy | False\n2: InstallPlanMissing | True\n" | ||
message: "1: CatalogSourcesUnhealthy | False\n2: InstallPlanMissing | True\n.status.state is 'AtLatestKnown'\n" | ||
inputPath: testdata/install_plan_missing.yaml | ||
- healthStatus: | ||
status: Degraded | ||
message: "1: CatalogSourcesUnhealthy | False\n2: InstallPlanFailed | True\n" | ||
message: "1: CatalogSourcesUnhealthy | False\n2: InstallPlanFailed | True\n.status.state is 'AtLatestKnown'\n" | ||
inputPath: testdata/install_plan_failed.yaml | ||
- healthStatus: | ||
status: Degraded | ||
message: "1: CatalogSourcesUnhealthy | True\n2: ResolutionFailed | True\n" | ||
message: "1: CatalogSourcesUnhealthy | True\n2: ResolutionFailed | True\n.status.state not yet known\n" | ||
inputPath: testdata/resolution_failed.yaml | ||
- healthStatus: | ||
status: Healthy | ||
message: "1: CatalogSourcesUnhealthy | False\n" | ||
inputPath: testdata/healthy.yaml | ||
message: "1: CatalogSourcesUnhealthy | False\n.status.state is 'AtLatestKnown'\n" | ||
inputPath: testdata/healthy.yaml |
54 changes: 54 additions & 0 deletions
54
...e_customizations/operators.coreos.com/Subscription/testdata/first_update_with_status.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
--- | ||
apiVersion: operators.coreos.com/v1alpha1 | ||
kind: Subscription | ||
metadata: | ||
creationTimestamp: "2024-10-14T08:37:15Z" | ||
generation: 1 | ||
labels: | ||
operators.coreos.com/cincinnati-operator.openshift-update-service: "" | ||
name: update-service-subscription | ||
namespace: openshift-update-service | ||
resourceVersion: "1728269681" | ||
uid: ce5194f6-b60e-4206-bcb9-019ed845797e | ||
spec: | ||
channel: v1 | ||
installPlanApproval: Manual | ||
name: cincinnati-operator | ||
source: redhat-operators | ||
sourceNamespace: openshift-marketplace | ||
status: | ||
catalogHealth: | ||
- catalogSourceRef: | ||
apiVersion: operators.coreos.com/v1alpha1 | ||
kind: CatalogSource | ||
name: certified-operators | ||
namespace: openshift-marketplace | ||
resourceVersion: "1728260000" | ||
uid: 5ccf7092-9df5-4898-b5c5-0368937614f1 | ||
healthy: true | ||
lastUpdated: "2024-10-14T08:37:15Z" | ||
- catalogSourceRef: | ||
apiVersion: operators.coreos.com/v1alpha1 | ||
kind: CatalogSource | ||
name: redhat-marketplace | ||
namespace: openshift-marketplace | ||
resourceVersion: "1728258210" | ||
uid: 83648c37-b64e-440c-86c1-8c8146fc59f0 | ||
healthy: true | ||
lastUpdated: "2024-10-14T08:37:15Z" | ||
- catalogSourceRef: | ||
apiVersion: operators.coreos.com/v1alpha1 | ||
kind: CatalogSource | ||
name: redhat-operators | ||
namespace: openshift-marketplace | ||
resourceVersion: "1728263805" | ||
uid: 99cc0db9-35c4-4f2a-87ab-7e37f0b05cc0 | ||
healthy: true | ||
lastUpdated: "2024-10-14T08:37:15Z" | ||
conditions: | ||
- lastTransitionTime: "2024-10-14T08:37:15Z" | ||
message: all available catalogsources are healthy | ||
reason: CatalogSourcesAdded | ||
status: "False" | ||
type: CatalogSourcesUnhealthy | ||
lastUpdated: "2024-10-14T08:37:15Z" |