Skip to content

Commit

Permalink
Merge pull request #1621 from hernit/main
Browse files Browse the repository at this point in the history
Add omitempty to statuses to allow better marshalling
  • Loading branch information
stefanprodan authored Mar 25, 2024
2 parents a437af0 + 935d6f9 commit f3be47d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/apis/flagger/v1beta1/alert.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ type AlertProvider struct {
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec AlertProviderSpec `json:"spec"`
Status AlertProviderStatus `json:"status"`
Status AlertProviderStatus `json:"status,omitempty"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/flagger/v1beta1/canary.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ type Canary struct {
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec CanarySpec `json:"spec"`
Status CanaryStatus `json:"status"`
Status CanaryStatus `json:"status,omitempty"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/flagger/v1beta1/metric.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ type MetricTemplate struct {
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec MetricTemplateSpec `json:"spec"`
Status MetricTemplateStatus `json:"status"`
Status MetricTemplateStatus `json:"status,omitempty"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
Expand Down

0 comments on commit f3be47d

Please sign in to comment.