Skip to content

Commit e8c6f45

Browse files
committed
Remove DefaulterRemoveUnknownOrOmitableFields mutating webhook option
Signed-off-by: Stefan Büringer buringerst@vmware.com
1 parent 2fbb798 commit e8c6f45

20 files changed

+20
-20
lines changed

bootstrap/kubeadm/internal/webhooks/kubeadmconfig.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import (
3333
func (webhook *KubeadmConfig) SetupWebhookWithManager(mgr ctrl.Manager) error {
3434
return ctrl.NewWebhookManagedBy(mgr).
3535
For(&bootstrapv1.KubeadmConfig{}).
36-
WithDefaulter(webhook, admission.DefaulterRemoveUnknownOrOmitableFields).
36+
WithDefaulter(webhook).
3737
WithValidator(webhook).
3838
Complete()
3939
}

bootstrap/kubeadm/internal/webhooks/kubeadmconfigtemplate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import (
3232
func (webhook *KubeadmConfigTemplate) SetupWebhookWithManager(mgr ctrl.Manager) error {
3333
return ctrl.NewWebhookManagedBy(mgr).
3434
For(&bootstrapv1.KubeadmConfigTemplate{}).
35-
WithDefaulter(webhook, admission.DefaulterRemoveUnknownOrOmitableFields).
35+
WithDefaulter(webhook).
3636
WithValidator(webhook).
3737
Complete()
3838
}

controlplane/kubeadm/internal/webhooks/kubeadm_control_plane.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ import (
4747
func (webhook *KubeadmControlPlane) SetupWebhookWithManager(mgr ctrl.Manager) error {
4848
return ctrl.NewWebhookManagedBy(mgr).
4949
For(&controlplanev1.KubeadmControlPlane{}).
50-
WithDefaulter(webhook, admission.DefaulterRemoveUnknownOrOmitableFields).
50+
WithDefaulter(webhook).
5151
WithValidator(webhook).
5252
Complete()
5353
}

controlplane/kubeadm/internal/webhooks/kubeadmcontrolplanetemplate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import (
3636
func (webhook *KubeadmControlPlaneTemplate) SetupWebhookWithManager(mgr ctrl.Manager) error {
3737
return ctrl.NewWebhookManagedBy(mgr).
3838
For(&controlplanev1.KubeadmControlPlaneTemplate{}).
39-
WithDefaulter(webhook, admission.DefaulterRemoveUnknownOrOmitableFields).
39+
WithDefaulter(webhook).
4040
WithValidator(webhook).
4141
Complete()
4242
}

exp/internal/webhooks/machinepool.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func (webhook *MachinePool) SetupWebhookWithManager(mgr ctrl.Manager) error {
4949

5050
return ctrl.NewWebhookManagedBy(mgr).
5151
For(&expv1.MachinePool{}).
52-
WithDefaulter(webhook, admission.DefaulterRemoveUnknownOrOmitableFields).
52+
WithDefaulter(webhook).
5353
WithValidator(webhook).
5454
Complete()
5555
}

internal/apis/core/v1alpha4/conversion_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ func hubClusterStatus(in *clusterv1.ClusterStatus, c fuzz.Continue) {
115115
in.Deprecated = nil
116116
}
117117
}
118-
118+
119119
// Drop empty structs with only omit empty fields.
120120
if in.Initialization != nil {
121121
if reflect.DeepEqual(in.Initialization, &clusterv1.ClusterInitializationStatus{}) {

internal/webhooks/cluster.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ func (webhook *Cluster) SetupWebhookWithManager(mgr ctrl.Manager) error {
5656

5757
return ctrl.NewWebhookManagedBy(mgr).
5858
For(&clusterv1.Cluster{}).
59-
WithDefaulter(webhook, admission.DefaulterRemoveUnknownOrOmitableFields).
59+
WithDefaulter(webhook).
6060
WithValidator(webhook).
6161
Complete()
6262
}

internal/webhooks/clusterclass.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ import (
4747
func (webhook *ClusterClass) SetupWebhookWithManager(mgr ctrl.Manager) error {
4848
return ctrl.NewWebhookManagedBy(mgr).
4949
For(&clusterv1.ClusterClass{}).
50-
WithDefaulter(webhook, admission.DefaulterRemoveUnknownOrOmitableFields).
50+
WithDefaulter(webhook).
5151
WithValidator(webhook).
5252
Complete()
5353
}

internal/webhooks/clusterresourceset_webhook.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ type ClusterResourceSet struct{}
3939
func (webhook *ClusterResourceSet) SetupWebhookWithManager(mgr ctrl.Manager) error {
4040
return ctrl.NewWebhookManagedBy(mgr).
4141
For(&addonsv1.ClusterResourceSet{}).
42-
WithDefaulter(webhook, admission.DefaulterRemoveUnknownOrOmitableFields).
42+
WithDefaulter(webhook).
4343
WithValidator(webhook).
4444
Complete()
4545
}

internal/webhooks/machine.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const defaultNodeDeletionTimeout = 10 * time.Second
4040
func (webhook *Machine) SetupWebhookWithManager(mgr ctrl.Manager) error {
4141
return ctrl.NewWebhookManagedBy(mgr).
4242
For(&clusterv1.Machine{}).
43-
WithDefaulter(webhook, admission.DefaulterRemoveUnknownOrOmitableFields).
43+
WithDefaulter(webhook).
4444
WithValidator(webhook).
4545
Complete()
4646
}

0 commit comments

Comments
 (0)