Skip to content

Commit 6420b82

Browse files
committed
(codegen) generate operator group type changes
- Change type of Spec.ServiceAccount from corev1.ServiceAccount to string to match the schema. - Add a new field 'ServiceAccountRef' to Status that is an ObjectReference to the service account specified.
1 parent 6bf64d0 commit 6420b82

File tree

5 files changed

+28
-8
lines changed

5 files changed

+28
-8
lines changed

pkg/api/apis/operators/operatorgroup_types.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ type OperatorGroupSpec struct {
2929
// +optional
3030
TargetNamespaces []string
3131

32-
// ServiceAccount to bind OperatorGroup roles to.
33-
ServiceAccount corev1.ServiceAccount
32+
// ServiceAccountName is the admin specified service account which will be
33+
// used to deploy operator(s) in this operator group.
34+
ServiceAccountName string
3435

3536
// Static tells OLM not to update the OperatorGroup's providedAPIs annotation
3637
// +optional
@@ -42,6 +43,9 @@ type OperatorGroupStatus struct {
4243
// Namespaces is the set of target namespaces for the OperatorGroup.
4344
Namespaces []string
4445

46+
// ServiceAccountRef references the service account object specified.
47+
ServiceAccountRef *corev1.ObjectReference
48+
4549
// LastUpdated is a timestamp of the last time the OperatorGroup's status was Updated.
4650
LastUpdated metav1.Time
4751
}

pkg/api/apis/operators/v1/operatorgroup_types.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@ type OperatorGroupSpec struct {
2828
// +optional
2929
TargetNamespaces []string `json:"targetNamespaces,omitempty"`
3030

31-
// ServiceAccount to bind OperatorGroup roles to.
32-
ServiceAccount corev1.ServiceAccount `json:"serviceAccount,omitempty"`
31+
// ServiceAccountName is the admin specified service account which will be
32+
// used to deploy operator(s) in this operator group.
33+
ServiceAccountName string `json:"serviceAccountName,omitempty"`
3334

3435
// Static tells OLM not to update the OperatorGroup's providedAPIs annotation
3536
// +optional
@@ -41,6 +42,9 @@ type OperatorGroupStatus struct {
4142
// Namespaces is the set of target namespaces for the OperatorGroup.
4243
Namespaces []string `json:"namespaces,omitempty"`
4344

45+
// ServiceAccountRef references the service account object specified.
46+
ServiceAccountRef *corev1.ObjectReference `json:"serviceAccountRef,omitempty"`
47+
4448
// LastUpdated is a timestamp of the last time the OperatorGroup's status was Updated.
4549
LastUpdated metav1.Time `json:"lastUpdated"`
4650
}

pkg/api/apis/operators/v1/zz_generated.conversion.go

Lines changed: 5 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/api/apis/operators/v1/zz_generated.deepcopy.go

Lines changed: 6 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/api/apis/operators/zz_generated.deepcopy.go

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)