Skip to content
Closed
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
19 changes: 9 additions & 10 deletions api/v1alpha1/clusterextension_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,25 +124,23 @@ const (
TypeChannelDeprecated = "ChannelDeprecated"
TypeBundleDeprecated = "BundleDeprecated"
TypeUnpacked = "Unpacked"
TypeProgressing = "Progressing"

ReasonErrorGettingClient = "ErrorGettingClient"
ReasonBundleLoadFailed = "BundleLoadFailed"

ReasonInstallationFailed = "InstallationFailed"
ReasonInstallationStatusUnknown = "InstallationStatusUnknown"
ReasonInstallationSucceeded = "InstallationSucceeded"
ReasonResolutionFailed = "ResolutionFailed"
ReasonInstallationFailed = "InstallationFailed"
ReasonInstallationInProgress = "InstallationInProgress"
ReasonResolutionFailed = "ResolutionFailed"

ReasonSuccess = "Success"
ReasonDeprecated = "Deprecated"
ReasonUpgradeFailed = "UpgradeFailed"

ReasonUnpackPending = "UnpackPending"
ReasonUnpackSuccess = "UnpackSuccess"
ReasonUnpackFailed = "UnpackFailed"

ReasonErrorGettingReleaseState = "ErrorGettingReleaseState"
ReasonCreateDynamicWatchFailed = "CreateDynamicWatchFailed"
)

func init() {
Expand All @@ -155,23 +153,21 @@ func init() {
TypeChannelDeprecated,
TypeBundleDeprecated,
TypeUnpacked,
TypeProgressing,
)
// TODO(user): add Reasons from above
conditionsets.ConditionReasons = append(conditionsets.ConditionReasons,
ReasonInstallationSucceeded,
ReasonResolutionFailed,
ReasonInstallationFailed,
ReasonSuccess,
ReasonDeprecated,
ReasonUpgradeFailed,
ReasonBundleLoadFailed,
ReasonErrorGettingClient,
ReasonInstallationStatusUnknown,
ReasonUnpackPending,
ReasonUnpackSuccess,
ReasonUnpackFailed,
ReasonErrorGettingReleaseState,
ReasonCreateDynamicWatchFailed,
ReasonInstallationInProgress,
)
}

Expand All @@ -182,6 +178,9 @@ type BundleMetadata struct {

// ClusterExtensionStatus defines the observed state of ClusterExtension
type ClusterExtensionStatus struct {
// InstalledBundle should only be modified when a new bundle is successfully installed. This ensures that if there
// is a previously successfully installed a bundle, and an upgrade fails, it is still communicated that there is
// still a bundle that is currently installed and owned by the ClusterExtension.
// +optional
InstalledBundle *BundleMetadata `json:"installedBundle,omitempty"`
// +optional
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,10 @@ spec:
- type
x-kubernetes-list-type: map
installedBundle:
description: |-
InstalledBundle should only be modified when a new bundle is successfully installed. This ensures that if there
is a previously successfully installed a bundle, and an upgrade fails, it is still communicated that there is
still a bundle that is currently installed and owned by the ClusterExtension.
properties:
name:
type: string
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ toolchain go1.22.2
require (
github.com/Masterminds/semver/v3 v3.2.1
github.com/blang/semver/v4 v4.0.0
github.com/go-git/go-billy/v5 v5.5.0
github.com/go-logr/logr v1.4.2
github.com/google/go-cmp v0.6.0
github.com/operator-framework/api v0.26.0
Expand Down Expand Up @@ -112,7 +113,6 @@ require (
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/go-errors/errors v1.4.2 // indirect
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
github.com/go-git/go-billy/v5 v5.5.0 // indirect
github.com/go-git/go-git/v5 v5.12.0 // indirect
github.com/go-gorp/gorp/v3 v3.1.0 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
Expand Down
Loading