redhat-developer / argocd-terraform-controller

Argo CD Terraform Controller
26 stars 7 forks source link

Controller spawns worker pods #17

Closed josephsawaya closed 2 years ago

josephsawaya commented 2 years ago

This commit updates the Terraform CR definition so the spec only contain the revision of the ArgoCD Application and whether or not the workload has been completed for this CR.

This commit also updates the terraform generate script to generate a configmap alongside the Terraform CR. The config map is created from the directory the ArgoCD application is targetting.

This commit makes it so the controller now spawns worker pods on reconciliation.

The worker pods run the argocd terraform worker image which completes the terraform workload. The config map generated by the terraform-generate plugin is also mounted to the worker pods.

This commit also mounts a secret as the env in the worker pods to allow users to pass their credentials through use of the secrets.

The worker pods' service account's roles are limited to namespace only to allow for soft multi-tenancy.

Signed-off-by: Joseph Sawaya jsawaya@redhat.com