Add kubectl.makefile
Add kubectl make commands like set-namespace and create-regcred.
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/truenas.makefile
|
||||
include .gitlab/make/git.makefile
|
||||
include .gitlab/make/kubectl.makefile
|
||||
|
||||
.PHONY: make-update
|
||||
make-update:
|
||||
|
||||
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