Open dionborsboom opened 2 months ago
Currently remove an Object field is not fully supported by KCC:
For object type fields, currently in Config Connector there is no easy way to set a whole object type field as "NULL". You can try to set the subfields of the object type as empty or default following the guidance above and verify if it works.
To bypass the unsupported feature, we suggest that Cx abandon the KCC resource, leverage other tooling to disable/remove the Object type field (console, gcloud, etc.), and then acquire the resource by KCC.
Detailed steps:
-Update the YAML configuration of the Config Connector resource and set the cnrm.cloud.google.com/deletion-policy annotation to abandon. -Apply the updated YAML configuration to update the Config Connector resource's deletion policy and abandon the Config Connector resource. -Disable the field using other tooling(console, gcloud, etc). -Update the field that need to be disabled in the YAML configuration. -Apply the updated YAML configuration to acquire the abandoned resource.
Ref: https://cloud.google.com/config-connector/docs/troubleshooting#abandon_and_acquire_the_resource
Checklist
Bug Description
Disabling the deadLetterPolicy in a PubsubSubscription does not work. Removing the deadLetterPolicy parameter it from the spec makes it externally-managed instead of disabling it. The documentation describes
deadLetterPolicy
asIf dead_letter_policy is not set, dead lettering is disabled.
https://cloud.google.com/config-connector/docs/reference/resource-docs/pubsub/pubsubsubscription But this is only true if its never set in the first place. Disabling after having it enabled does not work.I have tried this guide to see if one of the suggestions would disable it: https://cloud.google.com/config-connector/docs/troubleshooting#unable_to_remove_fields_from_resource_spec
I have tried adding an empty object like
deadLetterPolicy: {}
anddeadLetterPolicy: null
, but it does not work. The system will allow it, but ignores it and the status is alwaysUpToDate
.I have also tried giving all parameter values in the deadLetterPolicy object "null" values as suggested in the troubleshooting doc, but the resource will return an error in the condition:
Additional Diagnostic Information
none
Kubernetes Cluster Version
v1.28.11-gke.1019001
Config Connector Version
1.118.2
Config Connector Mode
namespaced mode (default)
Log Output
No response
Steps to reproduce the issue
YAML snippets