Skip to content
This repository has been archived by the owner on Oct 20, 2023. It is now read-only.

Commit

Permalink
Merge pull request #75 from khhirani/fix-spec-validation-mismatch
Browse files Browse the repository at this point in the history
fix: Modify Spec to make Weight and Service fields required
  • Loading branch information
stefanprodan committed Jun 26, 2020
2 parents 241f8c2 + 5b22aa4 commit 7cd7340
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pkg/apis/split/v1alpha2/traffic_split.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ type TrafficSplitSpec struct {

// TrafficSplitBackend defines a backend
type TrafficSplitBackend struct {
Service string `json:"service,omitempty"`
Weight int `json:"weight,omitempty"`
Service string `json:"service"`
Weight int `json:"weight"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
Expand Down
4 changes: 2 additions & 2 deletions pkg/apis/split/v1alpha3/traffic_split.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ type TrafficSplitSpec struct {

// TrafficSplitBackend defines a backend
type TrafficSplitBackend struct {
Service string `json:"service,omitempty"`
Weight int `json:"weight,omitempty"`
Service string `json:"service"`
Weight int `json:"weight"`
}

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

0 comments on commit 7cd7340

Please sign in to comment.