You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OTA-1010: extract included manifests with net-new capabilities
The `ManifestInclusionConfiguration` is used to
determine is a manifest is included on a cluster.
Its `Capabilities` field takes the implicitly enabled
capabilities into account.
This change removes the workaround that handles the
net-new capabilities introduced by a cluster upgrade.
E.g. if a cluster is currently with 4.13, then it
assumes that the capabilities "build",
"deploymentConfig", and "ImageRegistry" are enabled.
This is because the components underlying those
capabilities are installed by default on 4.13, or
earlier and cannot be disabled once installed. Those
capabilities will become enabled after upgrade from
4.13 to 4.14: either explicitly or implicitly
depending on the current value of
`cv.spec.capabilities.baselineCapabilitySet`.
https://github.com/openshift/oc/blob/e005223acd7c478bac070134c16f5533a258be12/pkg/cli/admin/release/extract_tools.go#L1241-L1252
CVO has already defined the function
GetImplicitlyEnabledCapabilities that calculates
the implicitly enabled capabilities of a cluster
after a cluster upgrade. For this function to work,
we have to provide
* the manifests that are currently included on the
cluster.
* the manifests from the payload in the upgrade image.
The existing `ManifestReceiver` is enhanced in a way
that it can provide enabled capabilities, including
both explicit and implicit ones, when the callback to
downstream is called. It is implemented by a cache to
collect manifests from the upstream and calls
downstream only when all manifests are collected and
the capabilities are calculated with them using the
function `GetImplicitlyEnabledCapabilities` mentioned
earlier.
This enhancement can be opted in by setting up the
`needEnabledCapabilities` field of `ManifestReceiver`.
Otherwise, its behaviours stays the same as before.
In case that the inclusion configuration is taken
from the cluster, i.e., `--install-config` is not set,
`needEnabledCapabilities` is set to `true`.
manifestReceiver.manifestsCallback=func(filenamestring, ms []manifest.Manifest, r io.Reader) (bool, error) {
414
+
manifestReceiver.manifestsCallback=func(filenamestring, ms []manifest.Manifest, r io.Reader, enabled []configv1.ClusterVersionCapability) (bool, error) {
// FIXME: eventually pull in GetImplicitlyEnabledCapabilities from https://github.com/openshift/cluster-version-operator/blob/86e24d66119a73f50282b66a8d6f2e3518aa0e15/pkg/payload/payload.go#L237-L240 for cases where a minor update would implicitly enable some additional capabilities. For now, 4.13 to 4.14 will always enable MachineAPI, ImageRegistry, etc..
0 commit comments