Skip to content

Commit 96a459e

Browse files
Address the next set of review comments
Signed-off-by: Rashmi Gottipati <[email protected]>
1 parent 30bf1c6 commit 96a459e

File tree

3 files changed

+37
-12
lines changed

3 files changed

+37
-12
lines changed

api/v1alpha1/clusterextension_types.go

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -85,18 +85,23 @@ type PreflightConfig struct {
8585
CRDUpgradeSafety CRDUpgradeSafetyPreflightConfig `json:"crdUpgradeSafety,omitempty"`
8686
}
8787

88-
// CRDUpgradeSafetyPreflightConfig is a custom type to hold value for the CRDUpgradeSafetyPreflightConfig
89-
// that enables or disables the CRD Upgrade Safety validations.
90-
type CRDUpgradeSafetyPreflightConfig string
88+
// CRDUpgradeSafetyPreflightConfig is a custom struct that holds the necessary configuration values to
89+
// enable or disable the CRD Upgrade Safety validations. Currently, this holds CRDUpgradeSafetyPreflightConfigType
90+
// that sets the CRD Upgrade Safety validations to either Enabled/Disabled.
91+
type CRDUpgradeSafetyPreflightConfig struct {
92+
CRDUpgradeSafetyPreflightConfigType CRDUpgradeSafetyPreflightConfigType `json:"crdUpgradeSafetyPreflightConfigType,omitempty"`
93+
}
94+
95+
type CRDUpgradeSafetyPreflightConfigType string
9196

9297
const (
93-
// CRDUpgradeSafetyPreflightConfigApply represents the default state for the
94-
// CRD Upgrade Safety validations by setting it to "Apply".
95-
CRDUpgradeSafetyPreflightConfigApply CRDUpgradeSafetyPreflightConfig = "Apply"
98+
// CRDUpgradeSafetyPreflightConfigEnabled represents the default state for the
99+
// CRD Upgrade Safety validations by setting it to "Enabled".
100+
CRDUpgradeSafetyPreflightConfigEnabled CRDUpgradeSafetyPreflightConfigType = "Enabled"
96101

97-
// CRDUpgradeSafetyPreflightConfigSkip represents the option for the
98-
// CRD Upgrade Safety validations to be skipped by setting it to "Skip".
99-
CRDUpgradeSafetyPreflightConfigSkip CRDUpgradeSafetyPreflightConfig = "Skip"
102+
// CRDUpgradeSafetyPreflightConfigDisabled represents the option for the
103+
// CRD Upgrade Safety validations to be disabled by setting it to "Disabled".
104+
CRDUpgradeSafetyPreflightConfigDisabled CRDUpgradeSafetyPreflightConfigType = "Disabled"
100105
)
101106

102107
const (

api/v1alpha1/zz_generated.deepcopy.go

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

config/crd/bases/olm.operatorframework.io_clusterextensions.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,13 @@ spec:
6363
properties:
6464
crdUpgradeSafety:
6565
description: |-
66-
CRDUpgradeSafetyPreflightConfig is a custom type to hold value for the CRDUpgradeSafetyPreflightConfig
67-
that enables or disables the CRD Upgrade Safety validations.
68-
type: string
66+
CRDUpgradeSafetyPreflightConfig is a custom struct that holds the necessary configuration values to
67+
enable or disable the CRD Upgrade Safety validations. Currently, this holds CRDUpgradeSafetyPreflightConfigType
68+
that sets the CRD Upgrade Safety validations to either Enabled/Disabled.
69+
properties:
70+
crdUpgradeSafetyPreflightConfigType:
71+
type: string
72+
type: object
6973
type: object
7074
upgradeConstraintPolicy:
7175
default: Enforce

0 commit comments

Comments
 (0)