Skip to content

Commit

Permalink
OCPBUGS-25696: Apply Scheduling Configuration for kCCM
Browse files Browse the repository at this point in the history
https://issues.redhat.com/browse/OCPBUGS-25696
kCCM deployment was not respecting the node selector configured at hcp.spec.nodeSelector that was set with --node-selector flag in the create cli command.
This PR fixes the issue, by applying 'SetDefaults()' to the deploymentConfig, which sets the node selector along with other required configurations (e.g. tolerations, affinity, replica count, etc.)
  • Loading branch information
imain authored and openshift-cherrypick-robot committed Jan 12, 2024
1 parent f770252 commit e12027d
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,11 @@ func ReconcileDeployment(deployment *appsv1.Deployment, hcp *hyperv1.HostedContr
isExternalInfra = true
}
deploymentConfig := newDeploymentConfig()
deploymentConfig.SetDefaults(hcp, nil, nil)
deployment.Spec = appsv1.DeploymentSpec{
Selector: &metav1.LabelSelector{
MatchLabels: ccmLabels(),
},
Strategy: appsv1.DeploymentStrategy{
Type: appsv1.RecreateDeploymentStrategyType,
},
Template: corev1.PodTemplateSpec{
ObjectMeta: metav1.ObjectMeta{
Labels: ccmLabels(),
Expand Down

0 comments on commit e12027d

Please sign in to comment.