hashicorp / terraform-k8s

Terraform Cloud Operator for Kubernetes
https://learn.hashicorp.com/tutorials/terraform/kubernetes-operator?in=terraform/kubernetes
Mozilla Public License 2.0
454 stars 71 forks source link

Operator reports Workspace as "not found" even though it exists #146

Closed EmmanuelOgiji closed 2 years ago

EmmanuelOgiji commented 2 years ago

Community Note

terraform-k8s & Kubernetes Version

terraform-k8s:1.1.0 and Kubernetes version:1.22

Affected Resource(s)

syncWorkspace operator

Debug Output

Expected Behavior

The operator should be able to create the workspace, find it and send runs to it as it does normally.

Actual Behavior

SyncOperator pod reports a workspace is "not found" even after creating the said workspace. Thus, the workflow becomes stuck even if you delete the operator pod or delete the workspace from the UI for it to retry. This occurred after a workspace of the same name was deleted. In the absence of a solution, it'll be good to know how to do a hard refresh of the operator as it seems like this problem comes from the operator pods being "stateful" even though said state is wrong.

Steps to Reproduce

EmmanuelOgiji commented 2 years ago

Issue was that the name of the one of the run Triggers in the manifest did not exist