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

v1.4.0 Failed to create Service for template -- port.Name not being passed to CreateService #2599

Closed
2 tasks done
bt-macole opened this issue Feb 16, 2023 · 2 comments · Fixed by #2572
Closed
2 tasks done
Labels
awaiting-response bug Something isn't working

Comments

@bt-macole
Copy link

bt-macole commented Feb 16, 2023

Checklist:

  • I've included steps to reproduce the bug.
  • I've inclued the version of argo rollouts.

Describe the bug

When creating the ports slice (code here) to pass to CreateService, port.Name is omitted, when attempting to create a Service where len(ports) > 1 this generates an invalid spec.

It seems this was not previously an issue because the created Service always only had the single hardcoded port. However, if more than 1 Service Port is defined, name is not optional (see k8s docs for more here)

To Reproduce

argo-rollouts: v1.4.x

Create an Experiment with more than 1 rs.spec.template.spec.containers.ports, such as:

example template.spec.containers.ports:

...
    template:
      ...
      spec:
      ...
        containers:
           ...
              ports:
                - containerPort: 8080
                  name: a
                - containerPort: 8082
                  name: b
                - containerPort: 8083
                  name: c
...

will get error such as:

        Failed to create Service for template '<SERVICE NAME>': Service
        "<UNIQUE-SERVICE-NAME>" is invalid:
        [spec.ports[0].name: Required value, spec.ports[1].name: Required value,
        spec.ports[2].name: Required value]

With degraded rollout and experiment resources.

Expected behavior

Experiment creates resources.

Version

v1.4.0


Message from the maintainers:

Impacted by this bug? Give it a 👍. We prioritize the issues with the most 👍.

@bt-macole bt-macole added the bug Something isn't working label Feb 16, 2023
@zachaller
Copy link
Collaborator

I think this is closed here can you confirm if this fixes the issue for you #2572

@bt-macole
Copy link
Author

100% missed this, even though it is indeed in master already. apologies!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-response bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants