Skip to content

Commit ddc831a

Browse files
committed
refactor(profile-controller): move manifests into kustomize structure
Reorganize profile-controller manifests under manifests/kustomize.\nUpdate Makefile, release tooling, and install script paths to the new layout. Signed-off-by: alokdangre <alokdangre@gmail.com>
1 parent dd27e2f commit ddc831a

50 files changed

Lines changed: 147 additions & 151 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

components/profile-controller/Makefile

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ help: ## Display this help.
3030

3131
.PHONY: manifests
3232
manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects.
33-
$(CONTROLLER_GEN) crd paths="./..." output:crd:artifacts:config=config/crd/bases
33+
$(CONTROLLER_GEN) crd paths="./..." output:crd:artifacts:config=manifests/kustomize/base/crd/bases
3434
# Uncomment when we remove the permissive ClusterRoleBinding to cluster-admin
3535
# $(CONTROLLER_GEN) rbac:roleName=cluster-role-binding webhook paths="./..."
3636

@@ -59,7 +59,7 @@ build: generate fmt vet ## Build manager binary.
5959

6060
.PHONY: run
6161
run: manifests generate fmt vet ## Run a controller from your host.
62-
go run ./main.go -namespace-labels-path ./config/base/namespace-labels.yaml
62+
go run ./main.go -namespace-labels-path ./manifests/kustomize/base/namespace-labels.yaml
6363

6464
.PHONY: docker-build
6565
docker-build: ## Build docker image with the manager.
@@ -97,31 +97,31 @@ endif
9797

9898
.PHONY: install
9999
install: manifests ## Install CRDs into the K8s cluster specified in ~/.kube/config.
100-
$(KUSTOMIZE) build config/crd | kubectl apply -f -
100+
$(KUSTOMIZE) build manifests/kustomize/base/crd | kubectl apply -f -
101101

102102
.PHONY: uninstall
103103
uninstall: manifests ## Uninstall CRDs from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
104-
$(KUSTOMIZE) build config/crd | kubectl delete --ignore-not-found=$(ignore-not-found) -f -
104+
$(KUSTOMIZE) build manifests/kustomize/base/crd | kubectl delete --ignore-not-found=$(ignore-not-found) -f -
105105

106106
.PHONY: deploy
107107
deploy: manifests ## Deploy controller to the K8s cluster specified in ~/.kube/config.
108108
@echo IMG=${IMG}
109109
@echo TAG=${TAG}
110-
sed -i'' -e 's@newName: .*@newName: '"${IMG}"'@' ./config/base/kustomization.yaml
111-
sed -i'' -e 's@newTag: .*@newTag: '"${TAG}"'@' ./config/base/kustomization.yaml
112-
$(KUSTOMIZE) build config/base | kubectl apply -f -
110+
sed -i'' -e 's@newName: .*@newName: '"${IMG}"'@' ./manifests/kustomize/base/kustomization.yaml
111+
sed -i'' -e 's@newTag: .*@newTag: '"${TAG}"'@' ./manifests/kustomize/base/kustomization.yaml
112+
$(KUSTOMIZE) build manifests/kustomize/base | kubectl apply -f -
113113

114114
.PHONY: test-overlays
115115
test-overlays: manifests ## Deploy controller to the K8s cluster specified in ~/.kube/config. with overlay changes on top
116116
@echo IMG=${IMG}
117117
@echo TAG=${TAG}
118-
sed -i'' -e 's@newName: .*@newName: '"${IMG}"'@' ./config/base/kustomization.yaml
119-
sed -i'' -e 's@newTag: .*@newTag: '"${TAG}"'@' ./config/base/kustomization.yaml
120-
$(KUSTOMIZE) build config/overlays/kubeflow | kubectl apply -f -
118+
sed -i'' -e 's@newName: .*@newName: '"${IMG}"'@' ./manifests/kustomize/base/kustomization.yaml
119+
sed -i'' -e 's@newTag: .*@newTag: '"${TAG}"'@' ./manifests/kustomize/base/kustomization.yaml
120+
$(KUSTOMIZE) build manifests/kustomize/overlays/kubeflow | kubectl apply -f -
121121

122122
.PHONY: undeploy
123123
undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
124-
$(KUSTOMIZE) build config/base | kubectl delete --ignore-not-found=$(ignore-not-found) -f -
124+
$(KUSTOMIZE) build manifests/kustomize/base | kubectl delete --ignore-not-found=$(ignore-not-found) -f -
125125

126126
##@ Build Dependencies
127127

components/profile-controller/README.md

Lines changed: 2 additions & 3 deletions

components/profile-controller/config/README.md

Lines changed: 0 additions & 33 deletions
This file was deleted.

components/profile-controller/config/base/kustomization.yaml

Lines changed: 0 additions & 20 deletions
This file was deleted.

components/profile-controller/config/default/kustomization.yaml

Lines changed: 0 additions & 80 deletions
This file was deleted.
Lines changed: 36 additions & 0 deletions

components/profile-controller/config/crd/bases/kubeflow.org_profiles.yaml renamed to components/profile-controller/manifests/kustomize/base/crd/bases/kubeflow.org_profiles.yaml

File renamed without changes.

components/profile-controller/config/crd/kustomization.yaml renamed to components/profile-controller/manifests/kustomize/base/crd/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This kustomization.yaml is not intended to be run by itself,
22
# since it depends on service name and namespace that are out of this kustomize package.
3-
# It should be run by config/default
3+
# It should be run by manifests/kustomize/base
44
resources:
55
- bases/kubeflow.org_profiles.yaml
66
#+kubebuilder:scaffold:crdkustomizeresource

components/profile-controller/config/crd/kustomizeconfig.yaml renamed to components/profile-controller/manifests/kustomize/base/crd/kustomizeconfig.yaml

File renamed without changes.

components/profile-controller/config/crd/patches/cainjection_in_profiles.yaml renamed to components/profile-controller/manifests/kustomize/base/crd/patches/cainjection_in_profiles.yaml

File renamed without changes.

0 commit comments

Comments
 (0)