-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Warn about creating multiple replicas from kubernetes YAML #17082
Warn about creating multiple replicas from kubernetes YAML #17082
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
The warning is not sufficient for what I had in mind. I think Podman should
- Enforce 1 replica. Hence, even if 3 are defined, only one will be started.
- Warn that Podman limits the replicas to one. Currently, the warning states they are not supported.
We should also add a test and make sure that warning is emitted. The test won't pass for remote clients because there is no plumbing for progress (yet).
d28291b
to
3c75ebf
Compare
3c75ebf
to
4e41fa2
Compare
Would this be considered a breaking change? We go from "supporting" replicas to ignoring them. |
Replicas make little sense on a single node, so warning is the best we can do. |
I don't think we really supported Replicas before. |
We did create them (though I agree they didn't really function properly - or at all, really) |
If we want to do just a warning, the approach LGTM. I'll let others debate the merit of that approach. |
383b4d1
to
2e1e989
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM, but, need to see why tests are failing. Maybe there are some more tests that need adjustment
ecad704
to
6b81a71
Compare
@ygalblum Tests should be green now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need a test that expects the warning to be printed to make sure we don't silently regress in the future.
6b81a71
to
e2254e8
Compare
@vrothberg I have added a test for the log output and also tried to add a test that verifies that podman really only creates a single pod. But I'm not really happy with it, because it relies on podman's stdout. However, I did not want to use the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you @dcermak !
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dcermak, vrothberg The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
e2254e8
to
c529e80
Compare
Tests aren´t happy yet |
5ec7588
to
a78cc1d
Compare
Yes, the test checking for the log warning was still running for remote integration tests, but iirc that is not supported. Should be fixed now 🤞 |
This fixes: containers#16765 Signed-off-by: Dan Čermák <dcermak@suse.com>
a78cc1d
to
d9bf3f1
Compare
After a few complimentary force-pushes, they were convinced to be happy ;-) |
LGTM |
/lgtm |
Hi everyone, Is it going to be dropped as a supported feature or will it be actually implemented? Since Podman can be used to test YAML files that will eventually be applied on Kubernetes clusters, in my humble opinion the concept of replicas is not secondary, it would be very useful to test them even on a single node. Please let me know if this is the wrong place to ask this question 😄 |
Support for this field has been effectively removed via containers#17082 Signed-off-by: Dan Čermák <dcermak@suse.com>
I think we have effectively dropped support for this feature with this PR, as we deemed it to not really make a lot of sense to offer multiple replicas on a single host without built-in support for an ingress. |
Yes we have. But, Podman does not fail when replica is set to more than 1, it just logs a warning. So, your YAML file will continue to work. Just won't spin multiple replicas |
Replicas are ignored since containers#17082 Signed-off-by: Dan Čermák <dcermak@suse.com>
See: #16766 (comment)
This fixes: #16765
cc @vrothberg