Skip to content

Commit

Permalink
reorgnise controller permissions
Browse files Browse the repository at this point in the history
Signed-off-by: Guilherme Cassolato <guicassolato@gmail.com>
  • Loading branch information
guicassolato committed Nov 8, 2024
1 parent 6f11120 commit ecba7c6
Show file tree
Hide file tree
Showing 21 changed files with 73 additions and 167 deletions.
17 changes: 0 additions & 17 deletions api/v1/authpolicy_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,6 @@ func (p *AuthPolicy) GetLocator() string {
return machinery.LocatorFromObject(p)
}

// TODO: remove
func (p *AuthPolicy) IsAtomicOverride() bool {
return p.Spec.Overrides != nil && p.Spec.Overrides.Strategy == AtomicMergeStrategy
}

// DEPRECATED: Use GetTargetRefs instead
func (p *AuthPolicy) GetTargetRef() gatewayapiv1alpha2.LocalPolicyTargetReference {
return p.Spec.TargetRef.LocalPolicyTargetReference
Expand Down Expand Up @@ -399,18 +394,6 @@ func (r *MergeablePatternExpressions) WithSource(source string) MergeableRule {
return r
}

type MergeablePatternExpressionOrRef struct {
authorinov1beta3.PatternExpressionOrRef `json:",inline"`
Source string `json:"-"`
}

func (r *MergeablePatternExpressionOrRef) GetSpec() any { return r.PatternExpressionOrRef }
func (r *MergeablePatternExpressionOrRef) GetSource() string { return r.Source }
func (r *MergeablePatternExpressionOrRef) WithSource(source string) MergeableRule {
r.Source = source
return r
}

type MergeableAuthenticationSpec struct {
authorinov1beta3.AuthenticationSpec `json:",inline"`
Source string `json:"-"`
Expand Down
6 changes: 0 additions & 6 deletions api/v1/ratelimitpolicy_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@ import (
"github.com/kuadrant/kuadrant-operator/pkg/utils"
)

const (
// TODO: remove after fixing the integration tests that still depend on these
RateLimitPolicyBackReferenceAnnotationName = "kuadrant.io/ratelimitpolicies"
RateLimitPolicyDirectReferenceAnnotationName = "kuadrant.io/ratelimitpolicy"
)

var (
RateLimitPolicyGroupKind = schema.GroupKind{Group: GroupVersion.Group, Kind: "RateLimitPolicy"}
RateLimitPoliciesResource = GroupVersion.WithResource("ratelimitpolicies")
Expand Down
16 changes: 0 additions & 16 deletions api/v1/zz_generated.deepcopy.go

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

48 changes: 15 additions & 33 deletions bundle/manifests/kuadrant-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ metadata:
capabilities: Basic Install
categories: Integration & Delivery
containerImage: quay.io/kuadrant/kuadrant-operator:latest
createdAt: "2024-11-08T14:46:34Z"
createdAt: "2024-11-08T16:32:32Z"
description: A Kubernetes Operator to manage the lifecycle of the Kuadrant system
operators.operatorframework.io/builder: operator-sdk-v1.32.0
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
Expand Down Expand Up @@ -286,26 +286,13 @@ spec:
resources:
- gatewayclasses
verbs:
- get
- list
- watch
- apiGroups:
- gateway.networking.k8s.io
resources:
- gateways/finalizers
verbs:
- update
- apiGroups:
- gateway.networking.k8s.io
resources:
- gateways/status
- httproutes/status
verbs:
- get
- patch
- update
- apiGroups:
- gateway.networking.k8s.io
resources:
- gateways
- httproutes
verbs:
- get
Expand All @@ -314,22 +301,19 @@ spec:
- update
- watch
- apiGroups:
- install.istio.io
- gateway.networking.k8s.io
resources:
- istiooperators
- gateways/status
- httproutes/status
verbs:
- create
- get
- list
- patch
- update
- watch
- apiGroups:
- kuadrant.io
resources:
- authpolicies
- dnsrecords
- kuadrants
- ratelimitpolicies
verbs:
- create
Expand All @@ -344,7 +328,6 @@ spec:
resources:
- authpolicies/finalizers
- dnspolicies/finalizers
- kuadrants/finalizers
- ratelimitpolicies/finalizers
- tlspolicies/finalizers
verbs:
Expand Down Expand Up @@ -380,21 +363,19 @@ spec:
verbs:
- get
- apiGroups:
- limitador.kuadrant.io
- kuadrant.io
resources:
- limitadors
- kuadrants
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- networking.istio.io
- limitador.kuadrant.io
resources:
- envoyfilters
- limitadors
verbs:
- create
- delete
Expand All @@ -404,9 +385,9 @@ spec:
- update
- watch
- apiGroups:
- operator.authorino.kuadrant.io
- networking.istio.io
resources:
- authorinos
- envoyfilters
verbs:
- create
- delete
Expand All @@ -416,11 +397,12 @@ spec:
- update
- watch
- apiGroups:
- operator.istio.io
- operator.authorino.kuadrant.io
resources:
- istios
- authorinos
verbs:
- create
- delete
- get
- list
- patch
Expand Down
46 changes: 14 additions & 32 deletions charts/kuadrant-operator/templates/manifests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8637,26 +8637,13 @@ rules:
resources:
- gatewayclasses
verbs:
- get
- list
- watch
- apiGroups:
- gateway.networking.k8s.io
resources:
- gateways/finalizers
verbs:
- update
- apiGroups:
- gateway.networking.k8s.io
resources:
- gateways/status
- httproutes/status
verbs:
- get
- patch
- update
- apiGroups:
- gateway.networking.k8s.io
resources:
- gateways
- httproutes
verbs:
- get
Expand All @@ -8665,22 +8652,19 @@ rules:
- update
- watch
- apiGroups:
- install.istio.io
- gateway.networking.k8s.io
resources:
- istiooperators
- gateways/status
- httproutes/status
verbs:
- create
- get
- list
- patch
- update
- watch
- apiGroups:
- kuadrant.io
resources:
- authpolicies
- dnsrecords
- kuadrants
- ratelimitpolicies
verbs:
- create
Expand All @@ -8695,7 +8679,6 @@ rules:
resources:
- authpolicies/finalizers
- dnspolicies/finalizers
- kuadrants/finalizers
- ratelimitpolicies/finalizers
- tlspolicies/finalizers
verbs:
Expand Down Expand Up @@ -8731,21 +8714,19 @@ rules:
verbs:
- get
- apiGroups:
- limitador.kuadrant.io
- kuadrant.io
resources:
- limitadors
- kuadrants
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- networking.istio.io
- limitador.kuadrant.io
resources:
- envoyfilters
- limitadors
verbs:
- create
- delete
Expand All @@ -8755,9 +8736,9 @@ rules:
- update
- watch
- apiGroups:
- operator.authorino.kuadrant.io
- networking.istio.io
resources:
- authorinos
- envoyfilters
verbs:
- create
- delete
Expand All @@ -8767,11 +8748,12 @@ rules:
- update
- watch
- apiGroups:
- operator.istio.io
- operator.authorino.kuadrant.io
resources:
- istios
- authorinos
verbs:
- create
- delete
- get
- list
- patch
Expand Down
Loading

0 comments on commit ecba7c6

Please sign in to comment.