Skip to content

Image OCI config is dropped when building actor runtime spec #300

Closed

Description

@jmhbh

Expected Behavior

When an actor is created from an ActorTemplate, the workload container should inherit the
environment variables baked into its image's OCI config (Config.Env), the same way docker run
and containerd/CRI do.

Actual Behavior

The image's OCI config is discarded when building the actor's runtime spec. The process only ever
sees a hardcoded PATH plus whatever env the ActorTemplate sets explicitly; the image's ENV
directives never reach the process.

Steps to Reproduce the Problem

  1. Build and push an image with ENV vars set:
    FROM busybox:1.36
    ENV DEMO_VAR=example
    docker buildx build --platform linux/arm64 -t <registry>/env-demo:v1 --push .
    
  2. Create an ActorTemplate that references the image:
    apiVersion: ate.dev/v1alpha1
    kind: ActorTemplate
    metadata:
      name: env-demo
      namespace: <ns>
    spec:
      workerPoolRef: { name: <pool>, namespace: <ns> }
      pauseImage: <pause-image@sha256:...>
      snapshotsConfig: { location: <gs://.../env-demo> }
      runsc: { arm64: { url: <...>, sha256Hash: <...> }, amd64: { url: <...>, sha256Hash: <...> } }
      containers:
        - name: app
          image: <registry>/env-demo@sha256:...   # the image from step 1, digest-pinned
          command: ["/bin/sh","-c","echo DEMO_VAR=$DEMO_VAR; env; sleep 3600"]
  3. Inspect the actor process's environment which should be forwarded to stdout. Note that it DEMO_VAR is empty.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working / bugfixes

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions