Skip to content
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions api/applyconfiguration/api/v1alpha1/corspolicy.go

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

9 changes: 9 additions & 0 deletions api/applyconfiguration/api/v1alpha1/trafficpolicyspec.go

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

36 changes: 36 additions & 0 deletions api/applyconfiguration/internal/internal.go

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

2 changes: 2 additions & 0 deletions api/applyconfiguration/utils.go

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

9 changes: 9 additions & 0 deletions api/v1alpha1/traffic_policy_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ type TrafficPolicySpec struct {
// This controls the rate at which requests are allowed to be processed.
// +optional
RateLimit *RateLimit `json:"rateLimit,omitempty"`

// Cors specifies the CORS configuration for the policy.
// +optional
Cors *CorsPolicy `json:"cors,omitempty"`
}

// TransformationPolicy config is used to modify envoy behavior at a route level.
Expand Down Expand Up @@ -333,3 +337,8 @@ type RateLimitDescriptorEntryGeneric struct {
// +required
Value string `json:"value"`
}

type CorsPolicy struct {
// +kubebuilder:pruning:PreserveUnknownFields
*gwv1.HTTPCORSFilter `json:",inline"`
}
25 changes: 25 additions & 0 deletions api/v1alpha1/zz_generated.deepcopy.go

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

Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,66 @@ spec:
- CHAT_STREAMING
type: string
type: object
cors:
properties:
allowCredentials:
enum:
- true
type: boolean
allowHeaders:
items:
maxLength: 256
minLength: 1
pattern: ^[A-Za-z0-9!#$%&'*+\-.^_\x60|~]+$
type: string
maxItems: 64
type: array
x-kubernetes-list-type: set
allowMethods:
items:
enum:
- GET
- HEAD
- POST
- PUT
- DELETE
- CONNECT
- OPTIONS
- TRACE
- PATCH
- '*'
type: string
maxItems: 9
type: array
x-kubernetes-list-type: set
x-kubernetes-validations:
- message: AllowMethods cannot contain '*' alongside other methods
rule: '!(''*'' in self && self.size() > 1)'
allowOrigins:
items:
maxLength: 253
minLength: 1
pattern: ^(([^:/?#]+):)(//([^/?#]*))([^?#]*)(\?([^#]*))?(#(.*))?
type: string
maxItems: 64
type: array
x-kubernetes-list-type: set
exposeHeaders:
items:
maxLength: 256
minLength: 1
pattern: ^[A-Za-z0-9!#$%&'*+\-.^_\x60|~]+$
type: string
maxItems: 64
type: array
x-kubernetes-list-type: set
maxAge:
default: 5
format: int32
minimum: 1
type: integer
type: object
x-kubernetes-preserve-unknown-fields: true
extAuth:
properties:
contextExtensions:
Expand Down
Loading