Skip to content

kubernetes-worker-image: golden import cannot trust a self-hosted Talos Image Factory behind an internal CA #4872

Description

The golden worker image catalog cannot import from a Talos Image Factory that is served with a certificate from an internal CA. #3797 fixed this for the per-pool import in kubernetes-nodes by adding talos.imageFactoryCA, but the catalog in packages/system/kubernetes-worker-image did not get the same option. Its templates/dv.yaml renders source.http.url and nothing else, and the chart has no CA value.

On a cluster whose kubernetesWorkerImage.imageFactoryURL points at such a factory, the golden DataVolume in cozy-public never imports. The importer fails with x509: certificate signed by unknown authority and CDI restarts it with back-off. With #4802, a pool on osImage.builtin that clones this golden is refused at render with "keeps failing to import", so the failure is visible instead of a hang. Still, osImage.builtin cannot work against this factory at all. The only workaround is osImage.factory on every pool, which is the per-pool network import the catalog exists to avoid.

Possible fix: an optional CA value on the worker-image chart, global plus a per-image override next to imageFactoryURL. The chart would render it into a ConfigMap in cozy-public and reference it from the golden's source.http.certConfigMap, validated with the existing cozy-lib.tls.validateCACert helper. The platform's kubernetesWorkerImage passthrough has to forward it. With an empty default nothing is rendered and existing goldens stay as they are.

One thing to handle: a golden DataVolume spec cannot be patched. The drift check in dv.yaml already refuses a changed URL, storage or class on an existing golden, and adding a CA to a live golden would need the same treatment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/kubernetesIssues or PRs related to the tenant Kubernetes appkind/bugCategorizes issue or PR as related to a bugtriage/needs-triageIndicates an issue needs triage by a maintainer

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions