Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resources from helm_release provider not reconciled #1534

Open
manicole opened this issue Feb 27, 2025 · 0 comments
Open

Resources from helm_release provider not reconciled #1534

manicole opened this issue Feb 27, 2025 · 0 comments

Comments

@manicole
Copy link

manicole commented Feb 27, 2025

Hi all, thanks in advance for helping :)

I deploy Keycloak with the tofu-controller, using the helm provider hashicorp/helm v2.14 and bitnamicharts/keycloak v24.4.6 (https://github.com/bitnami/charts/tree/keycloak/24.4.6/bitnami/keycloak).

Initial deployment is fine.
Then I manually delete Keycloak Ingress, reconcile the corresponding Terraform kind, but Ingress never comes back.
Keycloak is not the only solution experiencing the problem ; at the moment every other solution deployed in my cluster behaves the same way.

My Terraform status is No drift and my tf-runner Pod logs are consistent with the status:

│ 2025-02-27T08:26:20.580913740Z {"level":"info","ts":"2025-02-27T08:26:20.580Z","logger":"runner.terraform","msg":"preparing for Upload and Extraction","instance-id":"45f155c3-4878-4420-aef9-42c94d7d48f7"}                                                                                                             │
│ 2025-02-27T08:26:20.600618945Z {"level":"info","ts":"2025-02-27T08:26:20.600Z","logger":"runner.terraform","msg":"write backend config","instance-id":"45f155c3-4878-4420-aef9-42c94d7d48f7","path":"/tmp/dca-keycloak-0-keycloak-0/keycloak/terraform","config":"backend_override.tf"}                                  │
│ 2025-02-27T08:26:20.600679936Z {"level":"info","ts":"2025-02-27T08:26:20.600Z","logger":"runner.terraform","msg":"write config to file","instance-id":"45f155c3-4878-4420-aef9-42c94d7d48f7","filePath":"/tmp/dca-keycloak-0-keycloak-0/keycloak/terraform/backend_override.tf"}                                         │
│ 2025-02-27T08:26:20.601288529Z {"level":"info","ts":"2025-02-27T08:26:20.601Z","logger":"runner.terraform","msg":"looking for path","instance-id":"45f155c3-4878-4420-aef9-42c94d7d48f7","file":"terraform"}                                                                                                             │
│ 2025-02-27T08:26:20.602306816Z {"level":"info","ts":"2025-02-27T08:26:20.602Z","logger":"runner.terraform","msg":"creating new terraform","instance-id":"d33bd0b0-e544-4ff1-bbb5-7e0553e6641f","workingDir":"/tmp/dca-keycloak-0-keycloak-0/keycloak/terraform","execPath":"/usr/local/bin/terraform"}                   │
│ 2025-02-27T08:26:20.603572834Z {"level":"info","ts":"2025-02-27T08:26:20.603Z","logger":"runner.terraform","msg":"setting envvars","instance-id":"d33bd0b0-e544-4ff1-bbb5-7e0553e6641f"}                                                                                                                                 │
│ 2025-02-27T08:26:20.603600836Z {"level":"info","ts":"2025-02-27T08:26:20.603Z","logger":"runner.terraform","msg":"getting envvars from os environments","instance-id":"d33bd0b0-e544-4ff1-bbb5-7e0553e6641f"}                                                                                                            │
│ 2025-02-27T08:26:20.604109018Z {"level":"info","ts":"2025-02-27T08:26:20.604Z","logger":"runner.terraform","msg":"setting up the input variables","instance-id":"d33bd0b0-e544-4ff1-bbb5-7e0553e6641f"}                                                                                                                  │
│ 2025-02-27T08:26:20.604141006Z {"level":"info","ts":"2025-02-27T08:26:20.604Z","logger":"runner.terraform","msg":"mapping the Spec.Values","instance-id":"d33bd0b0-e544-4ff1-bbb5-7e0553e6641f"}                                                                                                                         │
│ 2025-02-27T08:26:20.604159003Z {"level":"info","ts":"2025-02-27T08:26:20.604Z","logger":"runner.terraform","msg":"mapping the Spec.Vars","instance-id":"d33bd0b0-e544-4ff1-bbb5-7e0553e6641f"}                                                                                                                           │
│ 2025-02-27T08:26:20.604182839Z {"level":"info","ts":"2025-02-27T08:26:20.604Z","logger":"runner.terraform","msg":"mapping the Spec.VarsFrom","instance-id":"d33bd0b0-e544-4ff1-bbb5-7e0553e6641f"}                                                                                                                       │
│ 2025-02-27T08:26:20.616956020Z {"level":"info","ts":"2025-02-27T08:26:20.616Z","logger":"runner.terraform","msg":"generating the template founds"}                                                                                                                                                                       │
│ 2025-02-27T08:26:20.616985575Z {"level":"info","ts":"2025-02-27T08:26:20.616Z","logger":"runner.terraform","msg":"main.tf.tpl not found, skipping"}                                                                                                                                                                      │
│ 2025-02-27T08:26:20.617623131Z {"level":"info","ts":"2025-02-27T08:26:20.617Z","logger":"runner.terraform","msg":"initializing","instance-id":"d33bd0b0-e544-4ff1-bbb5-7e0553e6641f"}                                                                                                                                    │
│ 2025-02-27T08:26:20.617657632Z {"level":"info","ts":"2025-02-27T08:26:20.617Z","logger":"runner.terraform","msg":"mapping the Spec.BackendConfigsFrom","instance-id":"d33bd0b0-e544-4ff1-bbb5-7e0553e6641f"}                                                                                                             │
│ 2025-02-27T08:26:24.770496475Z {"level":"info","ts":"2025-02-27T08:26:24.770Z","logger":"runner.terraform","msg":"workspace select"}                                                                                                                                                                                     │
│ 2025-02-27T08:26:24.771064176Z {"level":"info","ts":"2025-02-27T08:26:24.771Z","logger":"runner.terraform","msg":"creating a plan","instance-id":"d33bd0b0-e544-4ff1-bbb5-7e0553e6641f"}                                                                                                                                 │
│ 2025-02-27T08:26:29.508831430Z {"level":"info","ts":"2025-02-27T08:26:29.508Z","logger":"runner.terraform","msg":"cleanup TmpDir","instance-id":"d33bd0b0-e544-4ff1-bbb5-7e0553e6641f","tmpDir":"/tmp/dca-keycloak-0-keycloak-0"}

I have no mention of my Keycloak deployment in tf-controller logs.

My Terraform args are as follow:

  refreshBeforeApply: true
  alwaysCleanupRunnerPod: false
  serviceAccountName: <serviceAccountName>
  destroyResourcesOnDeletion: true
  approvePlan: auto

(NB: disableDriftDetection: false by default + I tried refreshBeforeApply: false, without success)

In my HelmRelease, I set reset_values = true to force reconciliation ; I thought my HR would force reevaluate the args, especially the ingress-related ones

  set {
    name  = "ingress.<ingress-related-args>"
    value = "<value>"
  }

but it does not seem to work.

I also tried to delete

  • Keycloak Statefulset and reconcile manuelly, hoping it will trigger the drift detection
  • all flux-system Pods, thus forcing reconciliation
    without success.

Any idea of what's happening and how to avoid this behavior ?
Thanks a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant