Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Operator CRD with UpgradeConstraintPolicy field #396

Closed
m1kola opened this issue Sep 5, 2023 · 0 comments · Fixed by #439
Closed

Update Operator CRD with UpgradeConstraintPolicy field #396

m1kola opened this issue Sep 5, 2023 · 0 comments · Fixed by #439
Assignees
Milestone

Comments

@m1kola
Copy link
Member

m1kola commented Sep 5, 2023

Please read RFC for better formatting and full scope. The excerpt below is just to indicate the scope covered by this specific issue.

Need to update Operator CRD with UpgradeConstraintPolicy field per RFC:

Operator’s spec must be extended. Suggested changes to OperatorSpec:

//+kubebuilder:validation:Enum:=Enforce;Ignore
//+kubebuilder:default:=Enforce
//+kubebuilder:Optional
//
// Defines the policy for how to handle upgrade constraints.
UpgradeConstraintPolicy string `json:"upgradeConstraintPolicy,omitempty"`

Possible values:

const (
    // The operator will only upgrade if the new version satisfies
    // the upgrade constraints set by the package author.
    UpgradeConstraintPolicyEnforce = "Enforce"

    // Unsafe option which allows an operator to be
    // upgraded or downgraded to any available version of the package and
    // ignore the upgrade path designed by package authors.
    // This assumes that users independently verify the outcome of the changes.
    // Use with caution as this can lead to unknown and potentially
    // disastrous results such as data loss.
    UpgradeConstraintPolicyIgnore = "Ignore"
)

When .spec.upgradeConstraintPolicy is set to Ignore we do not apply upgrade constraints. This means an Operator can be transitioned to any available version of the package (even one older than the currently installed one). Note that, if set, other constraints on Operator still apply (e.g. .spec.version and .spec.channel).

When .spec.upgradeConstraintPolicy is set to Enforce we use either semver or legacy semantics depending on the position of the ForceSemverUpgradeConstraints feature gate.

Upgrade constraint application process is depicted on Fig 1.

@joelanford joelanford added this to the v0.6.0 milestone Sep 14, 2023
@dtfranz dtfranz modified the milestones: v0.6.0, v0.7.0 Oct 3, 2023
@m1kola m1kola self-assigned this Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants