Commit 865f526f authored by David Mendez's avatar David Mendez

Prepare k8s deployment file for staging

parent 4813155f
Pipeline #93257 passed with stages
in 5 minutes and 22 seconds
......@@ -171,17 +171,18 @@ deploy_to_staging:
- kubectl create secret generic ${GUNICORN_CONFIG_SECRET_NAME_STAGING} --from-file=GUNICORN_CONFIG.py=${CONFIG_GUNICORN_STAGING_FILE_PATH} -o yaml -n ${CHEMBL_NS_STAGING} --dry-run=client | kubectl replace -f -
- cat ${CONFIG_STAGING_FILE_PATH}
- cat ${CONFIG_GUNICORN_STAGING_FILE_PATH}
# - sed -i "s~<NAMESPACE>~${CHEMBL_NS_STAGING}~" k8s-deployment.yaml
# - sed -i "s~<NUM_REPLICAS>~${NUM_REPLICAS_STAGING}~" k8s-deployment.yaml
# - sed -i "s~<HTTP_PROXY>~${HTTP_PROXY_HX}~g" k8s-deployment.yaml
# - sed -i "s~<HTTPS_PROXY>~${HTTPS_PROXY_HX}~g" k8s-deployment.yaml
# - sed -i "s~<NO_PROXY>~${NO_PROXY_HX_DEFAULT}~g" k8s-deployment.yaml
# - sed -i "s~<CPU_LIMIT>~${CPU_LIMIT_STAGING}~" k8s-deployment.yaml
# - sed -i "s~<CPU_REQUESTED>~${CPU_REQUESTED_STAGING}~" k8s-deployment.yaml
# - sed -i "s~<SERVER_IMAGE_TAG>~${SERVER_IMAGE_TAG}~" k8s-deployment.yaml
# - sed -i "s~<RUN_CONFIG_SECRET_NAME>~${RUN_CONFIG_SECRET_NAME_STAGING}~" k8s-deployment.yaml
# - sed -i "s~<GUNICORN_CONFIG_SECRET_NAME>~${GUNICORN_CONFIG_SECRET_NAME_STAGING}~" k8s-deployment.yaml
# - cat k8s-deployment.yaml
- sed -i "s~<NAMESPACE>~${CHEMBL_NS_STAGING}~" k8s-deployment.yaml
- sed -i "s~<NUM_REPLICAS>~${NUM_REPLICAS_STAGING}~" k8s-deployment.yaml
- sed -i "s~<HTTP_PROXY>~${HTTP_PROXY_HX}~g" k8s-deployment.yaml
- sed -i "s~<HTTPS_PROXY>~${HTTPS_PROXY_HX}~g" k8s-deployment.yaml
- sed -i "s~<NO_PROXY>~${NO_PROXY_HX_DEFAULT}~g" k8s-deployment.yaml
- sed -i "s~<CPU_LIMIT>~${CPU_LIMIT_STAGING}~" k8s-deployment.yaml
- sed -i "s~<CPU_REQUESTED>~${CPU_REQUESTED_STAGING}~" k8s-deployment.yaml
- sed -i "s~<SERVER_IMAGE_TAG>~${SERVER_IMAGE_TAG}~" k8s-deployment.yaml
- sed -i "s~<TASKS_DAEMON_IMAGE_TAG>~${TASKS_DAEMON_IMAGE_TAG}~" k8s-deployment.yaml
- sed -i "s~<RUN_CONFIG_SECRET_NAME>~${RUN_CONFIG_SECRET_NAME_STAGING}~" k8s-deployment.yaml
- sed -i "s~<GUNICORN_CONFIG_SECRET_NAME>~${GUNICORN_CONFIG_SECRET_NAME_STAGING}~" k8s-deployment.yaml
- cat k8s-deployment.yaml
# - kubectl apply -n ${CHEMBL_NS_STAGING} -f k8s-deployment.yaml
# - kubectl get pods -n ${CHEMBL_NS_STAGING}
# - cat ${INGRESS_STAGING_FILE_PATH}
......
......@@ -23,14 +23,27 @@ spec:
requests:
cpu: <CPU_REQUESTED>
volumeMounts:
- name: run-config
mountPath: '/etc/run_config/'
readOnly: true
- name: gunicorn-config
mountPath: '/etc/gunicorn_config/'
readOnly: true
- name: run-config
mountPath: '/etc/run_config/'
readOnly: true
- name: gunicorn-config
mountPath: '/etc/gunicorn_config/'
readOnly: true
env:
- name: HTTP_PROXY
value: "<HTTP_PROXY>"
- name: http_proxy
value: "<HTTP_PROXY>"
- name: HTTPS_PROXY
value: "<HTTPS_PROXY>"
- name: https_proxy
value: "<HTTPS_PROXY>"
- name: NO_PROXY
value: "<NO_PROXY>"
- name: no_proxy
value: "<NO_PROXY>"
- name: es-subset-generator-tasks-daemon
image: <STATUS_DAEMON_IMAGE_TAG>
image: <TASKS_DAEMON_IMAGE_TAG>
imagePullPolicy: Always
resources:
limits:
......@@ -38,12 +51,25 @@ spec:
requests:
cpu: <CPU_REQUESTED>
volumeMounts:
- name: run-config
mountPath: '/etc/run_config/'
readOnly: true
- name: gunicorn-config
mountPath: '/etc/gunicorn_config/'
readOnly: true
- name: run-config
mountPath: '/etc/run_config/'
readOnly: true
- name: gunicorn-config
mountPath: '/etc/gunicorn_config/'
readOnly: true
env:
- name: HTTP_PROXY
value: "<HTTP_PROXY>"
- name: http_proxy
value: "<HTTP_PROXY>"
- name: HTTPS_PROXY
value: "<HTTPS_PROXY>"
- name: https_proxy
value: "<HTTPS_PROXY>"
- name: NO_PROXY
value: "<NO_PROXY>"
- name: no_proxy
value: "<NO_PROXY>"
volumes:
- name: run-config
secret:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment