Skip to content

Commit

Permalink
Add omitempty tags to Route resources.
Browse files Browse the repository at this point in the history
These are written out as "empty" values, which means that tools like ArgoCD
fail to synchronise the state of the resource.
  • Loading branch information
bigkevmcd committed Mar 26, 2020
1 parent 9b3bdf8 commit d767ddd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions route/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ type Route struct {
Spec RouteSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
// status is the current state of the route
// +optional
Status RouteStatus `json:"status" protobuf:"bytes,3,opt,name=status"`
Status RouteStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
Expand Down Expand Up @@ -69,7 +69,7 @@ type RouteSpec struct {
// chosen.
// Must follow DNS952 subdomain conventions.
// +optional
Host string `json:"host" protobuf:"bytes,1,opt,name=host"`
Host string `json:"host,omitempty" protobuf:"bytes,1,opt,name=host"`
// subdomain is a DNS subdomain that is requested within the ingress controller's
// domain (as a subdomain). If host is set this field is ignored. An ingress
// controller may choose to ignore this suggested name, in which case the controller
Expand Down Expand Up @@ -141,7 +141,7 @@ type RouteStatus struct {
// ingress describes the places where the route may be exposed. The list of
// ingress points may contain duplicate Host or RouterName values. Routes
// are considered live once they are `Ready`
Ingress []RouteIngress `json:"ingress" protobuf:"bytes,1,rep,name=ingress"`
Ingress []RouteIngress `json:"ingress,omitempty" protobuf:"bytes,1,rep,name=ingress"`
}

// RouteIngress holds information about the places where a route is exposed.
Expand Down

0 comments on commit d767ddd

Please sign in to comment.