Skip to content

Commit

Permalink
Add omitempty to optional probe fields (#386)
Browse files Browse the repository at this point in the history
Signed-off-by: Houston Putman <[email protected]>
  • Loading branch information
HoustonPutman authored Aug 25, 2021
1 parent 2a97750 commit 1b3bd73
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/apis/zookeeper/v1beta1/zookeepercluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,14 +155,14 @@ type ZookeeperClusterSpec struct {
// Probes specifies the timeout values for the Readiness and Liveness Probes
// for the zookeeper pods.
// +optional
Probes *Probes `json:"probes"`
Probes *Probes `json:"probes,omitempty"`
}

type Probes struct {
// +optional
ReadinessProbe *Probe `json:"readinessProbe"`
ReadinessProbe *Probe `json:"readinessProbe,omitempty"`
// +optional
LivenessProbe *Probe `json:"livenessProbe"`
LivenessProbe *Probe `json:"livenessProbe,omitempty"`
}

func (s *ZookeeperClusterSpec) withDefaults(z *ZookeeperCluster) (changed bool) {
Expand Down

0 comments on commit 1b3bd73

Please sign in to comment.