Repository navigation
Update module github.com/cert-manager/cert-manager to v1.21.1 - #550
Conversation
Signed-off-by: Renovate Bot <[email protected]>
Signed-off-by: Erik Godding Boye <[email protected]>
Signed-off-by: Erik Godding Boye <[email protected]>
Signed-off-by: Erik Godding Boye <[email protected]>
|
/label tide/merge-method-squash |
There was a problem hiding this comment.
Pull request overview
This PR updates cmctl to work with cert-manager v1.21.1 by bringing the internal conversion API surface (internal + older API versions) up to date with newly introduced fields, along with the corresponding generated deepcopy and conversion code needed to keep conversions/build/tests working.
Changes:
- Bump
github.com/cert-manager/cert-managertov1.21.1(plus related transitive dependency updates). - Extend cert-manager and ACME internal/legacy API types with new v1.21 fields (e.g., certificate renewal config, ACME ARI status, Vault AWS auth, Venafi NGTS, Order
replaces, challenge presented timestamps, etc.). - Update autogenerated deepcopy/conversion code and adjust status-certificate ownership predicates for updated upstream helper signatures.
Reviewed changes
Copilot reviewed 27 out of 39 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/status/certificate/certificate.go | Updates ownership predicate calls to match upstream predicate API changes. |
| pkg/convert/internal/apis/certmanager/zz_generated.deepcopy.go | Regenerated deepcopy logic for newly added internal cert-manager fields/types. |
| pkg/convert/internal/apis/certmanager/v1beta1/zz_generated.deepcopy.go | Regenerated deepcopy logic for v1beta1 cert-manager API types. |
| pkg/convert/internal/apis/certmanager/v1beta1/zz_generated.conversion.go | Registers and implements new v1beta1 ↔ internal cert-manager conversions. |
| pkg/convert/internal/apis/certmanager/v1beta1/types_issuer.go | Adds v1.21 issuer-related fields/types (e.g., Venafi NGTS, Vault AWS auth) to v1beta1. |
| pkg/convert/internal/apis/certmanager/v1beta1/types_certificate.go | Adds v1.21 certificate renewal + ACME ARI status fields/types to v1beta1. |
| pkg/convert/internal/apis/certmanager/v1alpha3/zz_generated.deepcopy.go | Regenerated deepcopy logic for v1alpha3 cert-manager API types. |
| pkg/convert/internal/apis/certmanager/v1alpha3/zz_generated.conversion.go | Registers and implements new v1alpha3 ↔ internal cert-manager conversions. |
| pkg/convert/internal/apis/certmanager/v1alpha3/types_issuer.go | Adds v1.21 issuer-related fields/types to v1alpha3. |
| pkg/convert/internal/apis/certmanager/v1alpha3/types_certificate.go | Adds v1.21 certificate renewal + ACME ARI status fields/types to v1alpha3. |
| pkg/convert/internal/apis/certmanager/v1alpha2/zz_generated.deepcopy.go | Regenerated deepcopy logic for v1alpha2 cert-manager API types. |
| pkg/convert/internal/apis/certmanager/v1alpha2/zz_generated.conversion.go | Registers and implements new v1alpha2 ↔ internal cert-manager conversions. |
| pkg/convert/internal/apis/certmanager/v1alpha2/types_issuer.go | Adds v1.21 issuer-related fields/types to v1alpha2. |
| pkg/convert/internal/apis/certmanager/v1alpha2/types_certificate.go | Adds v1.21 certificate renewal + ACME ARI status fields/types to v1alpha2. |
| pkg/convert/internal/apis/certmanager/types_issuer.go | Mirrors new issuer fields/types on internal cert-manager types. |
| pkg/convert/internal/apis/certmanager/types_certificate.go | Mirrors new certificate renewal + ACME ARI status on internal cert-manager types. |
| pkg/convert/internal/apis/acme/zz_generated.deepcopy.go | Regenerated deepcopy logic for new ACME fields (e.g., presented timestamps, delay settings). |
| pkg/convert/internal/apis/acme/v1beta1/zz_generated.deepcopy.go | Regenerated deepcopy logic for ACME v1beta1 types. |
| pkg/convert/internal/apis/acme/v1beta1/zz_generated.conversion.go | Updates ACME v1beta1 ↔ internal conversions for new fields/types and import aliasing. |
| pkg/convert/internal/apis/acme/v1beta1/types_order.go | Adds v1.21 ACME Order fields/markers (e.g., replaces, list markers). |
| pkg/convert/internal/apis/acme/v1beta1/types_issuer.go | Adds v1.21 ACME issuer solver delay field (waitInsteadOfSelfCheck) and updates docs. |
| pkg/convert/internal/apis/acme/v1beta1/types_challenge.go | Adds v1.21 Challenge status field (presentedAt) and updates docs. |
| pkg/convert/internal/apis/acme/v1alpha3/zz_generated.deepcopy.go | Regenerated deepcopy logic for ACME v1alpha3 types. |
| pkg/convert/internal/apis/acme/v1alpha3/zz_generated.conversion.go | Updates ACME v1alpha3 ↔ internal conversions for new fields/types and import aliasing. |
| pkg/convert/internal/apis/acme/v1alpha3/types_order.go | Adds v1.21 ACME Order fields/markers (e.g., replaces, list markers). |
| pkg/convert/internal/apis/acme/v1alpha3/types_issuer.go | Adds v1.21 ACME issuer solver delay field (waitInsteadOfSelfCheck) and updates docs. |
| pkg/convert/internal/apis/acme/v1alpha3/types_challenge.go | Adds v1.21 Challenge status field (presentedAt) and updates docs. |
| pkg/convert/internal/apis/acme/v1alpha2/zz_generated.deepcopy.go | Regenerated deepcopy logic for ACME v1alpha2 types. |
| pkg/convert/internal/apis/acme/v1alpha2/zz_generated.conversion.go | Updates ACME v1alpha2 ↔ internal conversions for new fields/types and import aliasing. |
| pkg/convert/internal/apis/acme/v1alpha2/types_order.go | Adds v1.21 ACME Order fields/markers (e.g., replaces, list markers). |
| pkg/convert/internal/apis/acme/v1alpha2/types_issuer.go | Adds v1.21 ACME issuer solver delay field (waitInsteadOfSelfCheck) and updates docs. |
| pkg/convert/internal/apis/acme/v1alpha2/types_challenge.go | Adds v1.21 Challenge status field (presentedAt) and updates docs. |
| pkg/convert/internal/apis/acme/v1/zz_generated.conversion.go | Updates ACME v1 ↔ internal conversions for newly added fields and import aliasing. |
| pkg/convert/internal/apis/acme/types_order.go | Mirrors v1.21 ACME Order replaces field in internal types. |
| pkg/convert/internal/apis/acme/types_issuer.go | Mirrors v1.21 ACME solver delay field in internal types. |
| pkg/convert/internal/apis/acme/types_challenge.go | Mirrors v1.21 Challenge status presentedAt field in internal types. |
| go.mod | Bumps cert-manager dependency and updates transitive dependency versions. |
| go.sum | Updates checksums for bumped dependencies. |
Files not reviewed (11)
- pkg/convert/internal/apis/acme/v1/zz_generated.conversion.go: Generated file
- pkg/convert/internal/apis/acme/v1alpha2/zz_generated.conversion.go: Generated file
- pkg/convert/internal/apis/acme/v1alpha2/zz_generated.deepcopy.go: Generated file
- pkg/convert/internal/apis/acme/v1alpha3/zz_generated.conversion.go: Generated file
- pkg/convert/internal/apis/acme/v1alpha3/zz_generated.deepcopy.go: Generated file
- pkg/convert/internal/apis/acme/v1beta1/zz_generated.conversion.go: Generated file
- pkg/convert/internal/apis/acme/v1beta1/zz_generated.deepcopy.go: Generated file
- pkg/convert/internal/apis/acme/zz_generated.deepcopy.go: Generated file
- pkg/convert/internal/apis/certmanager/v1/zz_generated.conversion.go: Generated file
- pkg/convert/internal/apis/certmanager/v1alpha2/zz_generated.conversion.go: Generated file
- pkg/convert/internal/apis/certmanager/v1alpha2/zz_generated.deepcopy.go: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| WindowDuration *metav1.Duration `json:"windowDuration,omitempty"` | ||
|
|
||
| // `cron` is a cron compliant string to allow when the renewal should be allowed. Format is as shown below: | ||
| // * * * * * | ||
| // | | | | | | ||
| // | | | | day of the week (0–6) (Sunday to Saturday; | ||
| // | | | month (1–12) 7 is also Sunday on some systems) | ||
| // | | day of the month (1–31) | ||
| // | hour (0–23) | ||
| // minute (0–59) | ||
| // +kubebuilder:validation:MinLength=1 | ||
| // +required | ||
| Cron string `json:"cron,omitempty"` |
There was a problem hiding this comment.
These fields and their documentation are copied verbatim from upstream cert-manager v1.21.1 (pkg/apis/certmanager/v1) and must remain exact copies — see #445 for prior art. The +required/omitempty combination originates in cert-manager/cert-manager#8258, and the CyberArk wording in cert-manager/cert-manager#8215; any change belongs upstream first.
with claude fable-5
| // +optional | ||
| Timezone string `json:"timezone,omitempty"` | ||
|
|
||
| // `windowDuration` is how long the cron definition is active for. | ||
| // Value must be in units accepted by Go time.ParseDuration https://golang.org/pkg/time/#ParseDuration. | ||
| // +kubebuilder:validation:Type=string | ||
| // +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(s|m|h))+$" | ||
| // +required | ||
| WindowDuration *metav1.Duration `json:"windowDuration,omitempty"` | ||
|
|
||
| // `cron` is a cron compliant string to allow when the renewal should be allowed. Format is as shown below: | ||
| // * * * * * | ||
| // | | | | | |
There was a problem hiding this comment.
Copied verbatim from upstream cert-manager v1.21.1; must remain an exact copy. See #550 (comment).
with claude fable-5
| // | hour (0–23) | ||
| // minute (0–59) | ||
| // +kubebuilder:validation:MinLength=1 | ||
| // +required | ||
| Cron string `json:"cron,omitempty"` | ||
| } | ||
|
|
||
| // CertificateStatus defines the observed state of Certificate | ||
| type CertificateStatus struct { | ||
| // List of status conditions to indicate the status of certificates. | ||
| // Known condition types are `Ready` and `Issuing`. | ||
| // +optional | ||
| // +listType=map |
There was a problem hiding this comment.
Copied verbatim from upstream cert-manager v1.21.1; must remain an exact copy. See #550 (comment).
with claude fable-5
| // TPP specifies CyberArk Certificate Manager Self-Hosted configuration settings. | ||
| // Only one of CyberArk Certificate Manager may be specified. | ||
| // +optional | ||
| TPP *VenafiTPP `json:"tpp,omitempty"` |
There was a problem hiding this comment.
Copied verbatim from upstream cert-manager v1.21.1; must remain an exact copy. See #550 (comment).
with claude fable-5
| // TPP specifies CyberArk Certificate Manager Self-Hosted configuration settings. | ||
| // Only one of CyberArk Certificate Manager may be specified. | ||
| // +optional | ||
| TPP *VenafiTPP `json:"tpp,omitempty"` |
There was a problem hiding this comment.
Copied verbatim from upstream cert-manager v1.21.1; must remain an exact copy. See #550 (comment).
with claude fable-5
| // TPP specifies CyberArk Certificate Manager Self-Hosted configuration settings. | ||
| // Only one of CyberArk Certificate Manager may be specified. | ||
| TPP *VenafiTPP |
There was a problem hiding this comment.
Copied verbatim from upstream cert-manager v1.21.1; must remain an exact copy. See #550 (comment).
with claude fable-5
| // TPP specifies CyberArk Certificate Manager Self-Hosted configuration settings. | ||
| // Only one of CyberArk Certificate Manager may be specified. | ||
| // +optional | ||
| TPP *VenafiTPP `json:"tpp,omitempty"` |
There was a problem hiding this comment.
Copied verbatim from upstream cert-manager v1.21.1; must remain an exact copy. See #550 (comment).
with claude fable-5
|
/cc @inteon |
wallrj
left a comment
There was a problem hiding this comment.
/lgtm
/approve
Thank you, @erikgb — this looks good. I have verified locally that the new fields and their documentation match the upstream cert-manager v1.21.1 sources, that the build succeeds, and that the conversion round-trip fuzz tests in pkg/convert pass.
I have also replied to each of the Copilot review comments: they miss the point that the API fields and their documentation must be copied verbatim from cert-manager, so no change is warranted here — the flagged +required/omitempty combination and the CyberArk wording both originate upstream (cert-manager/cert-manager#8258 and cert-manager/cert-manager#8215 respectively).
One non-blocking observation for a possible follow-up: a few of the pre-existing doc comments on the internal types were not re-synchronised with upstream's internal/apis in this PR. For instance, in pkg/convert/internal/apis/certmanager/types_issuer.go the IssuerConfig.Venafi field doc still reads "Venafi TPP or Venafi Cloud policy zone" and the VenafiTPP type doc still says "Venafi TPP instance", whereas upstream v1.21.1 reworded these for the CyberArk rebranding. There is no functional impact; it merely means the next dependency bump will diff a little noisily against upstream.
with claude fable-5
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: wallrj 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 |
cert-manager v1.21.3 adds a CertID field to CertificateACMEARIStatus in the v1 API. Without a matching field in the internal type, conversion-gen cannot generate the v1 conversion function and the package no longer compiles. Add the field to the internal type and to the v1alpha2, v1alpha3 and v1beta1 copies, following the approach used in #550, then run make generate. Co-Authored-By: Claude Fable 5.1 <[email protected]> Signed-off-by: Richard Wall <[email protected]>
It seems like Renovate needs a lot of help in #524, as all the new API fields introduced in cert-manager 1.21 need to be represented on the internal types and in older API version types.
Building on top of the Renovate PR, I have copied new fields into the internal types, removing kubebuilder markers and JSON annotations. Then I copied the new fields from the v1 APIs into the older API versions.
I had to make a few additional adjustments to make the build/tests pass.