need secret mounts

This commit is contained in:
ducoterra
2020-04-25 12:30:04 -04:00
parent 948569a659
commit 57328a7fc8
3 changed files with 6 additions and 1 deletions

View File

@@ -46,4 +46,5 @@ deploy:
- for f in $(find k8s -regex '.*\.ya*ml'); do envsubst < $f > "/deploy/$(basename $f)"; done - for f in $(find k8s -regex '.*\.ya*ml'); do envsubst < $f > "/deploy/$(basename $f)"; done
- ./kubectl apply -f /deploy - ./kubectl apply -f /deploy
- ./kubectl rollout status deploy $DEPLOY - ./kubectl rollout status deploy $DEPLOY
- ./kubectl exec $(./kubectl get pods --selector=app=$DEPLOY --output=jsonpath='{.items[*].metadata.name}') -- python manage.py migrate - POD=$(./kubectl get pods --selector=app=$DEPLOY --output=jsonpath='{.items[*].metadata.name}')
- ./kubectl exec $POD -- python manage.py migrate

View File

@@ -17,6 +17,8 @@ spec:
envFrom: envFrom:
- configMapRef: - configMapRef:
name: $DEPLOY name: $DEPLOY
- secretRef:
name: $django-secrets
volumeMounts: volumeMounts:
- mountPath: /app/db - mountPath: /app/db
name: $DEPLOY name: $DEPLOY

View File

@@ -20,6 +20,7 @@ var count = document.getElementById("COUNT");
button.addEventListener("click", event => { button.addEventListener("click", event => {
button.disabled = true; button.disabled = true;
button.classList.add("is-loading");
fetch('/button', { fetch('/button', {
method: 'POST', method: 'POST',
headers: { headers: {
@@ -34,6 +35,7 @@ button.addEventListener("click", event => {
count.innerText = data.pressed; count.innerText = data.pressed;
}).finally(() => { }).finally(() => {
button.disabled = false; button.disabled = false;
button.classList.remove("is-loading");
}); });
}); });