Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add omitempty tag for optional fields #28

Merged
merged 1 commit into from
Apr 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading