Skip to content

Commit

Permalink
The git certificate needs to be labeled as mounted to workspace. (#1375)
Browse files Browse the repository at this point in the history
  • Loading branch information
metlos authored May 6, 2022
1 parent a269da2 commit dfcfc3e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions controllers/usernamespace/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
}),
},
Expand Down
1 change: 1 addition & 0 deletions controllers/usernamespace/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"])
Expand Down

0 comments on commit dfcfc3e

Please sign in to comment.