Skip to content

Commit

Permalink
Adds WildcardPolicy field to IngressController API
Browse files Browse the repository at this point in the history
  • Loading branch information
danehans committed Mar 27, 2020
1 parent 6efe1ee commit 366fdb3
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,21 @@ spec:
enum:
- InterNamespaceAllowed
- Strict
wildcardPolicy:
description: "wildcardPolicy describes how routes with wildcard
policies should be handled for the ingress controller. WildcardPolicy
controls use of routes [1] exposed by the ingress controller based
on the route's wildcard policy. \n [1] https://github.com/openshift/api/blob/master/route/v1/types.go
\n Note: Updating WildcardPolicy from WildcardsAllowed to WildcardsDisallowed
will cause admitted routes with a wildcard policy of Subdomain
to stop working. These routes must be updated to a wildcard policy
of None to be readmitted by the ingress controller. \n WildcardPolicy
supports WildcardsAllowed and WildcardsDisallowed values. \n If
empty, defaults to \"WildcardsDisallowed\"."
type: string
enum:
- WildcardsAllowed
- WildcardsDisallowed
routeSelector:
description: "routeSelector is used to filter the set of Routes serviced
by the ingress controller. This is useful for implementing shards.
Expand Down
32 changes: 32 additions & 0 deletions operator/v1/types_ingress.go
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,40 @@ type RouteAdmissionPolicy struct {
// If empty, the default is Strict.
// +optional
NamespaceOwnership NamespaceOwnershipCheck `json:"namespaceOwnership,omitempty"`
// wildcardPolicy describes how routes with wildcard policies should
// be handled for the ingress controller. WildcardPolicy controls use
// of routes [1] exposed by the ingress controller based on the route's
// wildcard policy.
//
// [1] https://github.com/openshift/api/blob/master/route/v1/types.go
//
// Note: Updating WildcardPolicy from WildcardsAllowed to WildcardsDisallowed
// will cause admitted routes with a wildcard policy of Subdomain to stop
// working. These routes must be updated to a wildcard policy of None to be
// readmitted by the ingress controller.
//
// WildcardPolicy supports WildcardsAllowed and WildcardsDisallowed values.
//
// If empty, defaults to "WildcardsDisallowed".
//
WildcardPolicy WildcardPolicy `json:"wildcardPolicy,omitempty"`
}

// WildcardPolicy is a route admission policy component that describes how
// routes with a wildcard policy should be handled.
// +kubebuilder:validation:Enum=WildcardsAllowed;WildcardsDisallowed
type WildcardPolicy string

const (
// WildcardPolicyAllowed indicates routes with any wildcard policy are
// admitted by the ingress controller.
WildcardPolicyAllowed WildcardPolicy = "WildcardsAllowed"

// WildcardPolicyDisallowed indicates only routes with a wildcard policy
// of None are admitted by the ingress controller.
WildcardPolicyDisallowed WildcardPolicy = "WildcardsDisallowed"
)

// NamespaceOwnershipCheck is a route admission policy component that describes
// how host name claims across namespaces should be handled.
// +kubebuilder:validation:Enum=InterNamespaceAllowed;Strict
Expand Down
1 change: 1 addition & 0 deletions operator/v1/zz_generated.swagger_doc_generated.go

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

0 comments on commit 366fdb3

Please sign in to comment.