Skip to content

Commit e312adc

Browse files
committed
Update OperatorConditionSpec
This commit introduces two changes to the OperatorConditionSpec. The first change is the addition of a field named ServiceAccounts which represents the list of ServiceAccounts that should be listed in the RoleBinding that allows the service accoutns to update the operator's OperatorCondition object. The second change is the addition of a field named Deployments which represents the list of deployments whose containers should be updated to include the OPERATOR_CONDITION_NAME environment variable.
1 parent f55ec86 commit e312adc

File tree

5 files changed

+34
-9
lines changed

5 files changed

+34
-9
lines changed

crds/defs.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,3 +99,8 @@ func Operator() *apiextensionsv1.CustomResourceDefinition {
9999
func Subscription() *apiextensionsv1.CustomResourceDefinition {
100100
return getCRD("operators.coreos.com_subscriptions.yaml").DeepCopy()
101101
}
102+
103+
// OperatorCondition returns a copy of the CustomResourceDefinition for the latest version of the OperatorCondition API.
104+
func OperatorCondition() *apiextensionsv1.CustomResourceDefinition {
105+
return getCRD("operators.coreos.com_operatorconditions.yaml").DeepCopy()
106+
}

crds/operators.coreos.com_operatorconditions.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ spec:
4141
reported by the operator.
4242
type: object
4343
properties:
44+
deployments:
45+
type: array
46+
items:
47+
type: string
4448
overrides:
4549
type: array
4650
items:
@@ -110,6 +114,10 @@ spec:
110114
type: string
111115
maxLength: 316
112116
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
117+
serviceAccounts:
118+
type: array
119+
items:
120+
type: string
113121
status:
114122
description: OperatorConditionStatus allows an operator to convey information
115123
its state to OLM. The status may trail the actual state of a system.

0 commit comments

Comments
 (0)