Skip to content

Gateway API: allow for OpenShift 4.19 CRD lockdown #4063

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

Open
wants to merge 1 commit into
base: release-v1.39
Choose a base branch
from

Conversation

nelljerram
Copy link
Member

OpenShift 4.19+ pre-installs some of the Gateway CRDs, but not all of them, and has a webhook that prevents us from installing the ones that OpenShift is missing. To work with this we distinguish between "essential" and "optional" CRDs. The "essential" set must be a subset of those that OpenShift installs and/or allows to be installed, and must also suffice for all of the Gateway-related feature that we consider important as part of Calico; and this controller will report an error and degraded status if any of those do not already exist and cannot be installed. The "optional" set is everything else that we would ideally install, to provide more options to our users; but this controller will only warn if any of those cannot be installed (and do not already exist).

Fixes https://tigera.atlassian.net/browse/RS-2689
Fixes https://tigera.atlassian.net/browse/RS-2690

Release Note

TBD

OpenShift 4.19+ pre-installs some of the Gateway CRDs, but not all of them, and
has a webhook that prevents us from installing the ones that OpenShift is
missing.  To work with this we distinguish between "essential" and "optional"
CRDs.  The "essential" set must be a subset of those that OpenShift installs
and/or allows to be installed, and must also suffice for all of the
Gateway-related feature that we consider important as part of Calico; and this
controller will report an error and degraded status if any of those do not
already exist and cannot be installed.  The "optional" set is everything else
that we would ideally install, to provide more options to our users; but this
controller will only warn if any of those cannot be installed (and do not
already exist).

Fixes https://tigera.atlassian.net/browse/RS-2689
Fixes https://tigera.atlassian.net/browse/RS-2690
return reconcile.Result{}, err
}
err = handler.CreateOrUpdateOrDelete(ctx, render.NewPassthrough(optionalCRDs...), nil)
if err != nil && !errors.IsAlreadyExists(err) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does CreateOrUpdateOrDelete ever return an error AlreadyExists? That doesn't seem like an error it would ever return.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants