Skip to content

Commit 4c3456a

Browse files
author
Per Goncalves da Silva
committed
Add rbac standard/experimental split to catalogd
Signed-off-by: Per Goncalves da Silva <[email protected]>
1 parent 17e7333 commit 4c3456a

17 files changed

+90
-22
lines changed

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,11 @@ manifests: $(CONTROLLER_GEN) $(KUSTOMIZE) #EXHELP Generate WebhookConfiguration,
153153
$(CONTROLLER_GEN) --load-build-tags=$(GO_BUILD_TAGS),standard rbac:roleName=manager-role paths="./internal/operator-controller/..." output:rbac:artifacts:config=$(KUSTOMIZE_OPCON_RBAC_DIR)/standard
154154
# Generate the remaining operator-controller experimental manifests
155155
$(CONTROLLER_GEN) --load-build-tags=$(GO_BUILD_TAGS) rbac:roleName=manager-role paths="./internal/operator-controller/..." output:rbac:artifacts:config=$(KUSTOMIZE_OPCON_RBAC_DIR)/experimental
156-
# Generate the remaining catalogd manifests
157-
$(CONTROLLER_GEN) --load-build-tags=$(GO_BUILD_TAGS) rbac:roleName=manager-role paths="./internal/catalogd/..." output:rbac:artifacts:config=$(KUSTOMIZE_CATD_RBAC_DIR)
156+
# Generate the remaining catalogd standard manifests
157+
$(CONTROLLER_GEN) --load-build-tags=$(GO_BUILD_TAGS),standard rbac:roleName=manager-role paths="./internal/catalogd/..." output:rbac:artifacts:config=$(KUSTOMIZE_CATD_RBAC_DIR)/standard
158158
$(CONTROLLER_GEN) --load-build-tags=$(GO_BUILD_TAGS) webhook paths="./internal/catalogd/..." output:webhook:artifacts:config=$(KUSTOMIZE_CATD_WEBHOOKS_DIR)
159+
# Generate the remaining catalogd experimental manifests
160+
$(CONTROLLER_GEN) --load-build-tags=$(GO_BUILD_TAGS) rbac:roleName=manager-role paths="./internal/catalogd/..." output:rbac:artifacts:config=$(KUSTOMIZE_CATD_RBAC_DIR)/experimental
159161
# Generate manifests stored in source-control
160162
mkdir -p $(MANIFEST_HOME)
161163
$(KUSTOMIZE) build $(KUSTOMIZE_STANDARD_OVERLAY) > $(STANDARD_MANIFEST)

config/base/catalogd/kustomization.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,4 @@ kind: Kustomization
44
namespace: olmv1-system
55
namePrefix: catalogd-
66
resources:
7-
- rbac
87
- manager

config/base/catalogd/rbac/auth_proxy_client_clusterrole.yaml renamed to config/base/catalogd/rbac/common/auth_proxy_client_clusterrole.yaml

File renamed without changes.
File renamed without changes.

config/base/catalogd/rbac/auth_proxy_role_binding.yaml renamed to config/base/catalogd/rbac/common/auth_proxy_role_binding.yaml

File renamed without changes.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
resources:
2+
# All RBAC will be applied under this service account in
3+
# the deployment namespace. You may comment out this resource
4+
# if your manager will use a service account that exists at
5+
# runtime. Be sure to update RoleBinding and ClusterRoleBinding
6+
# subjects if changing service account names.
7+
- service_account.yaml
8+
- role_binding.yaml
9+
- leader_election_role.yaml
10+
- leader_election_role_binding.yaml
11+
# The following RBAC configurations are used to protect
12+
# the metrics endpoint with authn/authz. These configurations
13+
# ensure that only authorized users and service accounts
14+
# can access the metrics endpoint. Comment the following
15+
# permissions if you want to disable this protection.
16+
# More info: https://book.kubebuilder.io/reference/metrics.html
17+
- auth_proxy_role.yaml
18+
- auth_proxy_role_binding.yaml
19+
- auth_proxy_client_clusterrole.yaml

config/base/catalogd/rbac/leader_election_role.yaml renamed to config/base/catalogd/rbac/common/leader_election_role.yaml

File renamed without changes.

config/base/catalogd/rbac/leader_election_role_binding.yaml renamed to config/base/catalogd/rbac/common/leader_election_role_binding.yaml

File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)