@@ -200,6 +200,8 @@ The deployment script is searched as follows:
2. if not found: look for a default `k8s-deploy.sh` in the `$K8S_SCRIPTS_DIR` directory in your project,
3. if not found: the GitLab CI template assumes you're using the template-based deployment policy.
:warning: `k8s-deploy-$env.sh` or `k8s-deploy.sh` needs to be executable, you can add flag execution with : `git update-index --chmod=+x k8s-deploy.sh`
Your script(s) may use [dynamic variables](#dynamic-variables).
#### 2: template-based deployment
...
...
@@ -214,7 +216,9 @@ The template processes the following steps:
1. look for a specific `deployment-$env.yml` in your project (e.g. `deployment-staging.yml` for staging environment),
2. fallbacks to default `deployment.yml`.
3. _optionally_ executes the `k8s-post-apply.sh` script in your project to perform specific environment post-initialization stuff,
4. _optionally_ executes the `k8s-readiness-check` to wait & check for the application to be ready (if not found, the template assumes the application was successfully started).
4. _optionally_ executes the `k8s-readiness-check.sh` to wait & check for the application to be ready (if not found, the template assumes the application was successfully started).
:warning: `k8s-pre-apply.sh`,`k8s-post-apply.sh` or `k8s-readiness-check.sh` needs to be executable, you can add flag execution with : `git update-index --chmod=+x k8s-pre-apply.sh`
All scripts and Kubernetes deployment files may use [dynamic variables](#dynamic-variables).
...
...
@@ -235,6 +239,8 @@ The a deployment script is searched as follows:
2. if not found: look for a default `k8s-cleanup.sh` in the `$K8S_SCRIPTS_DIR` directory in your project,
3. if not found: the GitLab CI template assumes you're using the template-based cleanup policy.
:warning: `k8s-cleanup-$env.sh` or `k8s-cleanup.sh` needs to be executable, you can add flag execution with : `git update-index --chmod=+x k8s-cleanup.sh`
Your script(s) may use [dynamic variables](#dynamic-variables).
> TIP: a nice way to implement environment cleanup is to declare the label `app=${appname}` on every Kubernetes
...
...
@@ -253,6 +259,8 @@ The template processes the following steps:
2. fallbacks to default `deployment.yml`.
3. _optionally_ executes the `k8s-post-cleanup.sh` script in your project to perform specific environment post-cleanup (for e.g. delete bound services).
:warning: `k8s-pre-cleanup.sh` or `k8s-post-cleanup.sh` needs to be executable, you can add flag execution with : `git update-index --chmod=+x k8s-pre-cleanup.sh`
All scripts and Kubernetes deployment files may use [dynamic variables](#dynamic-variables).