From dfcfc3efa79fc9f8ce1fec7dbffb7eda923c8245 Mon Sep 17 00:00:00 2001 From: Lukas Krejci Date: Fri, 6 May 2022 10:21:06 +0200 Subject: [PATCH] The git certificate needs to be labeled as mounted to workspace. (#1375) --- controllers/usernamespace/controller.go | 1 + controllers/usernamespace/controller_test.go | 1 + 2 files changed, 2 insertions(+) diff --git a/controllers/usernamespace/controller.go b/controllers/usernamespace/controller.go index d17c9d6830..1aba2be578 100644 --- a/controllers/usernamespace/controller.go +++ b/controllers/usernamespace/controller.go @@ -472,6 +472,7 @@ func (r *CheUserNamespaceReconciler) reconcileGitTlsCertificate(ctx context.Cont Namespace: targetNs, Labels: defaults.AddStandardLabelsForComponent(checluster, userSettingsComponentLabelValue, map[string]string{ constants.DevWorkspaceGitTLSLabel: "true", + constants.DevWorkspaceMountLabel: "true", constants.DevWorkspaceWatchConfigMapLabel: "true", }), }, diff --git a/controllers/usernamespace/controller_test.go b/controllers/usernamespace/controller_test.go index daf44a6f92..159b578157 100644 --- a/controllers/usernamespace/controller_test.go +++ b/controllers/usernamespace/controller_test.go @@ -384,6 +384,7 @@ func TestCreatesDataInNamespace(t *testing.T) { gitTlsConfig := corev1.ConfigMap{} assert.NoError(t, cl.Get(ctx, client.ObjectKey{Name: "che-git-tls-creds", Namespace: namespace.GetName()}, &gitTlsConfig)) assert.Equal(t, "true", gitTlsConfig.Labels[constants.DevWorkspaceGitTLSLabel]) + assert.Equal(t, "true", gitTlsConfig.Labels[constants.DevWorkspaceMountLabel]) assert.Equal(t, "true", gitTlsConfig.Labels[constants.DevWorkspaceWatchConfigMapLabel]) assert.Equal(t, "the.host.of.git", gitTlsConfig.Data["host"]) assert.Equal(t, "the public certificate of the.host.of.git", gitTlsConfig.Data["certificate"])