Skip to content

Commit

Permalink
[reconciler]: fix label assignment on mwhc (openservicemesh#4431) (op…
Browse files Browse the repository at this point in the history
…enservicemesh#4432)

Fixed label assignment on the mwhc by reusing the locally created labels
for correct assignment of reconciler labels.

Signed-off-by: Sneha Chhabria <[email protected]>
(cherry picked from commit c7675e5)

Co-authored-by: Sneha Chhabria <[email protected]>
  • Loading branch information
mergify[bot] and snehachhabria authored Jan 12, 2022
1 parent a21f567 commit c764eed
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions pkg/injector/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -421,13 +421,9 @@ 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)}},
Name: webhookName,
Labels: mwhcLabels,
},
Webhooks: []admissionregv1.MutatingWebhook{
{
Name: MutatingWebhookName,
Expand Down

0 comments on commit c764eed

Please sign in to comment.