Merge update from Common

This commit is contained in:
ducoterra
2021-12-05 22:21:09 -05:00
3 changed files with 24 additions and 0 deletions

View File

@@ -12,6 +12,7 @@ include .gitlab/make/helm.makefile
include .gitlab/make/kaniko.makefile include .gitlab/make/kaniko.makefile
include .gitlab/make/truenas.makefile include .gitlab/make/truenas.makefile
include .gitlab/make/git.makefile include .gitlab/make/git.makefile
include .gitlab/make/kubectl.makefile
.PHONY: make-update .PHONY: make-update
make-update: make-update:

View File

@@ -2,3 +2,15 @@
helm-release: helm-release:
@yq e ".version = \"$(shell cat VERSION)\"" -i helm/Chart.yaml @yq e ".version = \"$(shell cat VERSION)\"" -i helm/Chart.yaml
@yq e ".appVersion = \"$(shell cat VERSION)\"" -i helm/Chart.yaml @yq e ".appVersion = \"$(shell cat VERSION)\"" -i helm/Chart.yaml
.PHONY: install
install: set-namespace
helm install $(PROJECT_NAME) ./helm --set image=$(IMAGE)
.PHONY: upgrade
upgrade: set-namespace
helm upgrade $(PROJECT_NAME) ./helm --set image=$(IMAGE)
.PHONY: uninstall
uninstall: set-namespace
helm uninstall $(PROJECT_NAME)

View File

@@ -0,0 +1,11 @@
.PHONY: set-namespace
set-namespace:
kubectl config set contexts.$(shell kubectl config current-context).namespace $(shell cat NAMESPACE)
.PHONY: create-regcred
create-regcred:
@kubectl create secret docker-registry regcred \
--docker-server=registry.ducoterra.net \
--docker-username=$(shell vault kv get -field username secret/duconet/basic-auth) \
--docker-password='$(shell vault kv get -field password secret/duconet/basic-auth)' \
--docker-email=$(shell vault kv get -field username secret/duconet/basic-auth)