Skip to content

Commit 3b4cc52

Browse files
author
Paulo Gomes
committed
Use uppercase TLS in error messages
Signed-off-by: Paulo Gomes <[email protected]>
1 parent d9d789f commit 3b4cc52

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

controllers/helmchart_controller.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ func (r *HelmChartReconciler) buildFromHelmRepository(ctx context.Context, obj *
404404
tlsConfig, err = getter.TLSClientConfigFromSecret(*secret, repo.Spec.URL)
405405
if err != nil {
406406
e := &serror.Event{
407-
Err: fmt.Errorf("failed to create tls client config with secret data: %w", err),
407+
Err: fmt.Errorf("failed to create TLS client config with secret data: %w", err),
408408
Reason: sourcev1.AuthenticationFailedReason,
409409
}
410410
conditions.MarkTrue(obj, sourcev1.FetchFailedCondition, sourcev1.AuthenticationFailedReason, e.Err.Error())
@@ -776,7 +776,7 @@ func (r *HelmChartReconciler) namespacedChartRepositoryCallback(ctx context.Cont
776776

777777
tlsConfig, err = getter.TLSClientConfigFromSecret(*secret, repo.Spec.URL)
778778
if err != nil {
779-
return nil, fmt.Errorf("failed to create tls client config for HelmRepository '%s': %w", repo.Name, err)
779+
return nil, fmt.Errorf("failed to create TLS client config for HelmRepository '%s': %w", repo.Name, err)
780780
}
781781
}
782782

controllers/helmrepository_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ func (r *HelmRepositoryReconciler) reconcileSource(ctx context.Context, obj *sou
303303
tlsConfig, err = getter.TLSClientConfigFromSecret(secret, obj.Spec.URL)
304304
if err != nil {
305305
e := &serror.Event{
306-
Err: fmt.Errorf("failed to create tls client config with secret data: %w", err),
306+
Err: fmt.Errorf("failed to create TLS client config with secret data: %w", err),
307307
Reason: sourcev1.AuthenticationFailedReason,
308308
}
309309
conditions.MarkTrue(obj, sourcev1.FetchFailedCondition, sourcev1.AuthenticationFailedReason, e.Err.Error())

controllers/helmrepository_controller_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ func TestHelmRepositoryReconciler_reconcileSource(t *testing.T) {
366366
},
367367
wantErr: true,
368368
assertConditions: []metav1.Condition{
369-
*conditions.TrueCondition(sourcev1.FetchFailedCondition, sourcev1.AuthenticationFailedReason, "failed to create tls client config with secret data: cannot append certificate into certificate pool: invalid caFile"),
369+
*conditions.TrueCondition(sourcev1.FetchFailedCondition, sourcev1.AuthenticationFailedReason, "failed to create TLS client config with secret data: cannot append certificate into certificate pool: invalid caFile"),
370370
},
371371
},
372372
{

0 commit comments

Comments
 (0)