Skip to content

Commit ded4c15

Browse files
committed
FIXME/TBD: Disable remove unknown fields
Signed-off-by: Stefan Büringer [email protected]
1 parent 5398e93 commit ded4c15

19 files changed

+19
-19
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).
36+
WithDefaulter(webhook, admission.DefaulterRemoveUnknownOrOmitableFields).
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).
35+
WithDefaulter(webhook, admission.DefaulterRemoveUnknownOrOmitableFields).
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).
50+
WithDefaulter(webhook, admission.DefaulterRemoveUnknownOrOmitableFields).
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).
39+
WithDefaulter(webhook, admission.DefaulterRemoveUnknownOrOmitableFields).
4040
WithValidator(webhook).
4141
Complete()
4242
}

exp/addons/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).
42+
WithDefaulter(webhook, admission.DefaulterRemoveUnknownOrOmitableFields).
4343
WithValidator(webhook).
4444
Complete()
4545
}

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).
52+
WithDefaulter(webhook, admission.DefaulterRemoveUnknownOrOmitableFields).
5353
WithValidator(webhook).
5454
Complete()
5555
}

internal/webhooks/cluster.go

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

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

internal/webhooks/clusterclass.go

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

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).
43+
WithDefaulter(webhook, admission.DefaulterRemoveUnknownOrOmitableFields).
4444
WithValidator(webhook).
4545
Complete()
4646
}

internal/webhooks/machinedeployment.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func (webhook *MachineDeployment) SetupWebhookWithManager(mgr ctrl.Manager) erro
4848

4949
return ctrl.NewWebhookManagedBy(mgr).
5050
For(&clusterv1.MachineDeployment{}).
51-
WithDefaulter(webhook).
51+
WithDefaulter(webhook, admission.DefaulterRemoveUnknownOrOmitableFields).
5252
WithValidator(webhook).
5353
Complete()
5454
}

internal/webhooks/machinehealthcheck.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func SetMinNodeStartupTimeout(d metav1.Duration) {
5252
func (webhook *MachineHealthCheck) SetupWebhookWithManager(mgr ctrl.Manager) error {
5353
return ctrl.NewWebhookManagedBy(mgr).
5454
For(&clusterv1.MachineHealthCheck{}).
55-
WithDefaulter(webhook).
55+
WithDefaulter(webhook, admission.DefaulterRemoveUnknownOrOmitableFields).
5656
WithValidator(webhook).
5757
Complete()
5858
}

internal/webhooks/machineset.go

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

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

internal/webhooks/runtime/extensionconfig_webhook.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ type ExtensionConfig struct{}
4242
func (webhook *ExtensionConfig) SetupWebhookWithManager(mgr ctrl.Manager) error {
4343
return ctrl.NewWebhookManagedBy(mgr).
4444
For(&runtimev1.ExtensionConfig{}).
45-
WithDefaulter(webhook).
45+
WithDefaulter(webhook, admission.DefaulterRemoveUnknownOrOmitableFields).
4646
WithValidator(webhook).
4747
Complete()
4848
}

test/infrastructure/docker/internal/webhooks/dockercluster_webhook.go

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

test/infrastructure/docker/internal/webhooks/dockerclustertemplate_webhook.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ type DockerClusterTemplate struct{}
3838
func (webhook *DockerClusterTemplate) SetupWebhookWithManager(mgr ctrl.Manager) error {
3939
return ctrl.NewWebhookManagedBy(mgr).
4040
For(&infrav1.DockerClusterTemplate{}).
41-
WithDefaulter(webhook).
41+
WithDefaulter(webhook, admission.DefaulterRemoveUnknownOrOmitableFields).
4242
WithValidator(webhook).
4343
Complete()
4444
}

test/infrastructure/inmemory/internal/webhooks/inmemorycluster_webhook.go

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

test/infrastructure/inmemory/internal/webhooks/inmemoryclustertemplate_webhook.go

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

test/infrastructure/inmemory/internal/webhooks/inmemorymachine_webhook.go

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

test/infrastructure/inmemory/internal/webhooks/inmemorymachinetemplate_webhook.go

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

0 commit comments

Comments
 (0)