Skip to content

Commit

Permalink
v1beta3 API
Browse files Browse the repository at this point in the history
This reverts commit c3fa020.

Signed-off-by: Alex Snaps <[email protected]>
  • Loading branch information
alexsnaps committed Oct 15, 2024
1 parent 4a5676e commit 067f83d
Show file tree
Hide file tree
Showing 15 changed files with 7,089 additions and 147 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ report-benchmarks:
cover: ## Shows test coverage
go tool cover -html=cover.out

AUTHCONFIG_VERSION ?= v1beta2
AUTHCONFIG_VERSION ?= v1beta3
VERBOSE ?= 0
e2e: ## Runs the end-to-end tests on a local environment setup
$(MAKE) local-setup NAMESPACE=authorino KIND_CLUSTER_NAME=authorino-e2e AUTHORINO_IMAGE=$(AUTHORINO_IMAGE) TLS_ENABLED=$(TLS_ENABLED) OPERATOR_BRANCH=$(OPERATOR_BRANCH) AUTHORINO_MANIFESTS=$(AUTHORINO_MANIFESTS) AUTHORINO_INSTANCE=$(AUTHORINO_INSTANCE) ENVOY_OVERLAY=$(ENVOY_OVERLAY) DEPLOY_KEYCLOAK=1 FF=1
Expand Down
12 changes: 1 addition & 11 deletions api/v1beta2/auth_config_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,21 +164,13 @@ type PatternExpression struct {
Value string `json:"value,omitempty"`
}

type CelExpression struct {
Expression string `json:"expression,omitempty"`
}

type CelPredicate struct {
Predicate string `json:"predicate,omitempty"`
}

// +kubebuilder:validation:Enum:=eq;neq;incl;excl;matches
type PatternExpressionOperator string

type PatternExpressionOrRef struct {
PatternExpression `json:",omitempty"`
PatternRef `json:",omitempty"`
CelPredicate `json:",omitempty"`

// A list of pattern expressions to be evaluated as a logical AND.
All []UnstructuredPatternExpressionOrRef `json:"all,omitempty"`
// A list of pattern expressions to be evaluated as a logical OR.
Expand Down Expand Up @@ -207,8 +199,6 @@ type ValueOrSelector struct {
// Any pattern supported by https://pkg.go.dev/github.com/tidwall/gjson can be used.
// The following Authorino custom modifiers are supported: @extract:{sep:" ",pos:0}, @replace{old:"",new:""}, @case:upper|lower, @base64:encode|decode and @strip.
Selector string `json:"selector,omitempty"`

Expression CelExpression `json:",omitempty"`
}

type CommonEvaluatorSpec struct {
Expand Down
33 changes: 0 additions & 33 deletions api/v1beta2/zz_generated.deepcopy.go

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

4 changes: 4 additions & 0 deletions api/v1beta3/auth_config_conversion.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package v1beta3

// Hub marks this version as a conversion hub.
func (a *AuthConfig) Hub() {}
Loading

0 comments on commit 067f83d

Please sign in to comment.