-
Notifications
You must be signed in to change notification settings - Fork 604
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
Trust-manager integration #7532
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: pierDipi 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 |
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
a420355
to
f69b0fa
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #7532 +/- ##
==========================================
- Coverage 75.57% 74.54% -1.03%
==========================================
Files 261 262 +1
Lines 14668 14954 +286
==========================================
+ Hits 11085 11148 +63
- Misses 3004 3218 +214
- Partials 579 588 +9 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
…figmaps Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
…in SB reconciler Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
23034ad
to
b1bc237
Compare
/test conformance-tests |
@creydr can you please take a look again? |
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.
Looking good. Only one nit. Thanks for addressing this!
/lgtm
/hold
Holding in case you want more reviews or want to address the nit. Feel free to unhold otherwise.
@creydr I will address the nit in the follow up PR when implementing "bundle certs rotation in in-use clients" /unhold |
This is the data plane only part related to the trust-manager integration: knative/eventing#7532 Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
This is the data plane only part related to the trust-manager integration: knative/eventing#7532 Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
This is the data plane only part related to the trust-manager integration: knative/eventing#7532 Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
This is the data plane only part related to the trust-manager integration: knative/eventing#7532 Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
* Trust-manager integration Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Add E2E tests Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Fix linter and format Go code Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Upgrade rekt Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Reference Eventing CA issuer in E2E tests Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Force GVK in sources when propagating trust bundle Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Format Go code Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * SinkBinding reconciler needs to create/update/delete trust bundle configmaps Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Upgrade rekt deps Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Add Deployment volumes for SinkBinding tests Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Fix CA certs bundle and https endpoint assertions Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Pass TrustBundleConfigMapLister in PingSource runner Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Fix adapter create informer logic for trust bundle ConfigMaps Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Remove propagate configmaps in ContainerSource reconciler as is done in SB reconciler Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Inject trust bundles as volumes in sinkbinding reconciler Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Inject trust-bundle to SinkBinding subjects Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Fix lister ctx injection Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> --------- Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
* Trust-manager integration Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Add E2E tests Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Fix linter and format Go code Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Upgrade rekt Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Reference Eventing CA issuer in E2E tests Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Force GVK in sources when propagating trust bundle Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Format Go code Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * SinkBinding reconciler needs to create/update/delete trust bundle configmaps Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Upgrade rekt deps Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Add Deployment volumes for SinkBinding tests Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Fix CA certs bundle and https endpoint assertions Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Pass TrustBundleConfigMapLister in PingSource runner Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Fix adapter create informer logic for trust bundle ConfigMaps Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Remove propagate configmaps in ContainerSource reconciler as is done in SB reconciler Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Inject trust bundles as volumes in sinkbinding reconciler Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Inject trust-bundle to SinkBinding subjects Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Fix lister ctx injection Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> --------- Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
* Trust-manager integration Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Add E2E tests Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Fix linter and format Go code Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Upgrade rekt Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Reference Eventing CA issuer in E2E tests Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Force GVK in sources when propagating trust bundle Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Format Go code Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * SinkBinding reconciler needs to create/update/delete trust bundle configmaps Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Upgrade rekt deps Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Add Deployment volumes for SinkBinding tests Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Fix CA certs bundle and https endpoint assertions Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Pass TrustBundleConfigMapLister in PingSource runner Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Fix adapter create informer logic for trust bundle ConfigMaps Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Remove propagate configmaps in ContainerSource reconciler as is done in SB reconciler Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Inject trust bundles as volumes in sinkbinding reconciler Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Inject trust-bundle to SinkBinding subjects Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Fix lister ctx injection Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> --------- Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
* Label OpenShift CA trust bundle as Knative trust bundle Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Trust-manager integration (knative#7532) * Trust-manager integration Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Add E2E tests Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Fix linter and format Go code Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Upgrade rekt Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Reference Eventing CA issuer in E2E tests Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Force GVK in sources when propagating trust bundle Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Format Go code Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * SinkBinding reconciler needs to create/update/delete trust bundle configmaps Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Upgrade rekt deps Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Add Deployment volumes for SinkBinding tests Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Fix CA certs bundle and https endpoint assertions Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Pass TrustBundleConfigMapLister in PingSource runner Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Fix adapter create informer logic for trust bundle ConfigMaps Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Remove propagate configmaps in ContainerSource reconciler as is done in SB reconciler Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Inject trust bundles as volumes in sinkbinding reconciler Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Inject trust-bundle to SinkBinding subjects Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Fix lister ctx injection Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> --------- Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Reload trust-bundle on new connections (knative#7567) This allows administrators to dynamically add trust-bundles that are picked by clients when connecting to new hosts. Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Actually run TLS tests Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Run generate-release Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Create trust bundle ConfigMap manually Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Assign global resync Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Fix regex Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * User-provided issuers and CA certificate Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Fix configmap -> secret Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Label bundle configmap Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Base64 decode CA certs Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Remove install script Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Use projected volumes Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Create bundle on install_serverless so it's always done Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> --------- Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
…nsions#3594) This is the data plane only part related to the trust-manager integration: knative/eventing#7532 Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
* Support adding trust bundles to data place HTTP clients (knative-extensions#3594) This is the data plane only part related to the trust-manager integration: knative/eventing#7532 Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Propagate trust bundles in the data plane contract (knative-extensions#3605) * Propagate trust bundles in the data plane contract This is the follow up to knative-extensions#3594 for the control plane reconcilers. - Refactor prober's clients to use `DialTLSContext` to dynamically pass TLS config based on the current values of the trust bundles + CACerts field Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Add E2E tests Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Add consumer group and consumer CA certs status propagation Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Add comment to clarify PEM trust bundle validation Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Format code Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Set subscriberCACerts when scaled to 0 Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Add CA certs fields to KafkaChannel CRD Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Pass CA certs to contract for channel Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> --------- Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Skip KafkaSource TLS tests on Istio (knative-extensions#3633) * Skip KafkaSource TLS tests on Istio * Run goimport * Use midstream as eventing dependency Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Use new issuer Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Add configuration for E2E tests Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> * Use Class instead of record Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> --------- Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> Co-authored-by: Christoph Stäbler <cstabler@redhat.com>
helm repo add jetstack https://charts.jetstack.io --force-update | ||
kubectl create namespace --dry-run=client cert-manager -oyaml > third_party/cert-manager/00-namespace.yaml | ||
helm template -n cert-manager cert-manager jetstack/cert-manager --create-namespace --version "${cert_manager_version}" --set installCRDs=true > third_party/cert-manager/01-cert-manager.yaml | ||
helm template -n cert-manager cert-manager jetstack/trust-manager --create-namespace --version "${trust_manager_version}" --set installCRDs=true > third_party/cert-manager/02-trust-manager.yaml |
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.
helm
with version earlier than v3.13 has some bugs, as it cannot detect the right kubernetes version.
Error: chart requires kubeVersion: >= 1.22.0-0 which is incompatible with Kubernetes v1.20.0
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.
@Leo6Leo where did you see it? In CI we don't have this problem (as we use always the latest helm 3 version): https://github.com/knative-extensions/knobots/actions/runs/7719799980/job/21043681810
When it's locally, can up update?
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.
helm template doesn't run against a cluster, it's just rendering the template
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.
Add support for trust-manager.
This will allow administrators to add trusted CA bundles to Eventing components by creating ConfigMaps labeled
networking.knative.dev/trust-bundle=true
in theknative-eventing
namespace.For now, the rotation is not yet implemented, for that we would need to re-create clients when trusted bundles change
TODO:
Fixes #
Proposed Changes
Pre-review Checklist
Release Note
Docs