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

fix: malformed terraform state #1566

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open

fix: malformed terraform state #1566

wants to merge 26 commits into from

Conversation

Despire
Copy link
Contributor

@Despire Despire commented Nov 5, 2024

closes #1483
closes #1275

This PR introduces changes as to how errors in building infrastructure is handled in terraformer.

There are essentially 3 cases that needs to be taken care of.

  1. K8s clusters fails to build due to invalid nodepool definitions.
  2. K8s cluster succeeded, but at least 1 loadbalancer cluster have not succeeded.
  3. Both k8s and lb clusters succeeded but Dns failed for at least 1 loadbalancer

This PR fixes these cases as follows:

If there is an error in building the nodepools of the desired state after an unsucessful terraform apply the state file is dumped and any partially build state that was not part of the state file before the terraform apply is destroyed, essentially performing a infrastructure rollback to the last working state. After an error occurs during terraform apply the current state is left as is and is not updated, thus avoiding conflicts as described in issue #1483

Despire and others added 8 commits November 6, 2024 12:39
# Conflicts:
#	manifests/claudie/kustomization.yaml
#	manifests/testing-framework/kustomization.yaml
#	manifests/testing-framework/testing-framework.yaml
#	services/ansibler/server/domain/usecases/update_no_proxy_envs.go
#	services/ansibler/server/utils/loadbalancers.go
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

Successfully merging this pull request may close these issues.

Bug: Can't Update manifest after wrong nodepool definition Bug: InputManifest deletion hangs
2 participants