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 KubernetesJob
that would perform the entire workflow by creating a single job. - Pods that fail do not try again (the
Job
pod 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:
prerunScript
is equivilent topreInitScript
and the script runs as an init-container right before theterraform init
containerpostrunScript
is equivilent topostInitScript
and runs a new pod afterterraform apply
completesapplyOnApply
no longer function as terraform is always executedapplyOnUpdate
no longer functions as terraform is always executedapplyOnDelete
no 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
Pod
s have changed. These are:TFOPS_MAIN_MODULE
->TFO_MAIN_MODULE
NAMESPACE
->TFO_NAMESPACE
STACK_REPO
->TFO_MAIN_MODULE_REPO
STACK_REPO_HASH
->TFO_MAIN_MODULE_REPO_REF
STACK_REPO_SUBDIR
->TFO_MAIN_MODULE_REPO_SUBDIR
TFOPS_CONFIGMAP_PATH
->TFO_DOWNLOADS
INSTANCE_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:
preInitScript
postInitScript
prePlanScript
postPlanScript
preApplyScript
postApplyScript
preInitDeleteScript
postInitDeleteScript
prePlanDeleteScript
postPlanDeleteScript
preApplyDeleteScript
postApplyDeleteScript