-
Notifications
You must be signed in to change notification settings - Fork 10
/
Makefile
63 lines (53 loc) · 1.76 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
SHELL:=/bin/bash
DIRS=\
base/cert-manager \
base/flux-system \
apps/datalake-metrics \
apps/dns \
apps/homeassistant \
apps/homer \
apps/monitoring \
apps/unifi \
apps/tandoor
HELMDIRS=\
apps/authentik \
apps/datalake-logs \
apps/descheduler \
apps/opencost \
apps/minio \
apps/promtail \
apps/proxy-docker-io \
apps/proxy-ghcr-io \
apps/proxy-quay-io \
base/cnpg-system \
base/external-secrets \
base/longhorn-system \
base/metallb-system \
base/node-feature-discovery \
base/node-problem-detector \
base/topolvm \
base/traefik
MAKEFILES=$(shell find . -name "Makefile" -not -path "*/vendor/*" -not -path "./Makefile")
.PHONY: help
help: ## Display help
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n\nTargets:\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-10s\033[0m %s\n", $$1, $$2 }' $(MAKEFILE_LIST)
.PHONY: generate
generate: ## Generate all manifests
for d in $(DIRS); do $(MAKE) -C $$d generate || exit 1; done
.PHONY: upgrade
upgrade: ## Update all components and their versions
for d in $(DIRS); do $(MAKE) -C $$d version-update || exit 1; done
for d in $(HELMDIRS); do hack/helm-updater.sh "$$d" || exit 1; done
.PHONY: validate
validate: ## Validate kubernetes manifests
for d in $(DIRS); do $(MAKE) -C $$d validate || exit 1; done
.PHONY: kubescape
kubescape: ## Validate kubernetes manifests
kubescape scan --compliance-threshold 70 --exceptions './kubescape-exceptions.json' $$(find apps base -name "*.yaml" -not -path "*/jsonnet/*" -not -path "*/vendor/*" -not -name "settings.yaml")
.PHONY: prometheusrules
prometheusrules: ## Validate prometheus rules
./hack/unpack-prometheus-rules.sh
pint lint tmp/rules
.PHONY: bootstrap
bootstrap: ## Bootstrap development environment
ggshield install -m local