-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
39 lines (30 loc) · 1.55 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
.ONESHELL:
.SHELL := /bin/bash
args = `arg="$(filter-out $@,$(MAKECMDGOALS))" && echo $${arg:-${1}}`
TEST_SERVER_TAG=0.9
NAMESPACE=test
test:
kubectl get nodes
echo $(TEST_SERVER_TAG)
kubectl get ns ${NAMESPACE} || echo 'namespce ${NAMESPACE} does not exist. Please create it'
build-server:
sh build-testserver.sh $(TEST_SERVER_TAG)
deploy-client-server:
cd test-server/dhall && TEST_SERVER_TAG=$(TEST_SERVER_TAG) dhall-to-yaml --documents < setup.dhall | kubectl create -n ${NAMESPACE} -f -
undeploy-client-server:
cd test-server/dhall && TEST_SERVER_TAG=$(TEST_SERVER_TAG) dhall-to-yaml --explain --documents < setup.dhall | kubectl delete -n ${NAMESPACE} -f -
deploy-krb-operator:
wget -O- -q https://raw.githubusercontent.com/novakov-alexey/krb-operator/master/manifest/rbac.yaml | \
sed -e "s:{{NAMESPACE}}:${NAMESPACE}:g" | kubectl create -n ${NAMESPACE} -f -
kubectl create \
-f https://raw.githubusercontent.com/novakov-alexey/krb-operator/master/manifest/kube-deployment.yaml \
-n ${NAMESPACE}
undeploy-krb-operator:
wget -O- -q https://raw.githubusercontent.com/novakov-alexey/krb-operator/master/manifest/rbac.yaml | \
sed -e "s:{{NAMESPACE}}:${NAMESPACE}:g" | kubectl delete -n ${NAMESPACE} -f -
kubectl delete -f https://raw.githubusercontent.com/novakov-alexey/krb-operator/master/manifest/kube-deployment.yaml -n ${NAMESPACE}
kubectl delete crd krbs.io.github.novakov-alexey
create-principals:
kubectl create -f test-server/my-krb-1.yaml -n ${NAMESPACE}
delete-principals:
kubectl delete -f test-server/my-krb-1.yaml -n ${NAMESPACE}