-
Notifications
You must be signed in to change notification settings - Fork 97
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
add e2e test for running nydus snapshotter in Kubernetes #283
Conversation
Change base image from ubuntu to alpine to reduce image size. Signed-off-by: bin liu <liubin0329@gmail.com>
Codecov ReportBase: 33.45% // Head: 33.39% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #283 +/- ##
==========================================
- Coverage 33.45% 33.39% -0.06%
==========================================
Files 29 29
Lines 3124 3129 +5
==========================================
Hits 1045 1045
- Misses 1971 1976 +5
Partials 108 108
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
.github/workflows/k8s-e2e.yml
Outdated
sudo DOCKER_CONFIG=$HOME/.docker nydusify convert \ | ||
--source busybox:latest \ | ||
--target ${registry_ip}:5000/busybox:nydus-v5-latest \ | ||
--fs-version 5 |
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.
Maybe use 6 as default.
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.
fixed
tests/e2e/k8s/snapshotter.yaml
Outdated
"backend": { | ||
"type": "registry", | ||
"config": { | ||
"scheme": "http", |
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.
The scheme
field can be ignored for nydusd v2.1.2
.
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.
fixed
others LGTM! |
356ff02
to
15f3fdb
Compare
tests/e2e/k8s/test-pod.yaml.tpl
Outdated
name: test-pod | ||
spec: | ||
containers: | ||
- name: nginx |
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 looks odd. The container is named nginx
but the image is busybox
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.
fixed
tests/e2e/k8s/snapshotter.yaml
Outdated
- --root /var/lib/containerd-nydus | ||
- --address /run/containerd-nydus/containerd-nydus-grpc.sock | ||
- --log-level debug | ||
- --enable-nydus-overlayfs=false |
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.
Where do we pack the binary nydus-overlayfs
?
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.
removed
.github/workflows/k8s-e2e.yml
Outdated
docker exec kind-control-plane cat /etc/containerd/config.toml >> $log_dir/containerd-config.toml | ||
docker exec kind-control-plane containerd config dump >> $log_dir/containerd-config-dump.toml | ||
|
||
docker exec kind-control-plane journalctl -u containerd >> $log_dir/containerd.log |
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.
Do we need to append --no-pager
, otherwise I am not sure if the containerd log can be piped
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.
Added.
But from the test result, the log wasn't truncated, since there is no tty.
.github/workflows/k8s-e2e.yml
Outdated
docker exec kind-control-plane containerd config dump >> $log_dir/containerd-config-dump.toml | ||
|
||
docker exec kind-control-plane journalctl -u containerd >> $log_dir/containerd.log | ||
docker exec kind-control-plane journalctl -u kubelet >> $log_dir/kubelet.log |
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.
ditto
Otherwise, looks good to me |
This e2e test will - deploy nydus snapshotter with RBAC in Kubernetes - setup a Docker retistry needs auth - create a dockerconfig secret and let snapshotter get the auth from it Signed-off-by: bin liu <liubin0329@gmail.com>
--enable-metrics ${ENABLE_METRICS} \ | ||
--enable-nydus-overlayfs ${ENABLE_NYDUS_OVERLAY} \ | ||
--enable-metrics=${ENABLE_METRICS} \ | ||
--enable-nydus-overlayfs=${ENABLE_NYDUS_OVERLAY} \ |
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.
Do we need to remove this too? Otherwise, the executive nydus-overlayfs
should be installed
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.
I see. It is false, please ignore it.
add e2e test for running nydus snapshotter in Kubernetes
Optimize image size