default: convert deploy viz

regcred:
    kubectl get secret -n default regcred --output=yaml -o yaml | sed 's/namespace: default/namespace: wayl-one/' | kubectl apply -n wayl-one -f - && echo deployed secret || echo secret exists
build:
    docker build -t registry.wayl.one/wayl-one -f Dockerfile .
tag:
    docker tag registry.wayl.one/wayl-one registry.wayl.one/wayl-one:$(git rev-parse --short HEAD)
test:
    docker run -p 5556:80 registry.wayl.one/wayl-one
push:
    docker push registry.wayl.one/wayl-one:$(git rev-parse --short HEAD)
    docker push registry.wayl.one/wayl-one:latest
set-image:
    kubectl set image deployment/shot-wayl-one --namespace shot shot-wayl-one=registry.wayl.one/wayl-one:$(git rev-parse --short HEAD)

convert:
    kompose convert -o deployment.yaml -n wayl-one
deploy:
    kubectl apply -f deployment.yaml
viz:
    k8sviz -n wayl-one --kubeconfig $KUBECONFIG -t png -o wayl-one-k8s.png
restart:
    kubectl rollout restart -n wayl-one deployment/wayl-one
