From 648689f8b009f373ce80ca458520b2a198688dc9 Mon Sep 17 00:00:00 2001 From: Jan Stourac Date: Thu, 17 Oct 2024 16:29:55 +0200 Subject: [PATCH] [RHOAIENG-11895] fix(odh-nbc): put a newline between certs in case input is missing a newline (#411) In case that the source of the certificates doesn't contain newline, this will assure that at least one new line is between the concatenated certificates. In case that the new line in the source is present already, then there will be two new lines now, but it shouldn't be a problem as it shouldn't break anything for us. This fixes [1]. * [1] https://issues.redhat.com/browse/RHOAIENG-11895 --- .../odh-notebook-controller/controllers/notebook_controller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/odh-notebook-controller/controllers/notebook_controller.go b/components/odh-notebook-controller/controllers/notebook_controller.go index 8e83dd2c273..cce2e87386f 100644 --- a/components/odh-notebook-controller/controllers/notebook_controller.go +++ b/components/odh-notebook-controller/controllers/notebook_controller.go @@ -304,7 +304,7 @@ func (r *OpenshiftNotebookReconciler) CreateNotebookCertConfigMap(notebook *nbv1 Labels: map[string]string{"opendatahub.io/managed-by": "workbenches"}, }, Data: map[string]string{ - "ca-bundle.crt": string(bytes.Join(rootCertPool, []byte{})), + "ca-bundle.crt": string(bytes.Join(rootCertPool, []byte("\n"))), }, }