Skip to content

Commit 02503fe

Browse files
Merge pull request #1539 from wking/4.13-to-4.14-ImageRegistry-capability
OCPBUGS-18961: pkg/cli/admin/release/extract_tools: Enable ImageRegistry, etc. on 4.13-to-4.14
2 parents 58a408b + b3fb741 commit 02503fe

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

pkg/cli/admin/release/extract_tools.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1238,15 +1238,17 @@ func findClusterIncludeConfig(ctx context.Context, restConfig *rest.Config) (man
12381238
config.Overrides = clusterVersion.Spec.Overrides
12391239
config.Capabilities = &clusterVersion.Status.Capabilities
12401240

1241-
// 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.
1241+
// 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..
12421242
currentVersion := clusterVersion.Status.Desired.Version
12431243
matches := regexp.MustCompile(`^(\d+[.]\d+)[.].*`).FindStringSubmatch(currentVersion)
12441244
if len(matches) < 2 {
12451245
return config, fmt.Errorf("failed to parse major.minor version from ClusterVersion status.desired.version %q", currentVersion)
12461246
} else if matches[1] == "4.13" {
1247-
machineAPI := configv1.ClusterVersionCapability("MachineAPI")
1248-
config.Capabilities.EnabledCapabilities = append(config.Capabilities.EnabledCapabilities, machineAPI)
1249-
config.Capabilities.KnownCapabilities = append(config.Capabilities.KnownCapabilities, machineAPI)
1247+
build := configv1.ClusterVersionCapability("Build")
1248+
deploymentConfig := configv1.ClusterVersionCapability("DeploymentConfig")
1249+
imageRegistry := configv1.ClusterVersionCapability("ImageRegistry")
1250+
config.Capabilities.EnabledCapabilities = append(config.Capabilities.EnabledCapabilities, configv1.ClusterVersionCapabilityMachineAPI, build, deploymentConfig, imageRegistry)
1251+
config.Capabilities.KnownCapabilities = append(config.Capabilities.KnownCapabilities, configv1.ClusterVersionCapabilityMachineAPI, build, deploymentConfig, imageRegistry)
12501252
}
12511253
}
12521254

0 commit comments

Comments
 (0)