Direct: Implement direct controller and test fixtures for ContainerNodePool - #13573
neumann-coder-bot wants to merge 4 commits into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
🤖 AI Factory started investigating CI check failures for this pull request. Note: We recommend waiting for the 'ready-for-human' label before leaving review comments. Comments added while the system is actively working may be associated with outdated commits once a new commit is pushed, causing them to be ignored. |
Investigating unit-tests-4-of-4 failureRun: 36839242385 (https://github.com/GoogleCloudPlatform/k8s-config-connector/actions/runs/36839242385/job/110294070443) Investigating tests-e2e-fixtures-container-1-of-2 failureRun: 36839242385 (https://github.com/GoogleCloudPlatform/k8s-config-connector/actions/runs/36839242385/job/110295278024) (This report was generated by overseer) |
|
🤖 AI Factory started investigating CI check failures for this pull request. Note: We recommend waiting for the 'ready-for-human' label before leaving review comments. Comments added while the system is actively working may be associated with outdated commits once a new commit is pushed, causing them to be ignored. |
ada32a3 to
16537ef
Compare
Investigating tests-e2e-fixtures-container-1-of-2 failureRun: 36857989545 (https://github.com/GoogleCloudPlatform/k8s-config-connector/actions/runs/36857989545/job/110356078346) (This report was generated by overseer) |
maqiuyujoyce
left a comment
There was a problem hiding this comment.
Please record the real GCP logs again for the ContainerNodePool test cases after you changed the DefaultController back to ReconcilerTypeTerraform. You should see the side-by-side _http.log and _http_old_controller.log files for all the test cases. These are our main SoT to validate whether the direct controller works as expected or not.
| {Group: "contactcenterinsights.cnrm.cloud.google.com", Kind: "CCInsightsView"}: {DefaultController: k8s.ReconcilerTypeDirect, SupportedControllers: []k8s.ReconcilerType{k8s.ReconcilerTypeDirect}}, | ||
| {Group: "container.cnrm.cloud.google.com", Kind: "ContainerCluster"}: {DefaultController: k8s.ReconcilerTypeTerraform, SupportedControllers: []k8s.ReconcilerType{k8s.ReconcilerTypeTerraform}}, | ||
| {Group: "container.cnrm.cloud.google.com", Kind: "ContainerNodePool"}: {DefaultController: k8s.ReconcilerTypeTerraform, SupportedControllers: []k8s.ReconcilerType{k8s.ReconcilerTypeTerraform}}, | ||
| {Group: "container.cnrm.cloud.google.com", Kind: "ContainerNodePool"}: {DefaultController: k8s.ReconcilerTypeDirect, SupportedControllers: []k8s.ReconcilerType{k8s.ReconcilerTypeDirect, k8s.ReconcilerTypeTerraform}}, |
There was a problem hiding this comment.
Please keep the DefaultController type to be ReconcilerTypeTerraform
|
🤖 AI Factory started addressing review feedback for this pull request. |
…est fixtures for ContainerNodePool
|
I have updated {Group: "container.cnrm.cloud.google.com", Kind: "ContainerNodePool"}: {DefaultController: k8s.ReconcilerTypeTerraform, SupportedControllers: []k8s.ReconcilerType{k8s.ReconcilerTypeDirect, k8s.ReconcilerTypeTerraform}},With
All unit tests and container fixture shards pass cleanly. (This comment was generated by overseer) |
|
Please record the real GCP logs again for the ContainerNodePool test cases after you made the following changes. You should see updated _http.log and diff files for all the container node pool related test cases. 1. Ratcheting & Re-Reconciliation Invariant
2. Reference Resolution Timing & Normalization
3. Spec Diffing & Fine-Grained Update Detection
4. Missing Update Handlers (Terraform Parity)
|
|
🤖 AI Factory started addressing review feedback for this pull request. |
Direct: Implement direct controller and test fixtures for ContainerNodePool
Summary
This PR migrates
ContainerNodePoolfrom the legacy Terraform controller to the Config Connector Direct Controller (container.cnrm.cloud.google.com/v1beta1):Direct Controller Implementation (
pkg/controller/direct/container/containernodepool_controller.go):Find,Create,Update,Delete,Export) usingcloud.google.com/go/container/apiv1.projects/{project}/locations/{location}/clusters/{cluster}/nodePools/{nodePool}(supporting both zonal and regional clusters).common.CompareBrownfieldSpecto seamlessly merge server-returned defaults into desired state, ensuring zero-write steady-state re-reconciliation.ClusterManager.UpdateCluster, management settings viaClusterManager.SetNodePoolManagement, and node pool spec updates (taints, tags, labels, linux config, kubelet config, containerd config, resource manager tags, workload metadata config, logging, etc.) viaClusterManager.UpdateNodePool.externalRef,instanceGroupUrls,managedInstanceGroupUrls,observedState) to maintain 100% fidelity with existing KRM status expectations.Mapper Alignment (
pkg/controller/direct/container/mappers.go):NodePoolNodeConfig,NodeNetworkConfig,CertificateAuthorityDomainConfig,NodeConfig_WorkloadMetadataConfig,NodeConfig_LocalNvmeSsdBlockConfig,NodeConfig_SoleTenantConfig,NodeAffinity,VirtualNic).dev/tasks/generate-types-and-mappers.Routing Configuration (
pkg/controller/resourceconfig/static_config.go):ContainerNodePooldefault controller to Direct while keeping Terraform supported for brownfield compatibility.Test Fixtures Alignment:
containernodepooltest fixtures, verifying contract equivalence and lifecycle flows.Fixes #13563
This PR was generated by the overseer agent (powered by the gemini-3.7-flash model).