test: migrate testing registry from host container to in-cluster deployment#3718
Conversation
|
Skipping CI for Draft Pull Request. |
|
@matejvasek: The label(s) DetailsIn response to this:
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-sigs/prow repository. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3718 +/- ##
==========================================
+ Coverage 56.95% 57.05% +0.10%
==========================================
Files 181 181
Lines 21116 21141 +25
==========================================
+ Hits 12026 12063 +37
+ Misses 7866 7855 -11
+ Partials 1224 1223 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
47f1429 to
3b1c9e6
Compare
…oyment Replace the standalone docker/podman registry container (localhost:50000) with an in-cluster Deployment + ClusterIP Service + Ingress exposed at registry.localtest.me. This eliminates host-side container management, ExternalName services, and Podman VM port forwarding. The registry pod uses hostPort:5000 so containerd on the Kind node can reach it at localhost:5000 via mirrors. Pods reach it via the ClusterIP Service. The host reaches it via Contour ingress. Add insecure registry support to the credential verification and docker push paths. CheckAuth, docker.Pusher, and NewCredentialsProvider now accept an insecure flag to use plain HTTP via name.Insecure instead of defaulting to HTTPS. The knative deployer's checkPullPermissions also respects RegistryInsecure. E2E tests set FUNC_REGISTRY_INSECURE=true when using the default registry.localtest.me. A dedicated TestRemote_Deploy_InClusterRegistry test verifies the in-cluster dialer tunneling path via registry.default.svc.cluster.local. hack/allow-insecure.tar updated to include *.localtest.me alongside *.cluster.local for buildah/podman insecure registry configuration. Signed-off-by: Matej Vašek <matejvasek@gmail.com> Co-Authored-By: Claude <noreply@anthropic.com>
3b1c9e6 to
15f23a5
Compare
|
PTAL @gauron99 @lkingland |
Signed-off-by: Matej Vašek <matejvasek@gmail.com>
Patch the generated GitHub workflow to symlink the locally-built func binary instead of downloading a release via functions-dev/action. The released binary lacks the insecure registry fix, causing pack builder tests (node, typescript, quarkus) to fail against registry.localtest.me. Signed-off-by: Matej Vašek <matejvasek@gmail.com> Co-Authored-By: Claude <noreply@anthropic.com>
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: gauron99, matejvasek The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Changes
localhost:50000) with an in-cluster Deployment + ClusterIP Service + Ingress atregistry.localtest.meCheckAuth,docker.Pusher,NewCredentialsProvider,checkPullPermissions) so--registry-insecureproperly uses HTTPhack/allow-insecure.tarto include*.localtest.mefor buildah/podman toolsFUNC_REGISTRY_INSECURE=truecentrally insetupEnvwhen usingregistry.localtest.mefunctions-dev/action/kind cleanup
The previous test registry setup required a host-side docker/podman container, host-side insecure registry config, an ExternalName Service, separate registry URLs for local vs remote builds (
localhost:50000vs.registry.default.svc:5000), and macOS SSH port forwarding. The in-cluster registry uses a single URL (registry.localtest.me) reachable from the host (via Contour ingress), Kind nodes (via containerd mirrors tolocalhost:5000hostPort), and pods (via ClusterIP Service).The
--registry-insecure/RegistryInsecureflag was not fully threaded through the docker pusher and credential verification paths —CheckAuthanddocker.Pusheralways defaulted to HTTPS. This caused failures when pushing to plain-HTTP registries likeregistry.localtest.me.The CI config test previously downloaded a released
funcbinary viafunctions-dev/action, which lacked the insecure registry fix. It now patches the generated workflow to symlink the locally-built binary, ensuring the test exercises the current code.Release Note
Docs