Skip to content

Commit 09293b3

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 4ea83e6 commit 09293b3

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

api/v1alpha1/operator_types.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,9 @@ type OperatorSpec struct {
4646

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

5253
ReasonBundleLookupFailed = "BundleLookupFailed"
5354
ReasonInstallationFailed = "InstallationFailed"
@@ -62,6 +63,7 @@ const (
6263
func init() {
6364
// TODO(user): add Types from above
6465
operatorutil.ConditionTypes = append(operatorutil.ConditionTypes,
66+
TypeInstalled,
6567
TypeReady,
6668
TypeResolved,
6769
)
@@ -80,6 +82,8 @@ func init() {
8082

8183
// OperatorStatus defines the observed state of Operator
8284
type OperatorStatus struct {
85+
// +optional
86+
InstalledBundleSource string `json:"installedBundleSource,omitempty"`
8387
// +optional
8488
ResolvedBundleResource string `json:"resolvedBundleResource,omitempty"`
8589

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)