New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Directly import cert-manager in cmctl #6049
Conversation
Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you Ashley, this makes sense.
So we'll refer to a commit hash of cert-manager in cmctl and this will allow us to bundle cert-manager and cmctl under the same tag for the ease of consumption
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: irbekrm, SgtCoDFish The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/cherry-pick release-1.12 |
@irbekrm: new pull request created: #6050 In 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/test-infra repository. |
Out of curiosity, why would we need to support "importing cmctl"? (I probably missed the discussion in which this was discussed.) Do you mean that some people have the following import statement in one of their Go files: import github.com/cert-manager/cert-manager/cmd/ctl I can't see myself importing a CLI package 😅 Or is the intent to make it possible to use "go install"? E.g., go install github.com/jetstack/cert-manager/cmd/ctl@v1.12.0 If the goal is to make it "go install"-able, then this change makes sense. |
Ouch, I forgot about importing binary tools in |
require ( | ||
github.com/cert-manager/cert-manager v0.0.0-00010101000000-000000000000 | ||
github.com/cert-manager/cert-manager v1.12.0-beta.1.0.20230510114354-4959b1ce1a71 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I want to make a change to cert-manager/cert-manager (say, adding a new function), and then also want to make use of that function in the cmctl package/module, will I need to split my PR into two to make it possible to do because of this? e.g., first PR adds the function to the cert-manager/cert-manager module, and then a second PR updates the revision pointed to here and actually makes use of the function?
As there's no way to set this string to the correct value within a single PR....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that is the case, but we want to split cmctl out anyway
At the moment it is like this because of wanting to support go install-ing this/importing it in tools
This PR contains the following updates: | Package | Update | Change | |---|---|---| | [cert-manager](https://github.com/cert-manager/cert-manager) | minor | `v1.12.4` -> `v1.13.0` | --- ### Release Notes <details> <summary>cert-manager/cert-manager (cert-manager)</summary> ### [`v1.13.0`](https://github.com/cert-manager/cert-manager/releases/tag/v1.13.0) [Compare Source](cert-manager/cert-manager@v1.12.4...v1.13.0) cert-manager is the easiest way to automatically manage certificates in Kubernetes and OpenShift clusters. This is the 1.13 release of cert-manager! #### Community Welcome to these new cert-manager members (more info - cert-manager/cert-manager#6260): [@​jsoref](https://github.com/jsoref) [@​FlorianLiebhart](https://github.com/FlorianLiebhart) [@​hawksight](https://github.com/hawksight) [@​erikgb](https://github.com/erikgb) Thanks again to all open-source contributors with commits in this release, including: [@​AcidLeroy](https://github.com/AcidLeroy) [@​FlorianLiebhart](https://github.com/FlorianLiebhart) [@​lucacome](https://github.com/lucacome) [@​cypres](https://github.com/cypres) [@​erikgb](https://github.com/erikgb) [@​ubergesundheit](https://github.com/ubergesundheit) [@​jkroepke](https://github.com/jkroepke) [@​jsoref](https://github.com/jsoref) [@​gdvalle](https://github.com/gdvalle) [@​rouke-broersma](https://github.com/rouke-broersma) [@​schrodit](https://github.com/schrodit) [@​zhangzhiqiangcs](https://github.com/zhangzhiqiangcs) [@​arukiidou](https://github.com/arukiidou) [@​hawksight](https://github.com/hawksight) [@​Richardds](https://github.com/Richardds) [@​kahirokunn](https://github.com/kahirokunn) Thanks also to the following cert-manager maintainers for their contributions during this release: [@​SgtCoDFish](https://github.com/SgtCoDFish) [@​maelvls](https://github.com/maelvls) [@​irbekrm](https://github.com/irbekrm) [@​inteon](https://github.com/inteon) Equally thanks to everyone who provided feedback, helped users and raised issues on Github and Slack and joined our meetings! Special thanks to [@​AcidLeroy](https://github.com/AcidLeroy) for adding "load options from a versioned config file" support for the cert-manager controller! This has been on our wishlist for a very long time. (see cert-manager/cert-manager#5337) Also, thanks a lot to [@​FlorianLiebhart](https://github.com/FlorianLiebhart) for adding support for DNS over HTTPS for the ACME DNS self-check. This is very useful in case all traffic must be HTTP(S) trafic, eg. when using a HTTPS_PROXY. (see cert-manager/cert-manager#5003) Thanks also to the [CNCF](https://www.cncf.io/), which provides resources and support, and to the AWS open source team for being good community members and for their maintenance of the [PrivateCA Issuer](https://github.com/cert-manager/aws-privateca-issuer). In addition, massive thanks to [Venafi](https://www.venafi.com/) for contributing developer time and resources towards the continued maintenance of cert-manager projects. #### Changes since v1.12.0 ##### Feature - Add support for logging options to webhook config file. ([#​6243](cert-manager/cert-manager#6243), [@​inteon](https://github.com/inteon)) - Add view permissions to the well-known (Openshift) user-facing `cluster-reader` aggregated cluster role ([#​6241](cert-manager/cert-manager#6241), [@​erikgb](https://github.com/erikgb)) - Certificate Shim: distinguish dns names and ip address in certificate ([#​6267](cert-manager/cert-manager#6267), [@​zhangzhiqiangcs](https://github.com/zhangzhiqiangcs)) - Cmctl can now be imported by third parties. ([#​6049](cert-manager/cert-manager#6049), [@​SgtCoDFish](https://github.com/SgtCoDFish)) - Make `enableServiceLinks` configurable for all Deployments and `startupapicheck` Job in Helm chart. ([#​6292](cert-manager/cert-manager#6292), [@​ubergesundheit](https://github.com/ubergesundheit)) - Promoted the StableCertificateRequestName and SecretsFilteredCaching feature gates to Beta (enabled by default). ([#​6298](cert-manager/cert-manager#6298), [@​inteon](https://github.com/inteon)) - The cert-manager controller options are now configurable using a configuration file. ([#​5337](cert-manager/cert-manager#5337), [@​AcidLeroy](https://github.com/AcidLeroy)) - The pki CertificateTemplate functions now perform validation of the CSR blob, making sure we sign a Certificate that matches the IsCA and (Extended)KeyUsages that are defined in the CertificateRequest resource. ([#​6199](cert-manager/cert-manager#6199), [@​inteon](https://github.com/inteon)) - \[helm] Add prometheus.servicemonitor.endpointAdditionalProperties to define additional properties on a ServiceMonitor endpoint, e.g. relabelings ([#​6110](cert-manager/cert-manager#6110), [@​jkroepke](https://github.com/jkroepke)) ##### Design - DNS over HTTPS (DoH) is now possible for doing the self-checks during the ACME verification. The DNS check method to be used is controlled through the command line flag: `--dns01-recursive-nameservers-only=true` in combination with `--dns01-recursive-nameservers=https://<DoH-endpoint>` (e.g. `https://8.8.8.8/dns-query`). It keeps using DNS lookup as a default method. ([#​5003](cert-manager/cert-manager#5003), [@​FlorianLiebhart](https://github.com/FlorianLiebhart)) ##### Bug or Regression - Allow overriding default pdb .minAvailable with .maxUnavailable without setting .minAvailable to null ([#​6087](cert-manager/cert-manager#6087), [@​rouke-broersma](https://github.com/rouke-broersma)) - BUGFIX: `cmctl check api --wait 0` exited without output and exit code 1; we now make sure we perform the API check at least once and return with the correct error code ([#​6109](cert-manager/cert-manager#6109), [@​inteon](https://github.com/inteon)) - BUGFIX: the issuer and certificate-name annotations on a Secret were incorrectly updated when other fields are changed. ([#​6147](cert-manager/cert-manager#6147), [@​inteon](https://github.com/inteon)) - BUGFIX\[cainjector]: 1-character bug was causing invalid log messages and a memory leak ([#​6232](cert-manager/cert-manager#6232), [@​inteon](https://github.com/inteon)) - Fix CloudDNS issuers stuck in propagation check, when multiple instances are issuing for the same FQDN ([#​6088](cert-manager/cert-manager#6088), [@​cypres](https://github.com/cypres)) - Fix indentation of Webhook NetworkPolicy matchLabels in helm chart. ([#​6220](cert-manager/cert-manager#6220), [@​ubergesundheit](https://github.com/ubergesundheit)) - Fixed Cloudflare DNS01 challenge provider race condition when validating multiple domains ([#​6191](cert-manager/cert-manager#6191), [@​Richardds](https://github.com/Richardds)) - Fixes a bug where webhook was pulling in controller's feature gates.⚠️ ⚠️ BREAKING⚠️ ⚠️ : If you deploy cert-manager using helm and have `.featureGates` value set, the features defined there will no longer be passed to cert-manager webhook, only to cert-manager controller. Use `webhook.featureGates` field instead to define features to be enabled on webhook. **Potentially breaking**: If you were, for some reason, passing cert-manager controller's features to webhook's `--feature-gates` flag, this will now break (unless the webhook actually has a feature by that name). ([#​6093](cert-manager/cert-manager#6093), [@​irbekrm](https://github.com/irbekrm)) - Fixes an issue where cert-manager would incorrectly reject two IP addresses as being unequal when they should have compared equal. This would be most noticeable when using an IPv6 address which doesn't match how Go's `net.IP.String()` function would have printed that address. ([#​6293](cert-manager/cert-manager#6293), [@​SgtCoDFish](https://github.com/SgtCoDFish)) - We disabled the `enableServiceLinks` option for our ACME http solver pods, because the option caused the pod to be in a crash loop in a cluster with lot of services. ([#​6143](cert-manager/cert-manager#6143), [@​schrodit](https://github.com/schrodit)) -⚠️ possibly breaking: Webhook validation of CertificateRequest resources is stricter now: all KeyUsages and ExtendedKeyUsages must be defined directly in the CertificateRequest resource, the encoded CSR can never contain more usages that defined there. ([#​6182](cert-manager/cert-manager#6182), [@​inteon](https://github.com/inteon)) ##### Other (Cleanup or Flake) - A subset of the klogs flags have been deprecated and will be removed in the future. ([#​5879](cert-manager/cert-manager#5879), [@​maelvls](https://github.com/maelvls)) - All service links in helm chart deployments have been disabled. ([#​6144](cert-manager/cert-manager#6144), [@​schrodit](https://github.com/schrodit)) - Cert-manager will now re-issue a certificate if the public key in the latest CertificateRequest resource linked to a Certificate resource does not match the public key of the key encoded in the Secret linked to that Certificate resource ([#​6168](cert-manager/cert-manager#6168), [@​inteon](https://github.com/inteon)) - Chore: When hostNetwork is enabled, dnsPolicy is now set to ClusterFirstWithHostNet. ([#​6156](cert-manager/cert-manager#6156), [@​kahirokunn](https://github.com/kahirokunn)) - Cleanup the controller configfile structure by introducing sub-structs. ([#​6242](cert-manager/cert-manager#6242), [@​inteon](https://github.com/inteon)) - Don't run API Priority and Fairness controller in webhook's extension apiserver ([#​6085](cert-manager/cert-manager#6085), [@​irbekrm](https://github.com/irbekrm)) - Helm: Add apache 2.0 license annotation ([#​6225](cert-manager/cert-manager#6225), [@​arukiidou](https://github.com/arukiidou)) - Make apis/acme/v1/ACMEIssuer.PreferredChain optional in JSON serialization. ([#​6034](cert-manager/cert-manager#6034), [@​gdvalle](https://github.com/gdvalle)) - The SecretPostIssuancePolicyChain now also makes sure that the `cert-manager.io/common-name`, `cert-manager.io/alt-names`, ... annotations on Secrets are kept at their correct value. ([#​6176](cert-manager/cert-manager#6176), [@​inteon](https://github.com/inteon)) - The cmctl logging has been improved and support for json logging has been added. ([#​6247](cert-manager/cert-manager#6247), [@​inteon](https://github.com/inteon)) - Updates Kubernetes libraries to `v0.27.2`. ([#​6077](cert-manager/cert-manager#6077), [@​lucacome](https://github.com/lucacome)) - Updates Kubernetes libraries to `v0.27.4`. ([#​6227](cert-manager/cert-manager#6227), [@​lucacome](https://github.com/lucacome)) - We now only check that the issuer name, kind and group annotations on a Secret match in case those annotations are set. ([#​6152](cert-manager/cert-manager#6152), [@​inteon](https://github.com/inteon)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi4yMy4yIiwidXBkYXRlZEluVmVyIjoiMzYuMjMuMiIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> Reviewed-on: https://git.home/nrdufour/home-ops/pulls/84 Co-authored-by: Renovate <renovate@ptinem.io> Co-committed-by: Renovate <renovate@ptinem.io>
Pull Request Motivation
Related to #6047 and #6041
This PR depended on cert-manager/release#127 , which has now merged.
We want to preserve the ability for other projects to import cmctl as a module. This implies that we can't have a local filesystem replacement for the core cert-manager module in cmctl, and that cmctl must depend on an explicitly specified version of cert-manager.
Eventually we'd like cmctl to be moved to its own repo, but that's too much work right now.
Since the integration tests depend on cmctl, they also pick up an actual version of cert-manager in their go.mod file from this change. That shouldn't matter, since they still have a replace statement for cert-manager.
Kind
/kind feature
Release Note