The git certificate needs to be labeled as mounted to workspace. (#1375)

pull/1379/head
Lukas Krejci 2022-05-06 10:21:06 +02:00 committed by GitHub
parent a269da210b
commit dfcfc3efa7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -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",
}),
},

View File

@ -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"])