@@ -409,10 +409,30 @@ func (r *Reconciler) Reconcile() (reconcile.Result, error) {
409
409
}
410
410
}
411
411
412
+ /*
413
+ This code is problematic due to the way other parts of the product work.
414
+ On the core side, get_unsecured_agent() relies on the presence of the NODE_EXTRA_CA_CERTS
415
+ environment variable to determine whether an HTTP or HTTPS client should be used.
416
+
417
+ At the time of writing this comment, if the environment variable is not set, an HTTP agent
418
+ will be used for *all* S3-compatible domains that aren't under amazonaws.com - including
419
+ domains that are already present by default in the system's certificate store.
420
+
421
+ Forcing the environment variable to always be set leads to a different problem where
422
+ some things might fail - e.g. the admission tests that rely on creating a namespacestore
423
+ that points towards NooBaa's (self-signed) S3 service. In that case, the HTTPS agent fails
424
+ due to the self-signed certificate.
425
+
426
+ Also, note that the code that combines certificates only applies to the operator.
427
+ Based on whether the certificate bundling was successful, the operator will set the value of
428
+ NODE_EXTRA_CA_CERTS in endpoints and core pods to point to *the system generated service-serving certs*.
429
+
430
+ At the time of writing, user certs are not included at any point.
431
+ */
432
+
412
433
err = util .CombineCaBundle (util .ServiceServingCertCAFile )
413
434
if err == nil {
414
- // r.ApplyCAsToPods = util.InjectedBundleCertCAFile
415
- r .ApplyCAsToPods = util .ServiceServingCertCAFile // back as it was
435
+ r .ApplyCAsToPods = util .ServiceServingCertCAFile
416
436
} else if ! os .IsNotExist (err ) {
417
437
log .Errorf ("❌ NooBaa %q failed to add root CAs to system default" , r .NooBaa .Name )
418
438
res .RequeueAfter = 3 * time .Second
0 commit comments