Skip to content

[Bug]: atelet credential-provider configuration is hard-coded to GKE host paths #2669

Open
kagent-dev/substrate
#88

Description

@skamboj

What happened?

Since PR #917, the base atelet DaemonSet always passes --image-credential-provider-config and --image-credential-provider-bin-dir.

These are populated from GKE-specific host paths:

  • /home/kubernetes/bin, mounted as DirectoryOrCreate
  • /etc/srv/kubernetes/cri_auth_config.yaml, mounted as FileOrCreate

On vanilla Kubernetes nodes, these paths may not exist or the node's credential provider may be installed elsewhere.

DirectoryOrCreate creates an empty plugin directory. If /etc/srv/kubernetes exists, FileOrCreate creates an empty configuration file. Atelet rejects that file because it is not a valid CredentialProviderConfig and exits. If the parent directory does not exist, the pod instead fails during volume setup.

The Kind overlay avoids this by removing the credential-provider arguments and mounts. Other installations have no supported configuration for disabling the GKE paths or supplying alternative volume sources, so they must patch the DaemonSet.

Expected Behavior

The vanilla Kubernetes installation should:

  • Start atelet with anonymous image pulls when no credential provider is configured.
  • Allow operators to supply a CredentialProviderConfig and its provider executable through supported installation settings.
  • Allow provider executables to be delivered through a container image and pod-local shared storage, such as an init or sidecar-style container copying them into an emptyDir mounted by atelet. Installing binaries on every node or sharing host directories should not be required.
  • Keep hostPath-based providers, including the current GKE paths, as optional platform-specific configuration rather than the default.

Steps to Reproduce

  1. Use a non-GKE Kubernetes cluster whose nodes do not contain the GKE credential-provider paths.

  2. Deploy without the Kind profile:

    go run ./cmd/ate-setup deploy ate-system \
      --credential-provider='{"enabled":false}'
  3. Inspect the atelet pods:

    kubectl -n ate-system get pods -l app=atelet
    kubectl -n ate-system describe pods -l app=atelet
    kubectl -n ate-system logs daemonset/atelet
    
  4. Observe either a hostPath volume setup failure or atelet exiting while loading the empty credential-provider configuration.

Sandbox Runtime

Both / Runtime Agnostic

Agent Substrate Version / Commit SHA

22863c3

Kubernetes Version & Environment

On-prem Kubernetes 1.36.0, Ubuntu 24.04 nodes, containerd 2.2.3. Not GKE or Kind.

Host OS & Architecture

No response

Relevant Logs and Diagnostic Output

Additional Context

Atelet already supports anonymous pulls when --image-credential-provider-config is unset. The Kind overlay uses this behavior by deleting both credential-provider arguments and mounts.

The credential-provider interface itself accepts configurable paths, but the supplied manifests and installer do not expose a way to populate those paths from operator-selected volumes.

A provider container image backed by a shared emptyDir would provide a portable option for vanilla Kubernetes while retaining hostPath mounting for environments where the provider is intentionally installed on each node.

Confirmation

  • I have searched existing issues and verified that this is not a duplicate.
  • I have verified that this issue occurs on the latest commit on main.

