Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

play kube: name collisions for containers within the same pod spec #13332

Closed
arielireni opened this issue Feb 24, 2022 · 0 comments · Fixed by #13423
Closed

play kube: name collisions for containers within the same pod spec #13332

arielireni opened this issue Feb 24, 2022 · 0 comments · Fixed by #13423
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@arielireni
Copy link

arielireni commented Feb 24, 2022

/kind bug

Description

play kube API does not handle name collisions for containers within the same pod spec.

While trying to deploy a pod that contains two containers with the same name:

  pod:
    spec:
      containers:
        - name: test1
          image: quay.io/aireni/my-image:latest
        - name: test1
          image: quay.io/aireni/my-image:latest

I didn't receive an error and only one container was created:

     "Containers": [
          {
               "Id": "3395bd092a62813c10bc29f4333ec8e177ac4b761638c5fbf0197d42b8291d66",
               "Name": "podman-test-test1",
               "State": "running"
          }
       ]

When I tried to create the same pod without kube play, k8s validated this rule and I received an error:

→ oc apply -f /tmp/workload.yaml
The Pod "test" is invalid: spec.containers[1].name: Duplicate value: "test1" 

Output of podman version:

Version:      3.4.4
API Version:  3.4.4
Go Version:   go1.16.8
Built:        Wed Dec  8 23:45:07 2021
OS/Arch:      linux/amd64
@openshift-ci openshift-ci bot added the kind/bug Categorizes issue or PR as related to a bug. label Feb 24, 2022
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 20, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants