-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
29 lines (25 loc) · 748 Bytes
/
Makefile
File metadata and controls
29 lines (25 loc) · 748 Bytes
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
FILES := $(shell find . -name '*.yml')
kubectl := /c/source/pmc kubectl pmc-aks-training
DEPLOYED := $(addprefix .deployments/,$(addsuffix .deployed,$(FILES)))
.PHONY: all clean list-resources
all: $(DEPLOYED)
@echo 'All done!'
@$(kubectl) get all
.deployments/%.yml.deployed: %.yml
@mkdir -p $(dir $@)
@echo "Deploying $<..."
@$(kubectl) apply -f $<
@touch $@
list-resources:
@kubectl api-resources --namespaced=true --output=name \
| while read resource ; do \
echo "$${resource}:" ; \
kubectl \
get "$${resource}" \
--namespace daniel-geelen \
| sed 's/^/ /' \
; done
clean:
@rm -rf .deployments/
@echo "> Cleaning up all resources in namespace 'daniel-geelen'..."
@kubectl delete all --all --namespace daniel-geelen