Skip to content

Commit

Permalink
fix matchselector for cdi-deployment
Browse files Browse the repository at this point in the history
Signed-off-by: Yaroslav Borbat <[email protected]>
  • Loading branch information
yaroslavborbat committed Jan 24, 2024
1 parent fbccd1e commit b54d5ea
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/operator/resources/namespaced/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,9 @@ func createControllerServiceAccount() *corev1.ServiceAccount {

func createControllerDeployment(controllerImage, importerImage, clonerImage, uploadServerImage, verbosity, pullPolicy string, imagePullSecrets []corev1.LocalObjectReference, priorityClassName string, infraNodePlacement *sdkapi.NodePlacement, replicas int32) *appsv1.Deployment {
defaultMode := corev1.ConfigMapVolumeSourceDefaultMode
deployment := utils.CreateDeployment(common.CDIControllerResourceName, common.CDIComponentLabel, common.CDIControllerResourceName, common.ControllerServiceAccountName, imagePullSecrets, int32(1), infraNodePlacement)
// The match selector is immutable. that's why we should always use the same labels.
deployment := utils.CreateDeployment(common.CDIControllerResourceName, common.CDILabelKey, common.CDILabelValue, common.ControllerServiceAccountName, imagePullSecrets, int32(1), infraNodePlacement)
deployment.ObjectMeta.Labels[common.CDIComponentLabel] = common.CDIControllerResourceName
if priorityClassName != "" {
deployment.Spec.Template.Spec.PriorityClassName = priorityClassName
}
Expand Down

0 comments on commit b54d5ea

Please sign in to comment.