Skip to content

Commit

Permalink
RouteEffectivePolicyConfiguration PolicyType now a string
Browse files Browse the repository at this point in the history
So it can be used as a list/map key

Signed-off-by: Sunjay Bhatia <sunjayb@vmware.com>
  • Loading branch information
sunjayBhatia committed Nov 11, 2022
1 parent 3a96f4e commit 0cf3fa5
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 60 deletions.
13 changes: 3 additions & 10 deletions apis/v1beta1/shared_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,17 +259,8 @@ const (
RouteReasonBackendNotFound RouteConditionReason = "BackendNotFound"
)

// PolicyGroupKind indicates the group and kind of a Policy resource.
type PolicyGroupKind struct {
// Group is the group of the Policy.
Group Group `json:"group,omitempty"`

// Kind is the kind of the Route.
Kind Kind `json:"kind"`
}

type RouteEffectivePolicyConfiguration struct {
PolicyType PolicyGroupKind `json:"policyType"`
PolicyType string `json:"policyType"`

SectionName SectionName `json:"sectionName"`

Expand Down Expand Up @@ -328,6 +319,8 @@ type RouteParentStatus struct {
// Route.
//
// +optional
// +listType=map
// +listMapKey=policyType
EffectivePolicyConfigurations []RouteEffectivePolicyConfiguration `json:"effectivePolicyConfigurations"`
}

Expand Down
16 changes: 0 additions & 16 deletions apis/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 4 additions & 17 deletions config/crd/experimental/gateway.networking.k8s.io_httproutes.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 4 additions & 17 deletions config/crd/standard/gateway.networking.k8s.io_httproutes.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0cf3fa5

Please sign in to comment.