[reconciler]: fix label assignment on mwhc
Fixed label assignment on the mwhc by reusing the locally created labels
for correct assignment of reconciler labels.
@@ -422,12 +422,8 @@ func createOrUpdateMutatingWebhook(clientSet kubernetes.Interface, cert certific
mwhc := admissionregv1.MutatingWebhookConfiguration{
ObjectMeta: metav1.ObjectMeta{
Name: webhookName,
- Labels: map[string]string{
- constants.OSMAppNameLabelKey: constants.OSMAppNameLabelValue,
- constants.OSMAppInstanceLabelKey: meshName,
- constants.OSMAppVersionLabelKey: osmVersion,
- constants.AppLabel: constants.OSMInjectorName,
- constants.ReconcileLabel: strconv.FormatBool(true)}},
+ Labels: mwhcLabels,
+ },
Webhooks: []admissionregv1.MutatingWebhook{
{
Name: MutatingWebhookName,
