Skip to content

Fix: staging image in production installation#784

Open
panpan0000 wants to merge 2 commits intokubernetes-sigs:mainfrom
panpan0000:fix-image
Open

Fix: staging image in production installation#784
panpan0000 wants to merge 2 commits intokubernetes-sigs:mainfrom
panpan0000:fix-image

Conversation

@panpan0000
Copy link
Contributor

@panpan0000 panpan0000 commented Mar 20, 2026

What type of PR is this?

/kind bug

What this PR does / why we need it

When follow the doc, to downloading manifests from the release page and running:

kubectl apply -f https://github.com/kubernetes-sigs/lws/releases/download/$VERSION/manifests.yaml

The controller image points to the staging registry (us-central1-docker.pkg.dev/k8s-staging-images/lws/lws:v0.8.0) instead of the official registry.k8s.io/lws/lws:v0.8.0.

Root cause:

The clean-manifests function in the Makefile hardcodes the staging registry:

clean-manifests = (cd config/manager && $(KUSTOMIZE) edit set image controller=us-central1-docker.pkg.dev/k8s-staging-images/lws/lws:$(RELEASE_BRANCH))

This function is called by both prepare-release-branch and artifacts targets. It reverts config/manager/kustomization.yaml to the staging image after building the release artifacts, and this gets committed to the release branch.

Fix:

Change clean-manifests to use registry.k8s.io with the default main tag:

clean-manifests = (cd config/manager && $(KUSTOMIZE) edit set image controller=registry.k8s.io/lws/lws:main)

This ensures the kustomization file always points to the official registry after building artifacts.

Test results:

# Run: 

make artifacts IMG=registry.k8s.io/lws/lws:v0.8.0

# manifests.yaml correctly uses the release image:
$ grep "registry.k8s.io" artifacts/manifests.yaml
        image: registry.k8s.io/lws/lws:v0.8.0

# kustomization.yaml now points to official registry (not staging):
$ cat config/manager/kustomization.yaml
images:
- name: controller
  newName: registry.k8s.io/lws/lws
  newTag: main

This does not affect local development - developers still work with the staging registry by default when building locally.

@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Mar 20, 2026
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: panpan0000
Once this PR has been reviewed and has the lgtm label, please assign ahg-g for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

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

@netlify
Copy link

netlify bot commented Mar 20, 2026

Deploy Preview for kubernetes-sigs-lws ready!

Name Link
🔨 Latest commit b47311c
🔍 Latest deploy log https://app.netlify.com/projects/kubernetes-sigs-lws/deploys/69c0b73dfa15b20008c37865
😎 Deploy Preview https://deploy-preview-784--kubernetes-sigs-lws.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 20, 2026
@k8s-ci-robot
Copy link
Contributor

Hi @panpan0000. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Tip

We noticed you've done this a few times! Consider joining the org to skip this step and gain /lgtm and other bot rights. We recommend asking approvers on your previous PRs to sponsor you.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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.

@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Mar 20, 2026
@Edwinhr716
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 20, 2026
Signed-off-by: Peter Pan <Peter.Pan@daocloud.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants