From 5f7d6bf6cb1ac0812c25f85228c034d641a08f0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Mudrini=C4=87?= Date: Thu, 9 Jul 2020 16:34:23 +0200 Subject: [PATCH] Set omitempty on providerSpec fields in v1alpha1/v1beta1 APIs --- pkg/apis/kubeone/v1alpha1/types.go | 4 ++-- pkg/apis/kubeone/v1beta1/types.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/apis/kubeone/v1alpha1/types.go b/pkg/apis/kubeone/v1alpha1/types.go index 5c0666212..81cc621c7 100644 --- a/pkg/apis/kubeone/v1alpha1/types.go +++ b/pkg/apis/kubeone/v1alpha1/types.go @@ -180,9 +180,9 @@ type WorkerConfig struct { // ProviderSpec describes a worker node type ProviderSpec struct { CloudProviderSpec json.RawMessage `json:"cloudProviderSpec"` - Labels map[string]string `json:"labels"` + Labels map[string]string `json:"labels,omitempty"` Taints []corev1.Taint `json:"taints,omitempty"` - SSHPublicKeys []string `json:"sshPublicKeys"` + SSHPublicKeys []string `json:"sshPublicKeys,omitempty"` OperatingSystem string `json:"operatingSystem"` OperatingSystemSpec json.RawMessage `json:"operatingSystemSpec"` diff --git a/pkg/apis/kubeone/v1beta1/types.go b/pkg/apis/kubeone/v1beta1/types.go index 0c4a41ce8..465ecd540 100644 --- a/pkg/apis/kubeone/v1beta1/types.go +++ b/pkg/apis/kubeone/v1beta1/types.go @@ -210,9 +210,9 @@ type DynamicWorkerConfig struct { // ProviderSpec describes a worker node type ProviderSpec struct { CloudProviderSpec json.RawMessage `json:"cloudProviderSpec"` - Labels map[string]string `json:"labels"` + Labels map[string]string `json:"labels,omitempty"` Taints []corev1.Taint `json:"taints,omitempty"` - SSHPublicKeys []string `json:"sshPublicKeys"` + SSHPublicKeys []string `json:"sshPublicKeys,omitempty"` OperatingSystem string `json:"operatingSystem"` OperatingSystemSpec json.RawMessage `json:"operatingSystemSpec"`