This repository has been archived by the owner on Nov 6, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bump openyurt version to v0.6.1 (#22)
* bump openyurt version to v0.6.1 * makefile: download kustomize if not exists
- Loading branch information
Showing
5 changed files
with
33 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,27 +45,27 @@ run: generate fmt vet manifests | |
go run --ldflags "${GO_LD_FLAGS}" ./cmd/manager/manager.go | ||
|
||
# Install CRDs into a cluster | ||
install: manifests | ||
kustomize build config/crd | kubectl apply -f - | ||
install: manifests kustomize | ||
$(KUSTOMIZE) build config/crd | kubectl apply -f - | ||
|
||
# Uninstall CRDs from a cluster | ||
uninstall: manifests | ||
kustomize build config/crd | kubectl delete -f - | ||
uninstall: manifests kustomize | ||
$(KUSTOMIZE) build config/crd | kubectl delete -f - | ||
|
||
# Deploy controller in the configured Kubernetes cluster in ~/.kube/config | ||
deploy: manifests | ||
cd config/manager && kustomize edit set image yurtcluster-operator-manager=${MANAGER_IMG} | ||
cd config/agent && kustomize edit set image yurtcluster-operator-agent=${AGENT_IMG} | ||
kustomize build config/default | kubectl apply -f - | ||
deploy: manifests kustomize | ||
cd config/manager && $(KUSTOMIZE) edit set image yurtcluster-operator-manager=${MANAGER_IMG} | ||
cd config/agent && $(KUSTOMIZE) edit set image yurtcluster-operator-agent=${AGENT_IMG} | ||
$(KUSTOMIZE) build config/default | kubectl apply -f - | ||
|
||
# Release manifests into docs/manifests and push docker image to dockerhub | ||
release-artifacts: docker-push release-manifests | ||
|
||
# Release manifests into docs/manifests | ||
release-manifests: manifests | ||
cd config/manager && kustomize edit set image yurtcluster-operator-manager=${MANAGER_IMG} | ||
cd config/agent && kustomize edit set image yurtcluster-operator-agent=${AGENT_IMG} | ||
kustomize build config/default > docs/manifests/deploy.yaml | ||
release-manifests: manifests kustomize | ||
cd config/manager && $(KUSTOMIZE) edit set image yurtcluster-operator-manager=${MANAGER_IMG} | ||
cd config/agent && $(KUSTOMIZE) edit set image yurtcluster-operator-agent=${AGENT_IMG} | ||
$(KUSTOMIZE) build config/default > docs/manifests/deploy.yaml | ||
|
||
# Generate manifests e.g. CRD, RBAC etc. | ||
manifests: controller-gen | ||
|
@@ -118,7 +118,7 @@ ifeq (, $(shell which controller-gen)) | |
CONTROLLER_GEN_TMP_DIR=$$(mktemp -d) ;\ | ||
cd $$CONTROLLER_GEN_TMP_DIR ;\ | ||
go mod init tmp ;\ | ||
go get sigs.k8s.io/controller-tools/cmd/controller-gen@v0.2.5 ;\ | ||
go get sigs.k8s.io/controller-tools/cmd/controller-gen@v0.5.0 ;\ | ||
rm -rf $$CONTROLLER_GEN_TMP_DIR ;\ | ||
} | ||
CONTROLLER_GEN=$(GOBIN)/controller-gen | ||
|
@@ -141,3 +141,19 @@ GOLANGCI_LINT=$(GOBIN)/golangci-lint | |
else | ||
GOLANGCI_LINT=$(shell which golangci-lint) | ||
endif | ||
|
||
# find or download kustomize | ||
kustomize: | ||
ifeq (, $(shell which kustomize)) | ||
@{ \ | ||
set -e ;\ | ||
KUSTOMIZE_TMP_DIR=$$(mktemp -d) ;\ | ||
cd $$KUSTOMIZE_TMP_DIR ;\ | ||
go mod init tmp ;\ | ||
go get sigs.k8s.io/kustomize/kustomize/[email protected] ;\ | ||
rm -rf $$KUSTOMIZE_TMP_DIR ;\ | ||
} | ||
KUSTOMIZE=$(GOBIN)/kustomize | ||
else | ||
KUSTOMIZE=$(shell which kustomize) | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters