Skip to content

Commit

Permalink
Add omitempty tag everywhere in main spec
Browse files Browse the repository at this point in the history
  • Loading branch information
l0kix2 committed Aug 2, 2024
1 parent 607de83 commit 5302fc3
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions api/v1/ytsaurus_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ type BaseLoggerSpec struct {
Compression LogCompression `json:"compression,omitempty"`
//+kubebuilder:default:=false
//+optional
UseTimestampSuffix bool `json:"useTimestampSuffix"`
UseTimestampSuffix bool `json:"useTimestampSuffix,omitempty"`
RotationPolicy *LogRotationPolicy `json:"rotationPolicy,omitempty"`
}

Expand Down Expand Up @@ -281,7 +281,7 @@ type InstanceSpec struct {
}

type MasterConnectionSpec struct {
CellTag int16 `json:"cellTag"`
CellTag int16 `json:"cellTag,omitempty"`
HostAddresses []string `json:"hostAddresses,omitempty"`
}

Expand Down Expand Up @@ -352,7 +352,7 @@ type TCPProxiesSpec struct {
MinPort int32 `json:"minPort"`
// Number of ports to allocate for balancing service.
//+kubebuilder:default:=20
PortCount int32 `json:"portCount"`
PortCount int32 `json:"portCount,omitempty"`
//+kubebuilder:default:=default
//+kubebuilder:validation:MinLength:=1
Role string `json:"role,omitempty"`
Expand Down Expand Up @@ -440,7 +440,7 @@ type ExecNodesSpec struct {
Sidecars []string `json:"sidecars,omitempty"`
//+kubebuilder:default:=true
//+optional
Privileged bool `json:"privileged"`
Privileged bool `json:"privileged,omitempty"`
JobProxyLoggers []TextLoggerSpec `json:"jobProxyLoggers,omitempty"`
// Resources dedicated for running jobs.
//+optional
Expand Down Expand Up @@ -482,11 +482,11 @@ type UISpec struct {
// If defined allows insecure (over http) authentication.
//+kubebuilder:default:=true
//+optional
UseInsecureCookies bool `json:"useInsecureCookies"`
UseInsecureCookies bool `json:"useInsecureCookies,omitempty"`
// Use secure connection to the cluster's http-proxies.
//+kubebuilder:default:=false
//+optional
Secure bool `json:"secure"`
Secure bool `json:"secure,omitempty"`
Resources corev1.ResourceRequirements `json:"resources,omitempty"`
InstanceCount int32 `json:"instanceCount,omitempty"`

Expand Down Expand Up @@ -534,7 +534,7 @@ type DeprecatedSpytSpec struct {
}

type MasterCachesConnectionSpec struct {
CellTag int16 `json:"cellTagMasterCaches"`
CellTag int16 `json:"cellTagMasterCaches,omitempty"`
HostAddresses []string `json:"hostAddressesMasterCaches,omitempty"`
}

Expand Down Expand Up @@ -568,21 +568,21 @@ type CommonSpec struct {

//+kubebuilder:default:=false
//+optional
UseIPv6 bool `json:"useIpv6"`
UseIPv6 bool `json:"useIpv6,omitempty"`
//+kubebuilder:default:=false
//+optional
UseIPv4 bool `json:"useIpv4"`
UseIPv4 bool `json:"useIpv4,omitempty"`
//+kubebuilder:default:=true
//+optional
UseShortNames bool `json:"useShortNames"`
UseShortNames bool `json:"useShortNames,omitempty"`
// Use the host's network namespace for all components.
//+kubebuilder:default:=false
//+optional
HostNetwork bool `json:"hostNetwork"`
HostNetwork bool `json:"hostNetwork,omitempty"`

//+kubebuilder:default:=false
//+optional
UsePorto bool `json:"usePorto"`
UsePorto bool `json:"usePorto,omitempty"`

ExtraPodAnnotations map[string]string `json:"extraPodAnnotations,omitempty"`

Expand All @@ -601,15 +601,15 @@ type YtsaurusSpec struct {

//+kubebuilder:default:=true
//+optional
IsManaged bool `json:"isManaged"`
IsManaged bool `json:"isManaged,omitempty"`
//+kubebuilder:default:=true
//+optional
EnableFullUpdate bool `json:"enableFullUpdate"`
EnableFullUpdate bool `json:"enableFullUpdate,omitempty"`
//+optional
//+kubebuilder:validation:Enum={"","Nothing","StatelessOnly","MasterOnly","TabletNodesOnly","ExecNodesOnly","Everything"}
// UpdateSelector is an experimental field. Behaviour may change.
// If UpdateSelector is not empty EnableFullUpdate is ignored.
UpdateSelector UpdateSelector `json:"updateSelector"`
UpdateSelector UpdateSelector `json:"updateSelector,omitempty"`

Bootstrap *BootstrapSpec `json:"bootstrap,omitempty"`

Expand Down

0 comments on commit 5302fc3

Please sign in to comment.