From 28cd406cfa8f37698ed985d6d4d38b225f5cb693 Mon Sep 17 00:00:00 2001 From: Tamal Saha Date: Fri, 26 Apr 2024 22:53:27 -0700 Subject: [PATCH] Add omitempty tag for optional fields (#28) Signed-off-by: Tamal Saha --- apis/external/v1alpha1/externaldns_types.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apis/external/v1alpha1/externaldns_types.go b/apis/external/v1alpha1/externaldns_types.go index 7ca313d7..3887b0e7 100644 --- a/apis/external/v1alpha1/externaldns_types.go +++ b/apis/external/v1alpha1/externaldns_types.go @@ -245,15 +245,15 @@ type SourceConfig struct { // For source type Node // +optional - Node *NodeConfig `json:"node"` + Node *NodeConfig `json:"node,omitempty"` // For source type Service // +optional - Service *ServiceConfig `json:"service"` + Service *ServiceConfig `json:"service,omitempty"` // For source type Ingress // +optional - Ingress *IngressConfig `json:"ingress"` + Ingress *IngressConfig `json:"ingress,omitempty"` } // GenericSecretReference contains the information of the provider secret. Name is for secret name and CredentialKey is for specifying the key of the secret. @@ -356,7 +356,7 @@ type ExternalDNSSpec struct { // Google provider // +optional - Google *GoogleProvider `json:"google"` + Google *GoogleProvider `json:"google,omitempty"` // //POLICY INFORMATION