Skip to content

Commit 8ef9735

Browse files
committed
Add clarification
Signed-off-by: Ben <[email protected]>
1 parent 5208cbe commit 8ef9735

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

pkg/system/reconciler.go

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,10 +409,30 @@ func (r *Reconciler) Reconcile() (reconcile.Result, error) {
409409
}
410410
}
411411

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+
412433
err = util.CombineCaBundle(util.ServiceServingCertCAFile)
413434
if err == nil {
414-
// r.ApplyCAsToPods = util.InjectedBundleCertCAFile
415-
r.ApplyCAsToPods = util.ServiceServingCertCAFile // back as it was
435+
r.ApplyCAsToPods = util.ServiceServingCertCAFile
416436
} else if !os.IsNotExist(err) {
417437
log.Errorf("❌ NooBaa %q failed to add root CAs to system default", r.NooBaa.Name)
418438
res.RequeueAfter = 3 * time.Second

0 commit comments

Comments
 (0)