Open manicole opened 1 month ago
I found a new element.
Commenting the runnerPodTemplate
spec from my kind Terraform makes k3s-tf-runner
appear (once FluxCD reconciles my Kustomization).
Uncommenting it afterwards does not seem to be a problem, but who knows how long for.
Anyone ?
I still have the issue: I have to apply my kind Terraform without any runnerPodTemplate
to launch the tf-runner
Pod (otherwise, it never appears). Once launched, I can add a runnerPodTemplate
to my my kind Terraform and reapply to update it.
Hello @manicole , Any specific reason you need to define the tmp volume in the runner pod template?
Hi @akselleirv, thanks for reacting.
Actually I am still trying to solve a problem, and thought it was the way. I install k3s with k3sup (i.e. using ssh) and ouput the kubeconfig from the Terraform plan:
# outputs.tf
data "local_file" "kubeconfig_file" {
filename = "${var.instance_kubeconfig_folder}/${var.instance_kubeconfig_file}"
depends_on = [null_resource.k3s]
}
output "kubeconfig_file" {
description = "kubeconfig to access k3s cluster"
value = nonsensitive(data.local_file.kubeconfig_file.content)
}
I get the following error, and thought mounting tmp would be enough but it is not:
Error: Read local file data source error
with data.local_file.kubeconfig_file,
on outputs.tf line 1, in data "local_file" "kubeconfig_file":
1: data "local_file" "kubeconfig_file" {
The file at given path cannot be read.
Original Error: open /tmp/.kube/config: no such file or directory
This might be another issue to solve for me, but I believe it has no consequences on the problem here. Thanks
Hi all, I'm trying to deploy a kind Terraform via a kind Kustomization, but often no tf-runner is created and my Terraform stays stuck in "Reconciliation in progress" state.
I'm trying to deploy this Kustomization:
In
gitrepo/k3s/manifests
, there is only my kind Terraform:What happens:
k3s
, although I would expect ak3s-tf-runner
to be deployed...Additionnal info:
I deploy plenty of Kustomization files, and do not have any problem with the others.
Sometimes by chance (non reproducible pattern) a
k3s-tf-runner
is created and everything works fine till the end ; a few hours later, in spite of the argalwaysCleanupRunnerPod: false
, thek3s-tf-runner
disappears ... and I can't create it back.I can't find any clue of what's happening in tf-controller logs nor in namespace events.
All my kind Terraform does (
gitrepo/k3s/terraform/main.tf
) is a local exec:Versions:
$ helm ls -n flux-system NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION tf-controller flux-system 1 2024-06-19 13:13:30.0861225 +0000 UTC deployed tf-controller-0.16.0-alpha.3 v0.16.0-alpha.3