diff --git a/.drone.yml b/.drone.yml index 9307d6d..397ce79 100644 --- a/.drone.yml +++ b/.drone.yml @@ -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: diff --git a/kube/q3-status-deployment.yaml b/kube/q3-status-deployment.yaml index 30fcd3e..01da082 100644 --- a/kube/q3-status-deployment.yaml +++ b/kube/q3-status-deployment.yaml @@ -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