From ab6fd3c7631b08ff76f4147fd316456b60aa2224 Mon Sep 17 00:00:00 2001 From: Houston Putman Date: Wed, 25 Aug 2021 11:17:27 -0400 Subject: [PATCH] Add omitempty to optional probe fields --- pkg/apis/zookeeper/v1beta1/zookeepercluster_types.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/apis/zookeeper/v1beta1/zookeepercluster_types.go b/pkg/apis/zookeeper/v1beta1/zookeepercluster_types.go index f0d22b473..4fdabcefa 100644 --- a/pkg/apis/zookeeper/v1beta1/zookeepercluster_types.go +++ b/pkg/apis/zookeeper/v1beta1/zookeepercluster_types.go @@ -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) {