Skip to content

Commit

Permalink
Add omitempty tag for optional fields (#28)
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha authored Apr 27, 2024
1 parent 3c7d1bc commit 28cd406
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions apis/external/v1alpha1/externaldns_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -356,7 +356,7 @@ type ExternalDNSSpec struct {

// Google provider
// +optional
Google *GoogleProvider `json:"google"`
Google *GoogleProvider `json:"google,omitempty"`

//
//POLICY INFORMATION
Expand Down

0 comments on commit 28cd406

Please sign in to comment.