Skip to content

Commit

Permalink
chore: removes authorino leftovers (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
bartoszmajsak authored Dec 12, 2023
1 parent f136b02 commit 323abfd
Show file tree
Hide file tree
Showing 11 changed files with 7 additions and 2,413 deletions.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ help: ## Display this help.

##@ Development

EXTERNAL_CRDS=./config/crd/external
.PHONY: generate
generate: tools ## Generates required resources for the controller to work properly (see config/ folder)
$(LOCALBIN)/controller-gen rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases
$(call fetch-external-crds,github.com/openshift/api,route/v1)
rm -rf $(EXTERNAL_CRDS)
$(call fetch-external-crds,github.com/openshift/api,route/v1,$(EXTERNAL_CRDS))

SRC_DIRS:=./controllers ./test
SRCS:=$(shell find ${SRC_DIRS} -name "*.go")
Expand Down
2,379 changes: 0 additions & 2,379 deletions config/crd/external/authorino.kuadrant.io_authconfigs.yaml

This file was deleted.

12 changes: 0 additions & 12 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,6 @@ spec:
name: service-mesh-refs
key: MESH_NAMESPACE
optional: true
- name: AUTHORINO_LABEL
valueFrom:
configMapKeyRef:
name: auth-refs
key: AUTHORINO_LABEL
optional: true
- name: AUTH_AUDIENCE
valueFrom:
configMapKeyRef:
name: auth-refs
key: AUTH_AUDIENCE
optional: true
livenessProbe:
httpGet:
path: /healthz
Expand Down
12 changes: 0 additions & 12 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,6 @@ rules:
- patch
- update
- watch
- apiGroups:
- authorino.kuadrant.io
resources:
- authconfigs
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- maistra.io
resources:
Expand Down
2 changes: 0 additions & 2 deletions controllers/init.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package controllers

import (
authorino "github.com/kuadrant/authorino/api/v1beta1"
routev1 "github.com/openshift/api/route/v1"
"k8s.io/apimachinery/pkg/runtime"
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
Expand All @@ -14,5 +13,4 @@ func RegisterSchemes(s *runtime.Scheme) {
utilruntime.Must(clientgoscheme.AddToScheme(s))
utilruntime.Must(maistrav1.AddToScheme(s))
utilruntime.Must(routev1.Install(s))
utilruntime.Must(authorino.AddToScheme(s))
}
1 change: 0 additions & 1 deletion controllers/namespace_updater.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ func extractGateway(meta metav1.ObjectMeta) string {
}

// ExtractHostName strips given URL in string from http(s):// prefix and subsequent path.
// This is useful when getting value from http headers (such as origin), as Authorino needs host only.
// If given string does not start with http(s) prefix it will be returned as is.
func ExtractHostName(s string) string {
r := regexp.MustCompile(`^(https?://)`)
Expand Down
1 change: 0 additions & 1 deletion controllers/project_mesh_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ type OpenshiftServiceMeshReconciler struct {
Log logr.Logger
}

// +kubebuilder:rbac:groups=authorino.kuadrant.io,resources=authconfigs,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=maistra.io,resources=servicemeshmembers;servicemeshmembers/finalizers,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=maistra.io,resources=servicemeshcontrolplanes,verbs=get;list;watch;create;update;patch;use
// +kubebuilder:rbac:groups=maistra.io,resources=servicemeshcontrolplanes,verbs=get;list;watch;create;update;patch;use
Expand Down
2 changes: 1 addition & 1 deletion controllers/unit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

var _ = Describe("Controller helper functions", Label(labels.Unit), func() {

When("Preparing host URL for Authorino's AuthConfig", func() {
When("Extracting host URL", func() {

DescribeTable("it should remove protocol prefix from provided string and path",
func(value, expected string) {
Expand Down
2 changes: 1 addition & 1 deletion func.mk
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ endef
define fetch-external-crds
GOFLAGS="-mod=readonly" $(LOCALBIN)/controller-gen crd \
paths=$(shell go env GOPATH)/pkg/mod/$(1)@$(call go-mod-version,$(1))/$(2)/... \
output:crd:artifacts:config=config/crd/external
output:crd:artifacts:config=$(3)
endef

# Call this function with $(call header,"Your message") to see underscored green text
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ go 1.20

require (
github.com/go-logr/logr v1.3.0
github.com/kuadrant/authorino v0.16.0
github.com/openshift/api v0.0.0-20230213134911-7ba313770556 // relese-4.12
go.uber.org/zap v1.26.0
k8s.io/api v0.28.4
Expand Down Expand Up @@ -66,6 +65,7 @@ require (
github.com/prometheus/procfs v0.10.1 // indirect
github.com/spf13/cobra v1.7.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/stretchr/testify v1.8.4 // indirect
go.uber.org/goleak v1.3.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect
Expand Down
3 changes: 1 addition & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,6 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/kuadrant/authorino v0.16.0 h1:u8l9f1iOo9PJLJWkZ8U8ASVKIv/VVv6IYWBkHXbXuCY=
github.com/kuadrant/authorino v0.16.0/go.mod h1:8AGcEKyBJgzi2G2/EVuYv/oKUiCOG2+VBanxiHo0XAM=
github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
Expand Down Expand Up @@ -272,6 +270,7 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
Expand Down

0 comments on commit 323abfd

Please sign in to comment.