-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Update MetalLB deployment, wait for resource. #9995
Update MetalLB deployment, wait for resource. #9995
Conversation
Hi @Jeroen0494. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Also see my comment here: |
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.
@Jeroen0494 Thanks for the followup fix 🙇
/ok-to-test
pls rebase master branch. |
ae9598a
to
1beb29f
Compare
Hi, I rebased, pushed some more fixes and squashed my commits. |
Hey! I have an issue running your branch:
Could you, please, take a look? |
Hi, I'm sorry this is happening. I'll look into it tomorrow afternoon when I'm at work, and give the whole thing a more thorough testing. I'm also a bit surprised this wasn't noticed during CI/CD testing. @floryut is MetalLB included in the Kubespray CI tests? |
I fixed it modifying this:
but faced another problem:
|
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.
some refactoring for error:
TASK [kubernetes-apps/metallb : MetalLB | Create address pools configuration] *************************************************************************************************************
fatal: [test00-00]: FAILED! =>
msg: |-
The task includes an option with an undefined variable. The error was: 'item' is undefined
The error appears to be in '..kubespray/roles/kubernetes-apps/metallb/tasks/main.yml': line 6
8, column 5, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
- name: MetalLB | Create address pools configuration
^ here
skipping: [test00-01]
skipping: [test00-02]
another one:
|
This works fine with me:
|
Now that you are mentioning this, after a quick search we don't have any CI coverage for MetalLB use cases, not even a simple deployment :/ |
@eugene-marchanka Thank you for the help! I've updated the installation, should be quite a bit better now. Could you give it a spin? |
Hey!
|
Yea, so this is the reason I want to use the kubernetes.core.k8s module. Because the playbook needs to wait until the controller pod is properly running before resources can be created. @floryut any change I can switch from using the self-written kube module to the kubernetes.core collection, and add this as a requirement in requirements.txt? Because the kube module doesn't have what I need to prevent any further errors in this regard. Without a proper wait-until-ready, this isn't going to work. |
A workaround is to add simple
|
@oomichi kind reminder. |
HI @Jeroen0494 The v2.22 will release the next week. |
Thanks. I'm still waiting for an answer for my question, so I guess it won't be ready before the release. |
Hi ! It seems Kubespray v2.22.0 release broke upgrade/install for metallb users because that PR isn't merged :/ Maybe it should a good idea to add an advertissement to tell users to skip the metallb upgrade for the v2.22.0 release ? |
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 for your effort, I've tried this PR out a bit and found some issues.
I'd also like to comment on the usage of kubernetes.core
modules, these require the Python kubernetes
library on the target host, which is likely not so trivial to setup considering the broad OS compatibility of kubespray. You could attempt to delegate these tasks to localhost, but personally I don't think that's a great solution either.
Oh yeah, and I suggest you look into kubectl wait
instead of an arbitrary sleep, i.e. kubectl -n metallb-system wait --for condition=established --timeout=300s crd/addresspools.metallb.io
.
Indeed we use
That's really everything. But I will take another look at the |
9760fe9
to
720b393
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.
A few comments but looks good overall, thanks :). Could you also add a test similarly to the other PR?
Ah and could you also please cleanup (or squash) you commit history? |
Signed-off-by: Jeroen Rijken <[email protected]>
a145ff4
to
d74d1b6
Compare
@MrFreezeex fixes applied and commits squashed. |
It's missing a test like in here https://github.com/kubernetes-sigs/kubespray/pull/10135/files#diff-bd336fb2e0cd1a14218d71fb76a197149c77d677109d2415562c9c53fe774e76 |
Signed-off-by: Jeroen Rijken <[email protected]>
I've added a basic test. |
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 for your contribution and the extra miles of adding tests and docs!
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: floryut, Jeroen0494, MrFreezeex 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 |
* Update MetalLB deployment, wait for resource. Signed-off-by: Jeroen Rijken <[email protected]> * yml to yaml, add basic test for metallb Signed-off-by: Jeroen Rijken <[email protected]> --------- Signed-off-by: Jeroen Rijken <[email protected]>
* Update MetalLB deployment, wait for resource. Signed-off-by: Jeroen Rijken <[email protected]> * yml to yaml, add basic test for metallb Signed-off-by: Jeroen Rijken <[email protected]> --------- Signed-off-by: Jeroen Rijken <[email protected]>
What type of PR is this?
/kind bug
Fixes #10003
What this PR does / why we need it:
Continuation of PR #9120.
Does this PR introduce a user-facing change?: