Skip to content

Commit

Permalink
feat: add managed subscription claims
Browse files Browse the repository at this point in the history
  • Loading branch information
lbenguigui authored Nov 25, 2024
1 parent 5020922 commit 8e83597
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,10 @@ spec:
maxItems: 100
minItems: 1
type: array
claims:
description: Claims specifies an expression that validate claims in
order to authorize the request.
type: string
operationFilter:
description: |-
OperationFilter specifies the allowed operations on APIs and APIVersions.
Expand Down
4 changes: 4 additions & 0 deletions pkg/apis/hub/v1alpha1/managed_subscription.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ type ManagedSubscriptionSpec struct {
// +kubebuilder:validation:XValidation:message="must be a positive number",rule="self >= 0"
// +optional
Weight int `json:"weight,omitempty"`

// Claims specifies an expression that validate claims in order to authorize the request.
// +optional
Claims string `json:"claims,omitempty"`
}

// ManagedSubscriptionStatus is the status of an ManagedSubscription.
Expand Down
1 change: 1 addition & 0 deletions pkg/validation/v1alpha1/managed_subscription_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ spec:
name: my-plan
apis:
- name: my-api
claims: expression
apiSelector:
matchLabels:
key: value
Expand Down

0 comments on commit 8e83597

Please sign in to comment.