Skip to content

Commit

Permalink
Generate CRD into chart template folder
Browse files Browse the repository at this point in the history
Since controller isn't using webhook or cert-manger we don't really need
to pass crd through kustomize in order to install it. We switch
generating CRD into chart template directory. In order to keep single
file reference.

Signed-off-by: Dinar Valeev <dinar.valeev@absa.africa>
  • Loading branch information
k0da committed Mar 8, 2021
1 parent 4a6c366 commit 8242ad4
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 286 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ ns1-secret:
.PHONY: install
install:
$(call manifest)
$(KUSTOMIZE_PATH) build config/crd | kubectl apply -f -
kubectl apply -f chart/k8gb/templates/k8gb.absa.oss_gslbs.yaml

# run all linters from .golangci.yaml; see: https://golangci-lint.run/usage/install/#local-installation
.PHONY: lint
Expand Down Expand Up @@ -410,7 +410,7 @@ define generate
endef

define manifest
$(call controller-gen,crd:crdVersions=v1 paths="./..." output:crd:artifacts:config=config/crd/bases)
$(call controller-gen,crd:crdVersions=v1 paths="./..." output:crd:artifacts:config=chart/k8gb/templates/)
endef

# function retrieves controller-gen path or installs controller-gen@v3.0.0 and retrieve new path in case it is not installed
Expand Down
File renamed without changes.
221 changes: 0 additions & 221 deletions chart/k8gb/templates/k8gb.absa.oss_gslbs_crd.yaml

This file was deleted.

21 changes: 0 additions & 21 deletions config/crd/kustomization.yaml

This file was deleted.

17 changes: 0 additions & 17 deletions config/crd/kustomizeconfig.yaml

This file was deleted.

8 changes: 0 additions & 8 deletions config/crd/patches/cainjection_in_gslbs.yaml

This file was deleted.

17 changes: 0 additions & 17 deletions config/crd/patches/webhook_in_gslbs.yaml

This file was deleted.

0 comments on commit 8242ad4

Please sign in to comment.