Inline toml config error: failed to write / clone compose file #1169

Closed
opened 2026-03-22 17:13:08 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @nic96 on GitHub (May 13, 2025).

I'm getting the following error when trying to use an inline toml config for a gitlab runner:

ERROR: Failed to write / clone compose file

TRACE:
	1: failed to interpolate secrets into file contents
	2: did not find any value for variable runners

I'm wondering if this has something to do with komdo also trying to serialize/save the compose file as toml.

Image

A workaround I used for now is instead of a UI defined compose I'm using the files on server option.

Here's my compose.yaml

services:
  dind:
    image: docker:20-dind
    restart: always
    privileged: true
    environment:
      DOCKER_TLS_CERTDIR: ""
    command:
      - --storage-driver=overlay2

  runner:
    restart: always
    image: registry.gitlab.com/gitlab-org/gitlab-runner:alpine
    depends_on:
      - dind
    environment:
      - DOCKER_HOST=tcp://dind:2375
    volumes:
      - config:/etc/gitlab-runner:z
    configs:
      - source: config.toml
        target: /etc/gitlab-runner/config.toml

  # register-runner:
  #   restart: 'no'
  #   image: registry.gitlab.com/gitlab-org/gitlab-runner:alpine
  #   depends_on:
  #     - dind
  #   environment:
  #     - CI_SERVER_URL=${CI_SERVER_URL}
  #     - REGISTRATION_TOKEN=""
  #     - RUNNER_AUTHENTICATION_TOKEN=${AUTHENTICATION_TOKEN}
  #   command:
  #     - register
  #     - --non-interactive
  #     - --locked=false
  #     - --name=${RUNNER_NAME}
  #     - --token=${AUTHENTICATION_TOKEN}
  #     - --executor=docker
  #     - --docker-image=docker:20-dind
  #     - --docker-volumes=/var/run/docker.sock:/var/run/docker.sock
  #   volumes:
  #     - config:/etc/gitlab-runner:z
  #   configs:
  #     - source: config.toml
  #       target: /etc/gitlab-runner/config.toml

volumes:
  config:

configs:
  config.toml:
    content: |
      concurrent = 2
      check_interval = 0
      shutdown_timeout = 0
      
      [session_server]
        session_timeout = 1800
      
      [[runners]]
        name = "nic96-runner"
        url = "https://gitlab.com/"
        id = 12345678
        token = "${AUTHENTICATION_TOKEN}"
        token_obtained_at = 2024-12-10T22:11:36Z
        token_expires_at =2025-12-10T22:11:36Z
        executor = "docker"
        [runners.custom_build_dir]
        [runners.cache]
          MaxUploadedArchiveSize = 0
          [runners.cache.s3]
          [runners.cache.gcs]
          [runners.cache.azure]
        [runners.docker]
          tls_verify = false
          image = "docker:20-dind"
          privileged = false
          disable_entrypoint_overwrite = false
          oom_kill_disable = false
          disable_cache = false
          volumes = ["/var/run/docker.sock:/var/run/docker.sock", "/cache"]
          shm_size = 0
          network_mtu = 0
Originally created by @nic96 on GitHub (May 13, 2025). I'm getting the following error when trying to use an inline toml config for a gitlab runner: ``` ERROR: Failed to write / clone compose file TRACE: 1: failed to interpolate secrets into file contents 2: did not find any value for variable runners ``` I'm wondering if this has something to do with komdo also trying to serialize/save the compose file as toml. ![Image](https://github.com/user-attachments/assets/3c2c5ba6-d65d-4123-ac69-b547cfc733f0) A workaround I used for now is instead of a UI defined compose I'm using the files on server option. Here's my compose.yaml ```yaml services: dind: image: docker:20-dind restart: always privileged: true environment: DOCKER_TLS_CERTDIR: "" command: - --storage-driver=overlay2 runner: restart: always image: registry.gitlab.com/gitlab-org/gitlab-runner:alpine depends_on: - dind environment: - DOCKER_HOST=tcp://dind:2375 volumes: - config:/etc/gitlab-runner:z configs: - source: config.toml target: /etc/gitlab-runner/config.toml # register-runner: # restart: 'no' # image: registry.gitlab.com/gitlab-org/gitlab-runner:alpine # depends_on: # - dind # environment: # - CI_SERVER_URL=${CI_SERVER_URL} # - REGISTRATION_TOKEN="" # - RUNNER_AUTHENTICATION_TOKEN=${AUTHENTICATION_TOKEN} # command: # - register # - --non-interactive # - --locked=false # - --name=${RUNNER_NAME} # - --token=${AUTHENTICATION_TOKEN} # - --executor=docker # - --docker-image=docker:20-dind # - --docker-volumes=/var/run/docker.sock:/var/run/docker.sock # volumes: # - config:/etc/gitlab-runner:z # configs: # - source: config.toml # target: /etc/gitlab-runner/config.toml volumes: config: configs: config.toml: content: | concurrent = 2 check_interval = 0 shutdown_timeout = 0 [session_server] session_timeout = 1800 [[runners]] name = "nic96-runner" url = "https://gitlab.com/" id = 12345678 token = "${AUTHENTICATION_TOKEN}" token_obtained_at = 2024-12-10T22:11:36Z token_expires_at =2025-12-10T22:11:36Z executor = "docker" [runners.custom_build_dir] [runners.cache] MaxUploadedArchiveSize = 0 [runners.cache.s3] [runners.cache.gcs] [runners.cache.azure] [runners.docker] tls_verify = false image = "docker:20-dind" privileged = false disable_entrypoint_overwrite = false oom_kill_disable = false disable_cache = false volumes = ["/var/run/docker.sock:/var/run/docker.sock", "/cache"] shm_size = 0 network_mtu = 0 ```
GiteaMirror added the seen 👀 label 2026-03-22 17:13:08 -05:00
Author
Owner

@mbecker20 commented on GitHub (Aug 28, 2025):

I see. There is an option on Stack Config skip_secret_interp which enabling would fix this but I think you can only enable it using Resource TOML / Sync. I will review adding this to the UI.

@mbecker20 commented on GitHub (Aug 28, 2025): I see. There is an option on Stack Config [`skip_secret_interp`](https://docs.rs/komodo_client/latest/komodo_client/entities/stack/struct.StackConfig.html#structfield.skip_secret_interp) which enabling would fix this but I think you can only enable it using Resource TOML / Sync. I will review adding this to the UI.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/komodo#1169