Skip to content

The use of x-kubernetes-preserve-unknown-fields stops Terrafrom from updating manifests in-place causing cluster wipes #2676

Closed
@EraYaN

Description

@EraYaN

Please, answer some short questions which should help us to understand your problem / question better?

  • Which image of the operator are you using? registry.opensource.zalan.do/acid/postgres-operator:v1.11.0
  • Where do you run it - cloud or metal? Kubernetes or OpenShift? Azure AKS
  • Are you running Postgres Operator in production? yes
  • Type of issue? Enhancement request

So this is based on hashicorp/terraform-provider-kubernetes#1841 (comment)

Anyway any change to the manifests in Terraform will replace the postgresql crd causing the data to be wiped and the server to be empty.

This seems to be used in a couple of places like (6 total in that file):

x-kubernetes-preserve-unknown-fields: true

and
x-kubernetes-preserve-unknown-fields: true

Both of these should have known specs and it would be very useful if they could be fully specced, which would resolve any problems with programs like terraform or pulumi that require fully specified schema's to do their job and use in-place updates.

An alternative would be to make the operator tolerant to replacement of CRD resources of course, but that feels a bit less clean.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions