Add env var for server address and rconn password
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing

This commit is contained in:
kleph 2020-03-25 10:26:22 +01:00
parent fce4f86987
commit 4097b494fa
2 changed files with 14 additions and 2 deletions

View file

@ -24,9 +24,10 @@ deploy_commands_alias:
- sed "s/__LEVEL__/$${LEVEL}/g" kube/q3-status-deployment.yaml > kube/q3-status-deployment-$${LEVEL}.yaml
- sed "s/__NAMESPACE__/$${NAMESPACE}/g" kube/q3-status-deployment-$${LEVEL}.yaml > kube/q3-status-deployment-$${NAMESPACE}-$${LEVEL}.yaml
- sed "s/__IMAGE_TAG__/$${IMAGE_TAG}/g" kube/q3-status-deployment-$${NAMESPACE}-$${LEVEL}.yaml > kube/q3-status-deployment-$${NAMESPACE}-$${LEVEL}2.yaml
- cat kube/q3-status-deployment-$${NAMESPACE}-$${LEVEL}2.yaml
- sed "s/__Q3_SERVER__/$${Q3_SERVER}/g" kube/q3-status-deployment-$${NAMESPACE}-$${LEVEL}2.yaml > kube/q3-status-deployment-$${NAMESPACE}-$${LEVEL}3.yaml
- sed "s/__RCONN_PASSWORD__/$${RCONN_PASSWORD}/g" kube/q3-status-deployment-$${NAMESPACE}-$${LEVEL}3.yaml > kube/q3-status-deployment-$${NAMESPACE}-$${LEVEL}4.yaml
- echo "applying"
- kubectl apply -f kube/q3-status-deployment-$${NAMESPACE}-$${LEVEL}2.yaml --namespace=q3
- kubectl apply -f kube/q3-status-deployment-$${NAMESPACE}-$${LEVEL}4.yaml --namespace=q3
- echo "== post deploy ($${LEVEL}) status:"
- kubectl get deployments --namespace=q3
- kubectl get pods --namespace=q3
@ -48,6 +49,9 @@ steps:
IMAGE_TAG: ${DRONE_COMMIT_SHA:0:8}
NAMESPACE: q3
LEVEL: staging
Q3_SERVER: "vm-docker:27960"
RCONN_PASSWORD:
from_secret: rconn_password
<<: *deploy_commands
when:
branch:
@ -67,6 +71,9 @@ steps:
IMAGE_TAG: ${DRONE_COMMIT_SHA:0:8}
NAMESPACE: q3
LEVEL: live
Q3_SERVER: "vm-docker:27960"
RCONN_PASSWORD:
from_secret: rconn_password
<<: *deploy_commands
when:
branch:

View file

@ -20,5 +20,10 @@ spec:
- name: q3-status
image: kleph/q3-status:__IMAGE_TAG__
imagePullPolicy: Always
env:
- name: Q3_SERVER
value: __Q3_SERVER__
- name: RCONN_PASSWORD
value: __RCONN_PASSWORD__
ports:
- containerPort: 5000