# Copyright 2020 Lingfei Kong . All rights reserved. # Use of this source code is governed by a MIT style # license that can be found in the LICENSE file. # ============================================================================== # Makefile helper functions for deploy to developer env # KUBECTL := kubectl NAMESPACE ?= iam CONTEXT ?= marmotedu.dev DEPLOYS=iam-apiserver iam-authz-server iam-pump iam-watcher .PHONY: deploy.run.all deploy.run.all: @echo "===========> Deploying all" @$(MAKE) deploy.run .PHONY: deploy.run deploy.run: $(addprefix deploy.run., $(DEPLOYS)) .PHONY: deploy.run.% deploy.run.%: $(eval ARCH := $(word 2,$(subst _, ,$(PLATFORM)))) @echo "===========> Deploying $* $(VERSION)-$(ARCH)" echo @$(KUBECTL) -n $(NAMESPACE) --context=$(CONTEXT) set image deployment/$* $*=$(REGISTRY_PREFIX)/$*-$(ARCH):$(VERSION)