GoogleCloudPlatform / k8s-config-connector

GCP Config Connector, a Kubernetes add-on for managing GCP resources
https://cloud.google.com/config-connector/docs/overview
Apache License 2.0
864 stars 202 forks source link

Scenario test for powertool to clear externally-managed fields should be a blocker for direct-based CRD migration #1997

Open maqiuyujoyce opened 1 month ago

maqiuyujoyce commented 1 month ago

Checklist

Describe the feature or resource

Similar to https://github.com/GoogleCloudPlatform/k8s-config-connector/pull/1978, any CRD that supports state-into-spec: merge should have a scenario test to change state-into-spec to absent and clear externally-managed fields before it is migrated to a direct controller.

It is better to be done before the migration because (1) we need to generate test data for the CRD when it is still TF-based or DCL-based, and (2) the powertool should be ready for the kind whenever it is switched to be direct-based, so that users can have an option to clean up the outdated externally-managed fields.

We should add a unit test in presubmit to verify it.

Additional information

No response

Importance

No response

maqiuyujoyce commented 1 month ago

@yuwenma fyi I think there is one extra step needed for a direct controller migration.