Skip to content

Commit 8779806

Browse files
committed
Extends status conditions and fields
This commits adds a new status condition to the operator CR: "Installed" that represent if the bundledeployment was able to install the desired operator ot not. Also, extends the status with a new field: "InstalledBundleSource" that contains the installed operator image/git reference Signed-off-by: Joaquim Moreno Prusi <[email protected]>
1 parent 7929907 commit 8779806

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

api/v1alpha1/operator_types.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ type OperatorSpec struct {
4646

4747
const (
4848
// TODO(user): add more Types, here and into init()
49-
TypeResolved = "Resolved"
49+
TypeInstalled = "Installed"
50+
TypeResolved = "Resolved"
5051

5152
ReasonBundleLookupFailed = "BundleLookupFailed"
5253
ReasonInstallationFailed = "InstallationFailed"
@@ -61,6 +62,7 @@ const (
6162
func init() {
6263
// TODO(user): add Types from above
6364
operatorutil.ConditionTypes = append(operatorutil.ConditionTypes,
65+
TypeInstalled,
6466
TypeResolved,
6567
)
6668
// TODO(user): add Reasons from above
@@ -78,6 +80,8 @@ func init() {
7880

7981
// OperatorStatus defines the observed state of Operator
8082
type OperatorStatus struct {
83+
// +optional
84+
InstalledBundleSource string `json:"installedBundleSource,omitempty"`
8185
// +optional
8286
ResolvedBundleResource string `json:"resolvedBundleResource,omitempty"`
8387

config/crd/bases/operators.operatorframework.io_operators.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ spec:
131131
x-kubernetes-list-map-keys:
132132
- type
133133
x-kubernetes-list-type: map
134+
installedBundleSource:
135+
type: string
134136
resolvedBundleResource:
135137
type: string
136138
type: object

0 commit comments

Comments
 (0)