GalleyBytes / terraform-operator

A Kubernetes CRD to handle terraform operations
http://tf.galleybytes.com
Apache License 2.0
364 stars 47 forks source link

tf resource exceeding etcd limit due to ever increasing status #102

Closed isaaguilar closed 2 years ago

isaaguilar commented 2 years ago

I'm facing another issue making the workaround to fail: the yaml associated to terraform resource is to big, see message below

 2022-06-20T08:21:16.456Z    DEBUG    terraform_controller    failed to update tf status: rpc error: code = ResourceExhausted desc = trying to send message larger than max  (2097279 vs. 2097152)    {"Terraform": "10-harbor-registry/tf-harbor-intranet", "id": "8564c063-e25b-410d-9b55-ca71b50627cf"}                                          

As all generation are keep forever, the yaml keep increasing:

status:
  exported: "false"
  lastCompletedGeneration: 0
  phase: running
  podNamePrefix: tf-harbor-internet-46ja6izd
  stages:
  - generation: 1
    interruptible: false
    podType: setup
    reason: TF_RESOURCE_CREATED
    startTime: "2022-05-20T11:09:48Z"
    state: failed
    stopTime: "2022-05-20T11:09:51Z"
  ...
  ...
  ... 
  - generation: 9897
    interruptible: true
    podType: post
    reason: ""

Originally posted by @o-orand in https://github.com/isaaguilar/terraform-operator/issues/97#issuecomment-1160151407

o-orand commented 2 years ago

Great, thanks !