-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add computed to node_config.kubelet_config & node_pool_auto_config.node_kubelet_config #11971
Add computed to node_config.kubelet_config & node_pool_auto_config.node_kubelet_config #11971
Conversation
Tests analyticsTotal tests: 212 Click here to see the affected service packages
🟢 All tests passed! View the build log |
VCR will not detect the bug, as the cassettes are old and either version of the code passes on old messages. I've simulated this locally by turning off the insecure port, as my invocations have not been lucky enough to hit the rollout of the changed serialisation. I also kicked off a TC run which is currently incomplete, but shows success so far. |
…les/pull/11971 This should fix the reconciliation error when a subfield under kubeletConfig is set outside of KCC/TF.
…les/pull/11971 This should fix the reconciliation error when a subfield under kubeletConfig is set outside of KCC/TF.
Fixes hashicorp/terraform-provider-google#19792
Support for the
node_config.kubelet_config.insecure_kubelet_readonly_port_enabled
field was added in #11573 and was marked Computed.node_config
itself is also Computed, howevernode_config.kubelet_config
is not.This means that:
node_config
is not affectednode_config
but notnode_config.kubelet_config
is affectednode_config.kubelet_config
is not affected.This caused numerous failing tests for us, however, not all the tests we would have expected to fail based on those criteria.
I haven't determined another trigger condition so I suspect it's a partial rollout of a serialisation change.This was confirmed as a rollout in hashicorp/terraform-provider-google#19792 (comment).kubelet_config
appears in multiple other locations,node_pool_defaults.node_config_defaults.insecure_kubelet_readonly_port_enabled
andnode_pool_auto_config.node_kubelet_config.insecure_kubelet_readonly_port_enabled
node_pool_defaults.node_config_defaults
has the same problem, as it is not Computed whilenode_pool_defaults
andinsecure_kubelet_readonly_port_enabled
are. However, sending justnode_pool_defaults {}
already triggers the same issue with another field (logging_variant
). Ideally we'd makenode_config_defaults
Required, but I'm not sure about the impact on autopilot. I'll file a bug.node_pool_auto_config.node_kubelet_config.insecure_kubelet_readonly_port_enabled
but I've setnode_pool_auto_config.node_kubelet_config
toComputed
anyways since it could exhibit the same issue and I would not want to have to deal with the same problem again. I may cut the change if I can confirm it will never get a default (but I'm not guaranteed / unlikely to find that answer before shipping the change)The update part of the original issue (
Error: googleapi: Error 400: At least one of ['node_version', <snip>, 'max_run_duration'] must be specified.
) is because we usedForceSendFields
with anil
KubeletConfig
value, which does nothing. We had to setKubeletConfig
to&container.KubeletConfig{}
in that block.NullFields
would be correct for a patch in theory, but this is a PUT / customish update and the JSON null still triggers the API error.After this change we can no longer trigger that specific update message. I'll still clean up that callsite / any similarly structured ones to ensure we send an empty struct properly if we do hit them, but in a separate change.
Release Note Template for Downstream PRs (will be copied)