Skip to content

Commit 96e0af3

Browse files
committed
Don't set the entire Networking field in AgentClusterInstallSpec
This was attempting to set the `UserManagedNetworking` field to nil when it had previously been defaulted to some value by the assisted-service controllers. This error can be seen in logs like: ``` 2025-04-03T16:17:55Z ERROR Reconciler error {"controller": "clusterdeployment", "controllerGroup": "hive.openshift.io", "controllerKind": "ClusterDeployment", "ClusterDeployment": {"name":"test-multinode","namespace":"test-capi"}, "namespace": "test-capi", "name": "test-multinode", "reconcileID": "316eee13-3248-4919-9569-f40026a9a95f", "error": "admission webhook \"agentclusterinstallvalidators.admission.agentinstall.openshift.io\" denied the request: Attempted to change AgentClusterInstall.Spec which is immutable after install started, except for ClusterMetadata,IgnitionEndpoint fields. Unsupported change: \n\tNetworking.UserManagedNetworking: (0xc000988c4c => <nil>)"} sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).reconcileHandler /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.19.6/pkg/internal/controller/controller.go:316 sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).processNextWorkItem /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.19.6/pkg/internal/controller/controller.go:263 sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller[...]).Start.func2.2 /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.19.6/pkg/internal/controller/controller.go:224 ```
1 parent 05bb6a6 commit 96e0af3

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

controlplane/internal/controller/clusterdeployment_controller.go

+2-4
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,8 @@ func (r *ClusterDeploymentReconciler) ensureAgentClusterInstall(
156156
aci.Spec.Proxy = oacp.Spec.Config.Proxy
157157
aci.Spec.SSHPublicKey = oacp.Spec.Config.SSHAuthorizedKey
158158
aci.Spec.ImageSetRef = &hivev1.ClusterImageSetReference{Name: clusterDeployment.Name}
159-
aci.Spec.Networking = hiveext.Networking{
160-
ClusterNetwork: clusterNetwork,
161-
ServiceNetwork: serviceNetwork,
162-
}
159+
aci.Spec.Networking.ClusterNetwork = clusterNetwork
160+
aci.Spec.Networking.ServiceNetwork = serviceNetwork
163161
aci.Spec.ManifestsConfigMapRefs = additionalManifests
164162

165163
if len(oacp.Spec.Config.APIVIPs) > 0 && len(oacp.Spec.Config.IngressVIPs) > 0 {

0 commit comments

Comments
 (0)