Skip to content

Commit

Permalink
fix makefile to store crds in a separate folder (kubeflow#1368)
Browse files Browse the repository at this point in the history
* separated out the manifests fix from kubeflow#1365

* Update Makefile

Co-authored-by: Andrey Velichkevich <andrey.velichkevich@gmail.com>

Co-authored-by: Andrey Velichkevich <andrey.velichkevich@gmail.com>
  • Loading branch information
deepak-muley and andreyvelich authored Aug 17, 2021
1 parent 513fad6 commit 0637e39
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 11 deletions.
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ help: ## Display this help.
##@ Development

manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects.
$(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=manager-role webhook paths="./pkg/apis/..." output:crd:artifacts:config=manifests/base
$(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=manager-role webhook paths="./pkg/apis/..." output:crd:artifacts:config=manifests/base/crds

generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./pkg/apis/..."
Expand Down Expand Up @@ -72,17 +72,17 @@ docker-push: ## Push docker image with the manager.
##@ Deployment

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

uninstall: manifests kustomize ## Uninstall CRDs from the K8s cluster specified in ~/.kube/config.
$(KUSTOMIZE) build config/crd | kubectl delete -f -
$(KUSTOMIZE) build manifests/base/crds | kubectl delete -f -

deploy: manifests kustomize ## Deploy controller to the K8s cluster specified in ~/.kube/config.
cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG}
$(KUSTOMIZE) build config/default | kubectl apply -f -
cd manifests/overlays/standalone && $(KUSTOMIZE) edit set image kubeflow/training-operator=${IMG}
$(KUSTOMIZE) build manifests/overlays/standalone | kubectl apply -f -

undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/config.
$(KUSTOMIZE) build config/default | kubectl delete -f -
$(KUSTOMIZE) build manifests/overlays/standalone | kubectl delete -f -


CONTROLLER_GEN = $(shell pwd)/bin/controller-gen
Expand Down
File renamed without changes.
File renamed without changes.
7 changes: 7 additions & 0 deletions manifests/base/crds/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- kubeflow.org_tfjobs.yaml
- kubeflow.org_mxjobs.yaml
- kubeflow.org_pytorchjobs.yaml
- kubeflow.org_xgboostjobs.yaml
6 changes: 1 addition & 5 deletions manifests/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: kubeflow
resources:
- kubeflow.org_tfjobs.yaml
- kubeflow.org_mxjobs.yaml
- kubeflow.org_pytorchjobs.yaml
- kubeflow.org_xgboostjobs.yaml
- ./crds
- cluster-role-binding.yaml
- cluster-role.yaml
- service-account.yaml
Expand Down

0 comments on commit 0637e39

Please sign in to comment.