Skip to content

Service Containers Label Name Causes duplicates error #241

@gurpalw

Description

@gurpalw

Checks

Controller Version

0.11.0

Deployment Method

Helm

Checks

  • This isn't a question or user support case (For Q&A and community support, go to Discussions).
  • I've read the Changelog before submitting this issue and I'm sure it's not due to any recently-introduced backward-incompatible changes

To Reproduce

services:
  redis1:
    image: redis:8.0.3-alpine
    ports:
      - 6379:6379
  redis2:
    image: redis:8.0.3-alpine
    ports:
      - 6380:6380

Describe the bug

in kubernetes mode, services create containers inside the pod based on the image name (redis) resulting in this error:


Run '/home/runner/k8s/index.js'
Error: Error: failed to create job pod: Pod "self-hosted-jffdf-runner-m2pr4-workflow" is invalid: spec.containers[2].name: Duplicate value: "redis"
Error: Process completed with exit code 1.
Error: Executing the custom container implementation failed. Please contact your self hosted runner administrator.

the container name should be based on the service label, i.e redis1 or redis2

Describe the expected behavior

the container name should be based on the service label, i.e redis1 or redis2

Additional Context

NA

Controller Logs

un '/home/runner/k8s/index.js'
Error: Error: failed to create job pod: Pod "self-hosted-jffdf-runner-m2pr4-workflow" is invalid: spec.containers[2].name: Duplicate value: "redis"
Error: Process completed with exit code 1.
Error: Executing the custom container implementation failed. Please contact your self hosted runner administrator.

Runner Pod Logs

un '/home/runner/k8s/index.js'
Error: Error: failed to create job pod: Pod "self-hosted-jffdf-runner-m2pr4-workflow" is invalid: spec.containers[2].name: Duplicate value: "redis"
Error: Process completed with exit code 1.
Error: Executing the custom container implementation failed. Please contact your self hosted runner administrator.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions