From b637ba0c563ca1247b35ee7b9c67356d2add550d Mon Sep 17 00:00:00 2001 From: Justin Kulikauskas <44813129+JustinKuli@users.noreply.github.com> Date: Sat, 29 Jun 2024 04:40:09 +0000 Subject: [PATCH] Prune more kubebuilder scaffolding The RBAC resources for PolicyCore were already incomplete, and are not used, so they have now been removed from the config/ folder. The boilerplate.go.txt was looking very lonely in the hack/ folder, which was taking up valuable space on the GitHub landing page, so it has been moved into the config/ folder. Signed-off-by: Justin Kulikauskas <44813129+JustinKuli@users.noreply.github.com> --- Makefile | 2 +- {hack => config}/boilerplate.go.txt | 0 config/default/kustomization.yaml | 1 - config/rbac/kustomization.yaml | 9 --------- config/rbac/role_binding.yaml | 12 ------------ config/rbac/service_account.yaml | 5 ----- 6 files changed, 1 insertion(+), 28 deletions(-) rename {hack => config}/boilerplate.go.txt (100%) delete mode 100644 config/rbac/kustomization.yaml delete mode 100644 config/rbac/role_binding.yaml delete mode 100644 config/rbac/service_account.yaml diff --git a/Makefile b/Makefile index ac929c5..2fb7aff 100644 --- a/Makefile +++ b/Makefile @@ -84,7 +84,7 @@ manifests: $(CONTROLLER_GEN) $(KUSTOMIZE) ## Generate WebhookConfiguration, Clus .PHONY: generate generate: $(CONTROLLER_GEN) ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations. - $(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..." + $(CONTROLLER_GEN) object:headerFile="config/boilerplate.go.txt" paths="./..." .PHONY: fmt fmt: $(GOFUMPT) $(GCI) diff --git a/hack/boilerplate.go.txt b/config/boilerplate.go.txt similarity index 100% rename from hack/boilerplate.go.txt rename to config/boilerplate.go.txt diff --git a/config/default/kustomization.yaml b/config/default/kustomization.yaml index 408cd80..3a9af05 100644 --- a/config/default/kustomization.yaml +++ b/config/default/kustomization.yaml @@ -14,4 +14,3 @@ namePrefix: governance-policy-nucleus- bases: - ../crd -- ../rbac diff --git a/config/rbac/kustomization.yaml b/config/rbac/kustomization.yaml deleted file mode 100644 index 55d4d0c..0000000 --- a/config/rbac/kustomization.yaml +++ /dev/null @@ -1,9 +0,0 @@ -resources: -# All RBAC will be applied under this service account in -# the deployment namespace. You may comment out this resource -# if your manager will use a service account that exists at -# runtime. Be sure to update RoleBinding and ClusterRoleBinding -# subjects if changing service account names. -- service_account.yaml -- role.yaml -- role_binding.yaml diff --git a/config/rbac/role_binding.yaml b/config/rbac/role_binding.yaml deleted file mode 100644 index 2070ede..0000000 --- a/config/rbac/role_binding.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: manager-rolebinding -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: manager-role -subjects: -- kind: ServiceAccount - name: controller-manager - namespace: system diff --git a/config/rbac/service_account.yaml b/config/rbac/service_account.yaml deleted file mode 100644 index 7cd6025..0000000 --- a/config/rbac/service_account.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - name: controller-manager - namespace: system