-
Notifications
You must be signed in to change notification settings - Fork 564
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
chore: add integration tests for image-cache #9872
base: main
Are you sure you want to change the base?
Conversation
188e619
to
c0b68e0
Compare
d6c92d6
to
272f3f4
Compare
Side note: now I understand how to run (and what to edit) CI steps locally. The whole Future "me" reminders.
diff --git a/hack/test/e2e-image-cache.sh b/hack/test/e2e-image-cache.sh
index 1d41da519..c09b8d117 100755
--- a/hack/test/e2e-image-cache.sh
+++ b/hack/test/e2e-image-cache.sh
@@ -12,12 +12,10 @@ NODE="172.20.2.2"
function build_special_mirrors {
REGISTRY_MIRROR_FLAGS=()
- for registry in docker.io quay.io ghcr.io; do
- local service="registry-${registry//./-}.ci.svc"
- addr=$(python3 -c "import socket; print(socket.gethostbyname('${service}'))")
-
- REGISTRY_MIRROR_FLAGS+=("--registry-mirror=${registry}=http://${addr}:5000")
- done
+ REGISTRY_MIRROR_FLAGS+=("--registry-mirror=docker.io=http://172.20.2.1:5000")
+ REGISTRY_MIRROR_FLAGS+=("--registry-mirror=factory.talos.dev=http://172.20.2.1:5006")
+ REGISTRY_MIRROR_FLAGS+=("--registry-mirror=ghcr.io=http://172.20.2.1:5004")
+ REGISTRY_MIRROR_FLAGS+=("--registry-mirror=127.0.0.1:5005=http://172.20.2.1:5005")
}
function create_cluster { Then:
And then:
|
272f3f4
to
0bdf446
Compare
07a3c23
to
5bb4bea
Compare
5bb4bea
to
0a6c50f
Compare
command: e2e-image-cache | ||
withSudo: true | ||
environment: | ||
IMAGE_REGISTRY: registry.dev.siderolabs.io |
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.
probably should run a short integration 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.
ah, it doesn't run any (?).
In fact, why create a flake instead of re-using existing e2e-qemu
like every other test?
the only difference is booting from an ISO and using a config patch, and both should be supported (or easy to add if not yet)
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.
@smira fixed
Makefile
Outdated
.PHONY: cache-create | ||
cache-create: installer imager ## Generate image cache. | ||
@( $(TALOSCTL_EXECUTABLE) images default | grep -v 'siderolabs/installer'; echo "$(REGISTRY_AND_USERNAME)/installer:$(IMAGE_TAG)" ) | $(TALOSCTL_EXECUTABLE) images cache-create --image-cache-path=/tmp/cache.tar --images=- --force | ||
@crane push /tmp/cache.tar $(REGISTRY_AND_USERNAME)/image-cache |
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.
should use a specific tag here $(IMAGE_TAG)
, otherwise concurrent tests might override things
7b05b22
to
16e241e
Compare
We still pass https://github.com/siderolabs/talos/actions/runs/12165563053/job/33930586574?pr=9872#step:13:96 |
If you look into the support bundle in artifacts, you will see: metadata:
namespace: cri
type: RegistryConfigs.cri.talos.dev
id: registries
version: 2
owner: cri.RegistriesConfigController
phase: running
created: 2024-12-04T18:17:02Z
updated: 2024-12-04T18:17:05Z
spec:
mirrors:
'*':
endpoints:
- http://127.0.0.1:3172
- http://172.20.0.251:65000
skipFallback: true
docker.io:
endpoints:
- http://127.0.0.1:3172
- http://192.168.118.176:5000
gcr.io:
endpoints:
- http://127.0.0.1:3172
- http://192.168.118.173:5000
ghcr.io:
endpoints:
- http://127.0.0.1:3172
- http://192.168.118.165:5000
k8s.gcr.io:
endpoints:
- http://127.0.0.1:3172
- http://172.20.0.251:65000
skipFallback: true
quay.io:
endpoints:
- http://127.0.0.1:3172
- http://192.168.118.179:5000
registry.k8s.io:
endpoints:
- http://127.0.0.1:3172
- http://192.168.118.148:5000
- http://172.20.0.251:65000
skipFallback: true |
b922fad
to
5c0833e
Compare
Provide separate `integration/image-cache` tag. Closes siderolabs#9860 Signed-off-by: Dmitriy Matrenichev <[email protected]>
5c0833e
to
0f774ba
Compare
Provide separate
integration/image-cache
tag.Closes #9860