🤖 Generated by the Daily AI Engineer
Problem
The Talos 1.14 legacy-patch migration introduced in #5771 (PR #5775) correctly handles the standard patch layouts ksail itself generates, but three non-standard / split user-patch layouts are not yet migrated faithfully. These surface on ksail cluster create/update for a pinned Talos 1.14 cluster whose existing patch set was hand-written or split across files. Each is a review finding on pkg/fsutil/configmanager/talos/kubernetes_patches.go deferred from #5775 (the false-positive authorizer finding on that PR was refuted with Talos-source evidence; these three are genuine variant gaps).
Affected audience & impact
Operators upgrading an existing cluster to Talos 1.14 whose current patches are not byte-for-byte the ksail-generated forms. Impact ranges from a broken CNI state to an aborted config load.
The three gaps
-
Non-exact disable-default-CNI patches are not migrated (migrateKubernetesPatchesForContract, the switch content byte-match). A disable-CNI patch that isn't byte-for-byte legacyDisableDefaultCNIPatchYAML (e.g. it carries comments, apiVersion, or other cluster.network edits) falls through to the API-server path and is left as legacy cluster.network.cni.name: none. The generated 1.14 config still emits a KubeFlannelCNIConfig document → a custom-CNI cluster comes up with both Flannel and the requested CNI.
- Expected: detect
cluster.network.cni.name: none structurally (not by exact bytes) and drop the Flannel document while preserving any other cluster.network edits.
-
OIDC oidc-ca-file is only resolved within the current patch (oidcConfig → machineFileContent(values.documents, caPath)). When the API-server patch keeps oidc-ca-file but the matching machine.files entry lives in a separate patch (valid pre-1.14, since all patches applied before kube-apiserver read the file), the lookup reports the CA missing and aborts config loading.
- Expected: resolve the CA file across the full patch set, not just the patch being migrated.
-
Auth-related kube-apiserver extraArgs are copied whole into KubeAPIServerConfig (multiDocumentAPIServerFieldName passes extraArgs through unchanged). Flags such as authorization-mode / authorization-webhook-* (and possibly anonymous-auth) may need to move to the dedicated authorizer/authentication documents in 1.14. Needs verification of exactly which flags the 1.14 KubeAPIServerConfig rejects, then either targeted migration or a clear migration-time error (mirroring the existing RejectsUnsupportedLegacyOIDCExtraArg pattern) instead of emitting a config Talos rejects at apply time.
Acceptance criteria
Size
~S–M per gap (each an independently shippable child). Suggest decomposing into three delivery children off this issue.
Deferred from #5775; findings by the Codex reviewer at head 6eb175ec52.
Problem
The Talos 1.14 legacy-patch migration introduced in #5771 (PR #5775) correctly handles the standard patch layouts ksail itself generates, but three non-standard / split user-patch layouts are not yet migrated faithfully. These surface on
ksail cluster create/updatefor a pinned Talos 1.14 cluster whose existing patch set was hand-written or split across files. Each is a review finding onpkg/fsutil/configmanager/talos/kubernetes_patches.godeferred from #5775 (the false-positive authorizer finding on that PR was refuted with Talos-source evidence; these three are genuine variant gaps).Affected audience & impact
Operators upgrading an existing cluster to Talos 1.14 whose current patches are not byte-for-byte the ksail-generated forms. Impact ranges from a broken CNI state to an aborted config load.
The three gaps
Non-exact disable-default-CNI patches are not migrated (
migrateKubernetesPatchesForContract, theswitch contentbyte-match). A disable-CNI patch that isn't byte-for-bytelegacyDisableDefaultCNIPatchYAML(e.g. it carries comments,apiVersion, or othercluster.networkedits) falls through to the API-server path and is left as legacycluster.network.cni.name: none. The generated 1.14 config still emits aKubeFlannelCNIConfigdocument → a custom-CNI cluster comes up with both Flannel and the requested CNI.cluster.network.cni.name: nonestructurally (not by exact bytes) and drop the Flannel document while preserving any othercluster.networkedits.OIDC
oidc-ca-fileis only resolved within the current patch (oidcConfig→machineFileContent(values.documents, caPath)). When the API-server patch keepsoidc-ca-filebut the matchingmachine.filesentry lives in a separate patch (valid pre-1.14, since all patches applied before kube-apiserver read the file), the lookup reports the CA missing and aborts config loading.Auth-related kube-apiserver
extraArgsare copied whole intoKubeAPIServerConfig(multiDocumentAPIServerFieldNamepassesextraArgsthrough unchanged). Flags such asauthorization-mode/authorization-webhook-*(and possiblyanonymous-auth) may need to move to the dedicated authorizer/authentication documents in 1.14. Needs verification of exactly which flags the 1.14KubeAPIServerConfigrejects, then either targeted migration or a clear migration-time error (mirroring the existingRejectsUnsupportedLegacyOIDCExtraArgpattern) instead of emitting a config Talos rejects at apply time.Acceptance criteria
KubeFlannelCNIConfig; both-state test. (delivered in fix(talos): migrate configmanager to alpha.2 multi-document config API #5775 @56e1f7925)machine.filesin a different patch) migrates without the "CA missing" abort; test. (delivered in fix(talos): migrate configmanager to alpha.2 multi-document config API #5775 @12d894e02)extraArgsthe 1.14KubeAPIServerConfigrejects, with either migration or a targeted migration error + test. (delivered in fix(talos): migrate configmanager to alpha.2 multi-document config API #5775 @43a0c4e3)Size
~S–M per gap (each an independently shippable child). Suggest decomposing into three delivery children off this issue.
Deferred from #5775; findings by the Codex reviewer at head
6eb175ec52.