Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2342,6 +2342,12 @@ func (r *HostedControlPlaneReconciler) cleanupClusterNetworkOperatorResources(ct
if err := cnov2.SetRestartAnnotationAndPatch(ctx, r.Client, networkNodeIdentityDeployment, restartAnnotation); err != nil {
return fmt.Errorf("failed to restart network node identity: %w", err)
}

// CNO manages overall ovnkube-control-plane deployment. CPO manages restarts. Note that cnov2.SetRestartAnnotationAndPatch just returns err == nil if the deployment isn't found (so if OVN isn't being used)
ovnKubeControlPlaneDeployment := manifests.OVNKubeControlPlaneDeployment(hcp.Namespace)
if err := cnov2.SetRestartAnnotationAndPatch(ctx, r.Client, ovnKubeControlPlaneDeployment, restartAnnotation); err != nil {
return fmt.Errorf("failed to restart ovnkube-control-plane: %w", err)
}
}

// Clean up ovnkube-sbdb Route if exists
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
const clusterNetworkOperator = "cluster-network-operator"
const multusAdmissionController = "multus-admission-controller"
const networkNodeIdentity = "network-node-identity"
const ovnKubeControlPlane = "ovnkube-control-plane"

func ClusterNetworkOperatorDeployment(ns string) *appsv1.Deployment {
return &appsv1.Deployment{
Expand Down Expand Up @@ -67,6 +68,15 @@ func NetworkNodeIdentityDeployment(namespace string) *appsv1.Deployment {
}
}

func OVNKubeControlPlaneDeployment(namespace string) *appsv1.Deployment {
return &appsv1.Deployment{
ObjectMeta: metav1.ObjectMeta{
Namespace: namespace,
Name: ovnKubeControlPlane,
},
}
}

func OVNKubeSBDBRoute(namespace string) *routev1.Route {
return &routev1.Route{
ObjectMeta: metav1.ObjectMeta{
Expand Down