Skip to content

test: migrate testing registry from host container to in-cluster deployment#3718

Merged
knative-prow[bot] merged 3 commits into
knative:mainfrom
matejvasek:registry-in-cluster
May 15, 2026
Merged

test: migrate testing registry from host container to in-cluster deployment#3718
knative-prow[bot] merged 3 commits into
knative:mainfrom
matejvasek:registry-in-cluster

Conversation

@matejvasek
Copy link
Copy Markdown
Contributor

@matejvasek matejvasek commented May 13, 2026

Changes

  • 🧹 Replace the standalone docker/podman registry container (localhost:50000) with an in-cluster Deployment + ClusterIP Service + Ingress at registry.localtest.me
  • 🎁 Add insecure registry support to credential verification and docker push paths (CheckAuth, docker.Pusher, NewCredentialsProvider, checkPullPermissions) so --registry-insecure properly uses HTTP
  • 🧹 Update hack/allow-insecure.tar to include *.localtest.me for buildah/podman tools
  • 🧹 E2E tests set FUNC_REGISTRY_INSECURE=true centrally in setupEnv when using registry.localtest.me
  • 🧹 CI config test patches the generated workflow to use the locally-built func binary instead of downloading a release via functions-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:50000 vs. 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 to localhost:5000 hostPort), and pods (via ClusterIP Service).

The --registry-insecure / RegistryInsecure flag was not fully threaded through the docker pusher and credential verification paths — CheckAuth and docker.Pusher always defaulted to HTTPS. This caused failures when pushing to plain-HTTP registries like registry.localtest.me.

The CI config test previously downloaded a released func binary via functions-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

Fix --registry-insecure flag not being fully propagated: credential verification (CheckAuth) and the docker pusher always defaulted to HTTPS even when the flag was set, causing failures against plain-HTTP registries. The flag now correctly switches to HTTP scheme throughout the push and credential check paths.

Docs

NONE

@knative-prow
Copy link
Copy Markdown

knative-prow Bot commented May 13, 2026

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@knative-prow
Copy link
Copy Markdown

knative-prow Bot commented May 13, 2026

@matejvasek: The label(s) kind/<kind> cannot be applied, because the repository doesn't have them.

Details

In response to this:

…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 the need for host-side container management, ExternalName services, and Podman VM port forwarding.

The single URL registry.localtest.me is reachable from the host, Kind nodes (via localtest.me → 127.0.0.1 public DNS), and pods (via Contour ingress). Containerd mirrors for ghcr.io, quay.io, and registry.default.svc.cluster.local are preserved, pointing to the new ingress endpoint.

E2E remote tests now use --registry-insecure for 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.

Changes

/kind

Fixes #

Release Note


Docs


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.

@knative-prow knative-prow Bot added the do-not-merge/work-in-progress 🤖 PR should not merge because it is a work in progress. label May 13, 2026
@knative-prow knative-prow Bot requested review from dsimansk and jrangelramos May 13, 2026 14:23
@knative-prow knative-prow Bot added approved 🤖 PR has been approved by an approver from all required OWNERS files. size/L 🤖 PR changes 100-499 lines, ignoring generated files. labels May 13, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 57.05%. Comparing base (e435a89) to head (7931004).
⚠️ Report is 7 commits behind head on main.

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     
Flag Coverage Δ
e2e 35.92% <93.18%> (+0.10%) ⬆️
e2e go 31.47% <92.30%> (-0.96%) ⬇️
e2e node 27.23% <92.30%> (-0.97%) ⬇️
e2e python 31.84% <92.30%> (-0.96%) ⬇️
e2e quarkus 27.37% <92.30%> (-0.97%) ⬇️
e2e rust 26.78% <87.17%> (?)
e2e springboot 25.29% <87.17%> (-0.97%) ⬇️
e2e typescript 27.36% <92.30%> (-0.97%) ⬇️
e2e-config-ci 28.31% <87.17%> (+10.60%) ⬆️
integration 17.38% <12.82%> (+0.08%) ⬆️
unit macos-14 45.04% <61.53%> (-0.01%) ⬇️
unit macos-latest 45.04% <61.53%> (-0.01%) ⬇️
unit ubuntu-24.04-arm 45.30% <54.54%> (-0.02%) ⬇️
unit ubuntu-latest 46.00% <61.53%> (-0.01%) ⬇️
unit windows-latest 45.09% <61.53%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@matejvasek matejvasek force-pushed the registry-in-cluster branch from 47f1429 to 3b1c9e6 Compare May 13, 2026 22:17
…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>
@matejvasek matejvasek force-pushed the registry-in-cluster branch from 3b1c9e6 to 15f23a5 Compare May 13, 2026 22:30
@matejvasek matejvasek changed the title [WIP] test: migrate testing registry from host container to in-cluster depl… test: migrate testing registry from host container to in-cluster deployment May 13, 2026
@matejvasek matejvasek requested review from gauron99 and lkingland May 13, 2026 22:32
@matejvasek matejvasek marked this pull request as ready for review May 13, 2026 22:32
@knative-prow knative-prow Bot removed the do-not-merge/work-in-progress 🤖 PR should not merge because it is a work in progress. label May 13, 2026
@matejvasek
Copy link
Copy Markdown
Contributor Author

PTAL @gauron99 @lkingland

matejvasek and others added 2 commits May 14, 2026 03:17
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>
@gauron99
Copy link
Copy Markdown
Contributor

/lgtm
/approve

@knative-prow knative-prow Bot added the lgtm 🤖 PR is ready to be merged. label May 15, 2026
@knative-prow
Copy link
Copy Markdown

knative-prow Bot commented May 15, 2026

[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

Details Needs approval from an approver in each of these files:
  • OWNERS [gauron99,matejvasek]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow knative-prow Bot merged commit 3c30be1 into knative:main May 15, 2026
144 of 148 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved 🤖 PR has been approved by an approver from all required OWNERS files. lgtm 🤖 PR is ready to be merged. size/L 🤖 PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants