diff --git a/modules/common/tls/tls.go b/modules/common/tls/tls.go index 0b6134f2..e1894e09 100644 --- a/modules/common/tls/tls.go +++ b/modules/common/tls/tls.go @@ -84,14 +84,14 @@ func EnsureOrCreateSecret(clientset *kubernetes.Clientset, namespace, secretName Name: secretName, Namespace: namespace, }, - Data: data, // The data to store in the secret, the actual data provided by cert-manager + Data: data, // The data to store in the secret - the actual data provided by cert-manager formatted as "tls.crt": []byte("..."), "tls.key": []byte("..."), } _, err := clientset.CoreV1().Secrets(namespace).Create(context.TODO(), secret, metav1.CreateOptions{}) if err != nil { - return fmt.Errorf("error creating secret %s: %v", secretName, err) + return fmt.Errorf("Error creating secret %s: %w", secretName, err) } } else { - return fmt.Errorf("error checking secret %s: %v", secretName, err) + return fmt.Errorf("Error validationg secret %s: %w", secretName, err) } } return nil @@ -162,7 +162,7 @@ func CreateVolumes(tls *TLS) []corev1.Volume { Items: []corev1.KeyToPath{ { Key: "ca.crt", - Path: fmt.Sprintf("ca.crt"), + Path: "ca.crt", }, }, },