-
Notifications
You must be signed in to change notification settings - Fork 68
Closed
Labels
epic/v1-apigood first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.Denotes an issue ready for a new contributor, according to the "help wanted" guidelines.v1.0Issues related to the initial stable release of OLMv1Issues related to the initial stable release of OLMv1
Milestone
Description
As outlined in the Do not use Boolean Fields subsection of the OpenShift API Conventions, boolean fields are to be replaced with an enumeration of values that describe the action instead.
At the time of writing this issue, the only field that is boolean type is the ClusterExtension.Spec.Preflight.CRDUpgradeSafety.Disabled field:
| Disabled bool `json:"disabled,omitempty"` |
This field should be updated to use an enumeration instead.
For inspiration, an implementation could look something like:
type CRDUpgradeSafetyPolicy string
const (
CRDUpgradeSafetyPolicyEnabled CRDUpgradeSafetyPolicy = "Enabled"
CRDUpgradeSafetyPolicyDisabled CRDUpgradeSafetyPolicy = "Disabled"
)
type CRDUpgradeSafetyPreflightConfig struct {
//+kubebuilder:Required
// +kubebuilder:validation:Enum:="Enabled","Disabled"
// policy represents the state of the CRD upgrade safety preflight check. Allowed values are "Enabled", and Disabled".
Policy CRDUpgradeSafetyPolicy `json:"policy,omitempty"`
}Metadata
Metadata
Assignees
Labels
epic/v1-apigood first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.Denotes an issue ready for a new contributor, according to the "help wanted" guidelines.v1.0Issues related to the initial stable release of OLMv1Issues related to the initial stable release of OLMv1
Type
Projects
Status
Done