Activity

  1. added
    kind/bug
    on Oct 14, 2026
  2. BenTheElder commented on Oct 17, 2026

    @BenTheElder
    Collaborator

    Start atelet with anonymous image pulls when no credential provider is configured.

    That already exists.

    Allow operators to supply a CredentialProviderConfig and its provider executable through supported installation settings.

    You can use a kustomize overlay, like kind

    Allow provider executables to be delivered through a container image and pod-local shared storage, such as an init or sidecar-style container copying them into an emptyDir mounted by atelet. Installing binaries on every node or sharing host directories should not be required.

    You can do this with a custom atelet manifest / overlay / image.

    Keep hostPath-based providers, including the current GKE paths, as optional platform-specific configuration rather than the default.

    I don't think we should remove it as the default, it's lower friction. We can add more common paths to the default mount by making them optional directory mounts.

  3. BenTheElder commented on Oct 17, 2026

    @BenTheElder
    Collaborator

    Ah right, can't do a truly optional hostpath.

    Well ... cc Steven Shriver (@stshrive) something else to consider for your installer revamp doc. We'll need to customize this in the chart etc.

    In the meantime, the accepted solution is to kubectl kustomize the manifest.

  4. stshrive commented on Oct 17, 2026

    @stshrive
    Collaborator

    5. Ah right, can't do a truly optional hostpath.
    Well ... cc Steven Shriver (@stshrive) something else to consider for your installer revamp doc. We'll need to customize this in the chart etc.

    Thanks for bringing this to my attention. I'm in the middle of scoping out all of the areas that will need updates so this will be included as well.

  5. marcellodesales commented on Oct 17, 2026

    @marcellodesales

    Following the direction in this thread (make the credential-provider wiring work off GKE rather than hard-coding the node paths), I opened #2799. It's an opt-in kustomize component, components/image-credential-secret:

    • the provider plugin is installed from its image into an emptyDir by an init container, so there are no host paths;
    • the CredentialProviderConfig comes from a ConfigMap;
    • credentials come from a kubernetes.io/dockerconfigjson Secret, through a small cmd/dockerconfig-credential-provider plugin.

    It doesn't change atelet itself, any API or the proto. It's proven by a two-phase e2e on the kind install against a private GHCR repo, with a fresh digest each run: refused without the Secret (UNAUTHORIZED: authentication required in atelet's log), pulled with it.

    The Helm-chart side for kagent-dev/substrate is kagent-dev#88 (atelet.imageCredentialProviderPlugins / imageCredentialProviderSecrets). cc Steven Shriver (@stshrive) in case you'd rather fold this into the installer revamp; happy to reshape it into settings there.

    (Prepared with AI assistance; I verified it on our CI and production cluster and will handle review myself.)

  6. BenTheElder commented on Oct 17, 2026

    @BenTheElder
    Collaborator

    Marcello DeSales (@marcellodesales) as evidenced by the comments above, a design is being prepared for the installer, which was discussed at the community meeting Thursday and is in the meeting notes and other open issues.

    I don't think we want to add MORE non-tenant-scope secrets right ahead of GA and the right installer approach is an open thread.

  7. marcellodesales commented on Oct 17, 2026

    @marcellodesales

    Benjamin Elder (@BenTheElder) sounds good... No worries... I just wanted to move forward as we are preparing our product and we've been testing substrate in our requirements... I hope to make to the upcoming meetings...

    Can you please also point me to the thread you are referring to? I tried to follow most of the threads here...

  8. javajon commented on Nov 13, 2026

    @javajon

    One more self-managed case for the installer revamp: on Talos (Kubernetes 1.37, images pulled anonymously from public registries) none of the GKE paths exist, and we kustomize the credential-provider arguments and mounts out of the atelet DaemonSet, as the kind overlay does.

    Could the v1.1 Helm chart (#3170) make the credential provider optional, off unless a CredentialProviderConfig is supplied? That would let the chart install on such clusters with no overlay. We can test a chart build on Talos when one is available.

  9. yussugi commented on Nov 26, 2026

    @yussugi

    One more case for the installer revamp, from EKS.

    We run v1.0.1 on EKS 1.37 with AL2023 arm64 nodes. There, the kubelet's credential provider lives at:

    • config: /etc/eks/image-credential-provider/config.json
    • bin dir: /etc/eks/image-credential-provider (holds ecr-credential-provider)

    We patched the two hostPaths in atelet.yaml to these, with type: File and type: Directory so that a missing path fails the pod instead of creating an empty one. atelet accepted the node's config as is and started.

    Two things we noticed, in case they matter for the chart's EKS defaults (#4149 mentions EKS for imageCredentialProviderConfigYAML):

    • The node's matchImages covers ECR, including public.ecr.aws. For a public.ecr.aws image, the provider failed, atelet logged a warning and fell back to an anonymous pull, and the pull worked. Docker Hub and ghcr.io images do not match, so they go straight to anonymous pulls.
    • atelet runs the provider with its own environment (cmd.Env = append(os.Environ(), ...) in cmd/atelet/internal/credentialprovider/exec.go). We gave atelet an EKS Pod Identity association for S3 snapshots, so the provider runs with atelet's role, not the node's. To pull from a private ECR registry, that role would need ECR read access. We have not tried private ECR yet, so this part comes from reading the code.

    The charts in #4149 already leave the provider off by default, which would have saved us the patch. Thanks!

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

Metadata

Metadata

Labels

area/dev-infraarea/nodekind/bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions