Add patch for certificate
This commit is contained in:
parent
3d5ed5c516
commit
81db7ff00d
2 changed files with 20 additions and 0 deletions
|
@ -49,6 +49,7 @@ build_review_deployment:
|
||||||
paths:
|
paths:
|
||||||
- k8s/deployment.json
|
- k8s/deployment.json
|
||||||
- k8s/ingress-patch.json
|
- k8s/ingress-patch.json
|
||||||
|
- k8s/certificate-patch.json
|
||||||
|
|
||||||
build_2019_dev_image:
|
build_2019_dev_image:
|
||||||
image: docker:git
|
image: docker:git
|
||||||
|
@ -94,6 +95,7 @@ k8s-2019_dev_review-deploy:
|
||||||
- kubectl config use-context cluster
|
- kubectl config use-context cluster
|
||||||
- kubectl --token "${GL_KUBE_TOKEN}" apply -f k8s/deployment.json
|
- kubectl --token "${GL_KUBE_TOKEN}" apply -f k8s/deployment.json
|
||||||
- kubectl --token "${GL_KUBE_TOKEN}" describe ingress | grep "${CI_COMMIT_REF_SLUG}" || kubectl --token "${GL_KUBE_TOKEN}" patch ingress symposion-app-ingress -p "$(cat k8s/ingress-patch.json)" --type json
|
- kubectl --token "${GL_KUBE_TOKEN}" describe ingress | grep "${CI_COMMIT_REF_SLUG}" || kubectl --token "${GL_KUBE_TOKEN}" patch ingress symposion-app-ingress -p "$(cat k8s/ingress-patch.json)" --type json
|
||||||
|
- kubectl --token "${GL_KUBE_TOKEN}" describe certificate | grep "${CI_COMMIT_REF_SLUG}" || kubectl --token "${GL_KUBE_TOKEN}" patch certificate dev-lca2019-org -p "$(cat k8s/certificate-patch.json)" --type json
|
||||||
only:
|
only:
|
||||||
- /^dev\/.*$/
|
- /^dev\/.*$/
|
||||||
environment:
|
environment:
|
||||||
|
|
|
@ -160,4 +160,22 @@ function (slug) {
|
||||||
"value": domain
|
"value": domain
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"certificate-patch.json": [
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/spec/acme/config/-",
|
||||||
|
"value": {
|
||||||
|
"domains": [ domain ],
|
||||||
|
"http01": {
|
||||||
|
"ingress": "",
|
||||||
|
"ingressClass": "nginx"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"op": "add",
|
||||||
|
"path": "/spec/dnsNames/-",
|
||||||
|
"value": domain
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue