k3d cluster create tf-controller-demo
kubectl apply -f flux/flux.yaml
kubectl wait --for condition=established --timeout=60s crd/helmreleases.helm.toolkit.fluxcd.io
kubectl wait --for condition=established --timeout=60s crd/helmrepositories.source.toolkit.fluxcd.io
kubectl apply -f helm-releases/tf-controller.yaml
Verify the startup with:
kubectl get pods -A | grep tf-controller
kubectl create secret generic civo-credentials -n flux-system \
--from-literal=api_key=your-api-key
sh create-secret.sh
Update manifests/civo-instance.yaml
to point to your fork instead of https://github.com/gimlet-io/tf-controller-demo
kubectl apply -f manifests/civo-instance.yaml
Then watch the terraform object:
kubectl get terraform -n flux-system -w
Also, you can check the logs of terraform apply on the tf-runner:
kubectl logs -n flux-system -f civo-instance-tf-runner
- Add a new tag in
terraform/civo-instance-demo-resources/main.tf
- Push changes to git.
Then watch the terraform object:
kubectl get terraform -n flux-system -w
Also, you can check the logs of terraform apply on the tf-runner:
kubectl logs -n flux-system -f civo-instance-tf-runner
Finally, delete the cluster k3d cluster delete tf-controller-demo