Changes in v0.4.0-alphav1 since v0.3.8
Changes:
- The controller now deploys pods for each step of a terraform workflow which includes pods for
terraform init,terraform plan, andtrraform apply. Before the controller would create a KubernetesJobthat would perform the entire workflow by creating a single job. - Pods that fail do not try again (the
Jobpod before would try again multiple times). To retry, the user deleted the failed pod and a new pod with the same configuration as the old pod launched by the controller. - Pods now use a PersistentVolumeClaims that is handed from pod to pod to keep logs and terraform run data. PVCs must be allowed to be created by the controller and the Kubernetes cluster.
Breaking changes:
prerunScriptis equivilent topreInitScriptand the script runs as an init-container right before theterraform initcontainerpostrunScriptis equivilent topostInitScriptand runs a new pod afterterraform applycompletesapplyOnApplyno longer function as terraform is always executedapplyOnUpdateno longer functions as terraform is always executedapplyOnDeleteno longer function as terraform is always executed- The tfstate is no longer added to a ConfigMap after terraform is completed. (This will be readded soon)
- Many enviroment variables within the runner
Pods have changed. These are:TFOPS_MAIN_MODULE->TFO_MAIN_MODULENAMESPACE->TFO_NAMESPACESTACK_REPO->TFO_MAIN_MODULE_REPOSTACK_REPO_HASH->TFO_MAIN_MODULE_REPO_REFSTACK_REPO_SUBDIR->TFO_MAIN_MODULE_REPO_SUBDIRTFOPS_CONFIGMAP_PATH->TFO_DOWNLOADSINSTANCE_NAME->TFO_RUNNER
Additions
-
new scripts that execture before and after the terraform commands have been introduced. The scripts can be configured with inline yaml scripts for any of the following:
preInitScriptpostInitScriptprePlanScriptpostPlanScriptpreApplyScriptpostApplyScriptpreInitDeleteScriptpostInitDeleteScriptprePlanDeleteScriptpostPlanDeleteScriptpreApplyDeleteScriptpostApplyDeleteScript