Skip to content

cert-manager: build crd-model-gen image locally in update.sh#4751

Open
YuqiGuo105 wants to merge 1 commit into
kubernetes-client:masterfrom
YuqiGuo105:feat/managed-fields-include-toggle
Open

cert-manager: build crd-model-gen image locally in update.sh#4751
YuqiGuo105 wants to merge 1 commit into
kubernetes-client:masterfrom
YuqiGuo105:feat/managed-fields-include-toggle

Conversation

@YuqiGuo105
Copy link
Copy Markdown
Contributor

@YuqiGuo105 YuqiGuo105 commented May 12, 2026

Background

Issue #3489 has two distinct problems mixed together. The original report (V1 cert-manager models missing from the published jar) was already addressed on master long ago: client-java-contrib/cert-manager/src/main/java/io/cert/manager/models/ now contains 109 V1-only types, with no V1alpha*/V1beta* classes left. So that part doesn't need a code change.

This PR addresses the other problem raised in the comments on #3489: contributors who try to follow the README and run ./update.sh are blocked at the first step because docker pulls fail with Access is denied. The default image referenced by update.sh,

docker.pkg.github.com/kubernetes-client/java/crd-model-gen:v2.0.0

lives on a registry that requires GitHub authentication, so anonymous pulls do not work. This was reported by @vaidikcode and @AyushSinha-6409 in the issue thread.

Changes

  • client-java-contrib/cert-manager/update.sh: detect the missing image at runtime and build it locally from the Dockerfile already shipped in client-java-contrib/, defaulting to local/crd-model-gen:latest. IMAGE_NAME and IMAGE_TAG can still be overridden to use a prebuilt image.
  • client-java-contrib/cert-manager/README.md: refresh the dependency snippet and compatibility table so they match the current artifact version (27.0.0-SNAPSHOT) and the v1.13.4 CRD URL already used by update.sh. No regeneration of model classes is included; the existing V1 classes on master are unchanged.

Verification

Running ./update.sh from a clean checkout (with no prebuilt image present) now builds local/crd-model-gen:latest from the in-tree Dockerfile and proceeds with the generation pipeline without contacting the private registry.

Refs: #3489

@k8s-ci-robot k8s-ci-robot added do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels May 12, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: YuqiGuo105
Once this PR has been reviewed and has the lgtm label, please assign yue9944882 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

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label May 12, 2026
@YuqiGuo105 YuqiGuo105 force-pushed the feat/managed-fields-include-toggle branch from cefaf63 to ea16f5f Compare May 12, 2026 02:58
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. label May 12, 2026
@brendandburns
Copy link
Copy Markdown
Contributor

I don't think this change includes what you are thinking, it doesn't remove an alpha files.

The default crd-model-gen image referenced by update.sh lives on
docker.pkg.github.com, which requires GitHub authentication. Anonymous
docker pulls fail with "Access is denied", so contributors who try to
follow the README cannot run update.sh out of the box (reported by
multiple users in the comments on issue 3489).

Detect the missing image at runtime and build it locally from the
Dockerfile shipped in client-java-contrib/, defaulting to
local/crd-model-gen:latest. IMAGE_NAME and IMAGE_TAG can still be set
to point at a prebuilt image.

Also refresh README.md so the dependency snippet and compatibility
table match the current artifact version (27.0.0-SNAPSHOT) and the
v1.13.4 CRD URL already used by update.sh.
@YuqiGuo105 YuqiGuo105 force-pushed the feat/managed-fields-include-toggle branch from ea16f5f to 9ba7c60 Compare May 13, 2026 03:18
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 13, 2026
@YuqiGuo105 YuqiGuo105 changed the title cert-manager: regenerate models from v1.13.4 CRDs cert-manager: build crd-model-gen image locally in update.sh May 13, 2026
@YuqiGuo105 YuqiGuo105 marked this pull request as draft May 13, 2026 03:36
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 13, 2026
@YuqiGuo105 YuqiGuo105 marked this pull request as ready for review May 13, 2026 04:07
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 13, 2026
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. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants