Skip to content

Commit

Permalink
Update OperatorPolicy operatorGroup description
Browse files Browse the repository at this point in the history
Add note that the `AllNamespaces` type is the
default.

Signed-off-by: Dale Haiducek <19750917+dhaiducek@users.noreply.github.com>
Co-authored-by: Justin Kulikauskas <44813129+JustinKuli@users.noreply.github.com>
  • Loading branch information
2 people authored and openshift-merge-bot[bot] committed Dec 16, 2024
1 parent facb1a8 commit dc062a0
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 15 deletions.
16 changes: 11 additions & 5 deletions api/v1beta1/operatorpolicy_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,17 +148,23 @@ type OperatorPolicySpec struct {
// +kubebuilder:validation:Enum=musthave;mustnothave
ComplianceType policyv1.ComplianceType `json:"complianceType"`

// OperatorGroup specifies which `OperatorGroup` to inspect. Include the name, namespace, and any
// `spec` fields for the operator group. For more info, see `kubectl explain operatorgroups.spec`
// or view https://olm.operatorframework.io/docs/concepts/crds/operatorgroup/.
// OperatorGroup specifies which `OperatorGroup` to inspect. This resource is generated by the
// operator policy controller. Include the name, namespace, and any `spec` fields for the operator
// group. By default, if the `operatorGroup` field is not specified, and no OperatorGroup already
// exists in the namespace, then the controller generates an `AllNamespaces` type `OperatorGroup`
// in the same namespace as the subscription, if supported.
//
// For more info, see `kubectl explain operatorgroups.spec` or view
// https://olm.operatorframework.io/docs/concepts/crds/operatorgroup/.
//
//+kubebuilder:pruning:PreserveUnknownFields
//+optional
OperatorGroup *runtime.RawExtension `json:"operatorGroup,omitempty"`

// Subscription specifies which operator `Subscription` resource to inspect. Include the
// namespace, and any `spec` fields for the Subscription. For more info, see `kubectl explain
// subscriptions.operators.coreos.com.spec` or view
// namespace, and any `spec` fields for the Subscription.
//
// For more info, see `kubectl explain subscriptions.operators.coreos.com.spec` or view
// https://olm.operatorframework.io/docs/concepts/crds/subscription/.
//
//+kubebuilder:validation:Required
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,14 @@ spec:
type: string
operatorGroup:
description: |-
OperatorGroup specifies which `OperatorGroup` to inspect. Include the name, namespace, and any
`spec` fields for the operator group. For more info, see `kubectl explain operatorgroups.spec`
or view https://olm.operatorframework.io/docs/concepts/crds/operatorgroup/.
OperatorGroup specifies which `OperatorGroup` to inspect. This resource is generated by the
operator policy controller. Include the name, namespace, and any `spec` fields for the operator
group. By default, if the `operatorGroup` field is not specified, and no OperatorGroup already
exists in the namespace, then the controller generates an `AllNamespaces` type `OperatorGroup`
in the same namespace as the subscription, if supported.
For more info, see `kubectl explain operatorgroups.spec` or view
https://olm.operatorframework.io/docs/concepts/crds/operatorgroup/.
type: object
x-kubernetes-preserve-unknown-fields: true
remediationAction:
Expand Down Expand Up @@ -187,8 +192,9 @@ spec:
subscription:
description: |-
Subscription specifies which operator `Subscription` resource to inspect. Include the
namespace, and any `spec` fields for the Subscription. For more info, see `kubectl explain
subscriptions.operators.coreos.com.spec` or view
namespace, and any `spec` fields for the Subscription.
For more info, see `kubectl explain subscriptions.operators.coreos.com.spec` or view
https://olm.operatorframework.io/docs/concepts/crds/subscription/.
type: object
x-kubernetes-preserve-unknown-fields: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,14 @@ spec:
type: string
operatorGroup:
description: |-
OperatorGroup specifies which `OperatorGroup` to inspect. Include the name, namespace, and any
`spec` fields for the operator group. For more info, see `kubectl explain operatorgroups.spec`
or view https://olm.operatorframework.io/docs/concepts/crds/operatorgroup/.
OperatorGroup specifies which `OperatorGroup` to inspect. This resource is generated by the
operator policy controller. Include the name, namespace, and any `spec` fields for the operator
group. By default, if the `operatorGroup` field is not specified, and no OperatorGroup already
exists in the namespace, then the controller generates an `AllNamespaces` type `OperatorGroup`
in the same namespace as the subscription, if supported.
For more info, see `kubectl explain operatorgroups.spec` or view
https://olm.operatorframework.io/docs/concepts/crds/operatorgroup/.
type: object
x-kubernetes-preserve-unknown-fields: true
remediationAction:
Expand Down Expand Up @@ -189,8 +194,9 @@ spec:
subscription:
description: |-
Subscription specifies which operator `Subscription` resource to inspect. Include the
namespace, and any `spec` fields for the Subscription. For more info, see `kubectl explain
subscriptions.operators.coreos.com.spec` or view
namespace, and any `spec` fields for the Subscription.
For more info, see `kubectl explain subscriptions.operators.coreos.com.spec` or view
https://olm.operatorframework.io/docs/concepts/crds/subscription/.
type: object
x-kubernetes-preserve-unknown-fields: true
Expand Down

0 comments on commit dc062a0

Please sign in to comment.