# k8s # # deploys k8s MANDATORY-k8s = K8S_CONTEXT start-k8s: SHELL:=/bin/bash start-k8s: @- echo "### starting deployment with k8s" @- echo "### setting kubernetes context to $(K8S_CONTEXT)" #@ kubectl config use-context $(K8S_CONTEXT) @- echo "### run kubectl apply -f kubernetes.yaml and secrets.yaml" @- cat kubernetes.yaml secrets.yaml >_manifest.yaml ifdef K8S_MANIFESTS @- echo "\n%%%DEBUG1" @- echo $(K8S_MANIFESTS) @- for file in $(K8S_MANIFESTS); do \ if [[ $$file == http* ]] ; \ then \ curl -o _tmpfile.yaml $$file; \ else \ cp $$file _tmpfile.yaml; \ fi; \ cat _tmpfile.yaml >>_manifest.yaml; \ rm _tmpfile.yaml; \ done endif @- echo "\n%%%DEBUG22" @ cat _manifest.yaml | envsubst | kubectl apply -f - @- rm _manifest.yaml pull-k8s: # nop