-
Notifications
You must be signed in to change notification settings - Fork 67
drenv: Adds separate k8s image pull step to improve probing #2330
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
base: main
Are you sure you want to change the base?
Conversation
drenv: Adds separate k8s image pull step to improve probing Move kubeadm image pulling to a separate provision step before kubeadm init. This improves probing performance by pre-pulling images upfront, reducing cluster startup time by approximately 100 seconds. The new step: - Pre-pulls all required kubeadm images using kubeadm config images pull - Respects LOCAL_REGISTRY parameter for local registry usage - Includes safety checks to skip if cluster already initialized This change follows the upstream Lima improvement in lima-vm/lima#3082 which improves probing when pulling kubeadm images during cluster startup. Resolves RamenDR#1764 Signed-off-by: raaizik <132667934+raaizik@users.noreply.github.com>
nirs
left a comment
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.
This can make sense if pulling the images before kubeadm init can speed up the operation. Please measure and report if this makes an interesting difference.
| apiVersion: kubeadm.k8s.io/v1beta3 | ||
| imageRepository: "$IMAGE_REPOSITORY" | ||
| EOF | ||
| kubeadm config images pull --config kubeadm-images-config.yaml |
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.
Using --config for pulling the image from the local registry is nice, but how does it improve probing?
The upstream change added a separate probing script to show progress when the images are pulled, since pulling the images can take lot of time with slow network. Probing does not help us since we don't show the probing logs in drenv. So this change does help with drenv.
When using local registry the images are pulled in 10 seconds with the current code. This change makes sense only if it improves the time in a significant way.
When using remote registry the time can be much longer. Does this change improve the pull time?
| script: | | ||
| #!/bin/bash | ||
| set -eux -o pipefail | ||
| test -e /etc/kubernetes/admin.conf && exit 0 |
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.
This config is not created by this step - so this step may run multiple times for no reason. When we include a guard command like this it must check something that this provision script creates. The upstream change does not pull the images in a separate provision script so it does not have this issue.
| #!/bin/bash | ||
| set -eux -o pipefail | ||
| test -e /etc/kubernetes/admin.conf && exit 0 | ||
| command -v kubeadm >/dev/null 2>&1 || exit 0 |
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.
This seems wrong - since we pull the images with kubeadm, and this exit if kubeadm exist, we will never pull the images in this step, and they are always pulled during kubeadm init.
Move kubeadm image pulling to a separate provision step before kubeadm init. This improves probing performance by pre-pulling images upfront, reducing cluster startup time by approximately 100 seconds.
The new step:
This change follows the upstream Lima improvement in lima-vm/lima#3082 which improves probing when pulling kubeadm images during cluster startup.
TODO
Resolves #1764