mirror of
https://gitlab.fabcity.hamburg/software/fab-city-software-kit.git
synced 2024-09-19 20:08:52 +02:00
added makefile to setup dev cluster with oml
This commit is contained in:
parent
72321a7994
commit
2c0d8def72
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -5,5 +5,6 @@
|
|||
.pre-commit-config.yaml
|
||||
*.tgz
|
||||
/.idea/*
|
||||
.vscode/*.log
|
||||
charts
|
||||
temp
|
||||
|
|
2
.vscode/extensions.json
vendored
2
.vscode/extensions.json
vendored
|
@ -6,5 +6,7 @@
|
|||
"jnoortheen.nix-ide",
|
||||
"ms-kubernetes-tools.vscode-kubernetes-tools",
|
||||
"redhat.vscode-yaml",
|
||||
"oderwat.indent-rainbow",
|
||||
"ms-vscode.makefile-tools",
|
||||
]
|
||||
}
|
||||
|
|
68
Makefile
Normal file
68
Makefile
Normal file
|
@ -0,0 +1,68 @@
|
|||
##@ General
|
||||
|
||||
# The help target prints out all targets with their descriptions organized
|
||||
# beneath their categories. The categories are represented by '##@' and the
|
||||
# target descriptions by '##'. The awk commands is responsible for reading the
|
||||
# entire set of makefiles included in this invocation, looking for lines of the
|
||||
# file as xyz: ## something, and then pretty-format the target and help. Then,
|
||||
# if there's a line with ##@ something, that gets pretty-printed as a category.
|
||||
# More info on the usage of ANSI control characters for terminal formatting:
|
||||
# https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_parameters
|
||||
# More info on the awk command:
|
||||
# http://linuxcommand.org/lc3_adv_awk.php
|
||||
|
||||
|
||||
help: ## Display this help.
|
||||
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
|
||||
|
||||
##@ Setup
|
||||
|
||||
up: k3d-create olm-install ## Create a local k3d development cluster with operator lifecycle manager.
|
||||
down: k3d-delete ## Delete the local k3d development cluster.
|
||||
|
||||
olm-install: ## Install the Operator Framework Lifecycle Manager.
|
||||
operator-sdk olm install
|
||||
|
||||
olm-uninstall: ## Uninstall the Operator Framework Lifecycle Manager.
|
||||
operator-sdk olm uninstall
|
||||
|
||||
k3d-create: ## Create a local K3D development cluster.
|
||||
k3d cluster create fcos-dev --config ci/k3d-fcos-dev.yaml
|
||||
|
||||
k3d-delete: ## Delete the local K3D development cluster
|
||||
k3d cluster delete fcos-dev
|
||||
|
||||
##@ Lint
|
||||
|
||||
lint: yaml-lint markdown-lint ## Lint all input files.
|
||||
|
||||
yaml-lint: ## Lint all YAML files.
|
||||
yamllint -f auto $(shell pwd)
|
||||
|
||||
markdown-lint: ## Lint all Markdown files.
|
||||
mdl $(shell pwd)
|
||||
|
||||
##@ Test
|
||||
|
||||
conftest: ## Test the Kubernetes manifest against the policies.
|
||||
kubectl kustomize overlays/dev --enable-helm | conftest test -p test -
|
||||
|
||||
##@ Build
|
||||
|
||||
manifest: ## Build Kubernetes manifest using Helm.
|
||||
kubectl kustomize overlays/dev --enable-helm
|
||||
|
||||
##@ Deployment
|
||||
|
||||
deploy: ## Deploy local Kubernetes development cluster.
|
||||
kubectl kustomize overlays/dev/ --enable-helm | kubectl apply -f -
|
||||
|
||||
clean: down up deploy ## Deploy a clean local Kubernetes development cluster.
|
||||
|
||||
##@ Show
|
||||
|
||||
get-all: ## Get the state of all Kubernetes resources.
|
||||
kubectl get all --all-namespaces
|
||||
|
||||
watch-all: ## Watch the state of all Kubernetes resources.
|
||||
watch -n 1 kubectl get all --all-namespaces
|
Loading…
Reference in a new issue