From b06f3c011723100c3d07f57eef55154fe3f1c238 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jiri=20Dan=C4=9Bk?= Date: Sat, 13 Apr 2024 13:45:50 +0200 Subject: [PATCH 1/3] Remove one unused and one duplicated in notebook_controller_test.go This has been introduced when cherry-picking https://github.com/opendatahub-io/kubeflow/pull/250/files#r1563972573 to stable --- .../controllers/notebook_controller_test.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/components/odh-notebook-controller/controllers/notebook_controller_test.go b/components/odh-notebook-controller/controllers/notebook_controller_test.go index e9b9857864a..c9570181fda 100644 --- a/components/odh-notebook-controller/controllers/notebook_controller_test.go +++ b/components/odh-notebook-controller/controllers/notebook_controller_test.go @@ -22,7 +22,6 @@ import ( "time" "github.com/go-logr/logr" - "github.com/onsi/gomega/format" netv1 "k8s.io/api/networking/v1" "k8s.io/apimachinery/pkg/api/resource" @@ -30,7 +29,6 @@ import ( . "github.com/onsi/gomega" routev1 "github.com/openshift/api/route/v1" corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/intstr" From b672c6529064ad8714163b93fd2be2e3eb241c52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jiri=20Dan=C4=9Bk?= Date: Sat, 13 Apr 2024 13:49:52 +0200 Subject: [PATCH 2/3] Remove unused imports in suite_test.go This has been introduced when cherry-picking https://github.com/opendatahub-io/kubeflow/pull/250/files to stable --- components/odh-notebook-controller/controllers/suite_test.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/components/odh-notebook-controller/controllers/suite_test.go b/components/odh-notebook-controller/controllers/suite_test.go index a33cee3d069..6809cee40f8 100644 --- a/components/odh-notebook-controller/controllers/suite_test.go +++ b/components/odh-notebook-controller/controllers/suite_test.go @@ -24,9 +24,7 @@ import ( "testing" "time" - v1 "k8s.io/api/core/v1" netv1 "k8s.io/api/networking/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "go.uber.org/zap/zapcore" "k8s.io/apimachinery/pkg/runtime" From 68b0a3eba889d57777651bbb4afc32913807a174 Mon Sep 17 00:00:00 2001 From: rkpattnaik780 Date: Tue, 14 May 2024 12:31:53 +0530 Subject: [PATCH 3/3] fix: add GIT_SSL_CAINFO env variable in odh-notebook-controller --- .../odh-notebook-controller/controllers/notebook_controller.go | 2 +- .../odh-notebook-controller/controllers/notebook_webhook.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/components/odh-notebook-controller/controllers/notebook_controller.go b/components/odh-notebook-controller/controllers/notebook_controller.go index a3be9d42ce7..1a4fe139397 100644 --- a/components/odh-notebook-controller/controllers/notebook_controller.go +++ b/components/odh-notebook-controller/controllers/notebook_controller.go @@ -362,7 +362,7 @@ func (r *OpenshiftNotebookReconciler) UnsetNotebookCertConfig(notebook *nbv1.Not log := r.Log.WithValues("notebook", notebook.Name, "namespace", notebook.Namespace) // Get the notebook object - envVars := []string{"PIP_CERT", "REQUESTS_CA_BUNDLE", "SSL_CERT_FILE", "PIPELINES_SSL_SA_CERTS"} + envVars := []string{"PIP_CERT", "REQUESTS_CA_BUNDLE", "SSL_CERT_FILE", "PIPELINES_SSL_SA_CERTS", "GIT_SSL_CAINFO"} notebookSpecChanged := false patch := client.MergeFrom(notebook.DeepCopy()) copyNotebook := notebook.DeepCopy() diff --git a/components/odh-notebook-controller/controllers/notebook_webhook.go b/components/odh-notebook-controller/controllers/notebook_webhook.go index 19608bc03a6..aa6bdf748d8 100644 --- a/components/odh-notebook-controller/controllers/notebook_webhook.go +++ b/components/odh-notebook-controller/controllers/notebook_webhook.go @@ -332,6 +332,7 @@ func InjectCertConfig(notebook *nbv1.Notebook, configMapName string) error { "REQUESTS_CA_BUNDLE": configMapMountPath, "SSL_CERT_FILE": configMapMountPath, "PIPELINES_SSL_SA_CERTS": configMapMountPath, + "GIT_SSL_CAINFO": configMapMountPath, } notebookContainers := ¬ebook.Spec.Template.Spec.Containers