diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fdc60fa..ddf1dc5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -46,4 +46,5 @@ deploy: - for f in $(find k8s -regex '.*\.ya*ml'); do envsubst < $f > "/deploy/$(basename $f)"; done - ./kubectl apply -f /deploy - ./kubectl rollout status deploy $DEPLOY - - ./kubectl exec $(./kubectl get pods --selector=app=$DEPLOY --output=jsonpath='{.items[*].metadata.name}') -- python manage.py migrate \ No newline at end of file + - POD=$(./kubectl get pods --selector=app=$DEPLOY --output=jsonpath='{.items[*].metadata.name}') + - ./kubectl exec $POD -- python manage.py migrate \ No newline at end of file diff --git a/k8s/deploy.yaml b/k8s/deploy.yaml index c0b48d6..99e807c 100644 --- a/k8s/deploy.yaml +++ b/k8s/deploy.yaml @@ -17,6 +17,8 @@ spec: envFrom: - configMapRef: name: $DEPLOY + - secretRef: + name: $django-secrets volumeMounts: - mountPath: /app/db name: $DEPLOY diff --git a/ui/static/ui/button.js b/ui/static/ui/button.js index 7e2a69f..478b5b3 100644 --- a/ui/static/ui/button.js +++ b/ui/static/ui/button.js @@ -20,6 +20,7 @@ var count = document.getElementById("COUNT"); button.addEventListener("click", event => { button.disabled = true; + button.classList.add("is-loading"); fetch('/button', { method: 'POST', headers: { @@ -34,6 +35,7 @@ button.addEventListener("click", event => { count.innerText = data.pressed; }).finally(() => { button.disabled = false; + button.classList.remove("is-loading"); }); });