Squashed '.gitlab/' changes from cf41f2e..6430416
6430416 Merge branch 'add-helm-and-kube' into 'main' bce675f Add install, upgrade, and uninstall for helm 1532f30 Add kubectl.makefile git-subtree-dir: .gitlab git-subtree-split: 64304160b9a4bb369bd89019e887d65b4e206896
This commit is contained in:
1
Makefile
1
Makefile
@@ -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:
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
11
make/kubectl.makefile
Normal file
11
make/kubectl.makefile
Normal 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)
|
||||||
Reference in New Issue
Block a user