Skip to content

Commit

Permalink
address lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
LiboYu2 committed Jan 27, 2025
1 parent 85f9c01 commit 4ebf883
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/controllers/vdb/tlsservercertgen_reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import (
)

const (
HTTPSTLSSecret = "HTTPSTLSSecret"
HTTPSTLSSecret = "HTTPSTLSSecret" // #nosec G101
ClientTLSSecret = "ClientTLSSecret"
)

Expand Down Expand Up @@ -71,7 +71,7 @@ func (h *TLSServerCertGenReconciler) Reconcile(ctx context.Context, _ *ctrl.Requ
}

// Reconcile will create a TLS secret for the http server if one is missing
func (h *TLSServerCertGenReconciler) reconcileOneSecret(secretFieldName string, secretName string, ctx context.Context) (ctrl.Result, error) {
func (h *TLSServerCertGenReconciler) reconcileOneSecret(secretFieldName, secretName string, ctx context.Context) (ctrl.Result, error) {

Check failure on line 74 in pkg/controllers/vdb/tlsservercertgen_reconciler.go

View workflow job for this annotation

GitHub Actions / build-release-assets / release-artifacts

(*TLSServerCertGenReconciler).reconcileOneSecret - result 0 (sigs.k8s.io/controller-runtime/pkg/reconcile.Result) is always nil (unparam)

Check failure on line 74 in pkg/controllers/vdb/tlsservercertgen_reconciler.go

View workflow job for this annotation

GitHub Actions / unittests / ut

(*TLSServerCertGenReconciler).reconcileOneSecret - result 0 (sigs.k8s.io/controller-runtime/pkg/reconcile.Result) is always nil (unparam)
// If the secret name is set, check that it exists.
if secretName != "" {
// As a convenience we will regenerate the secret using the same name. But
Expand Down Expand Up @@ -119,7 +119,7 @@ func (h *TLSServerCertGenReconciler) getDNSNames() []string {
}

// createSecret returns a secret that store TLS certificate information
func (h *TLSServerCertGenReconciler) createSecret(secretFieldName string, secretName string, ctx context.Context, cert, caCert security.Certificate) (*corev1.Secret, error) {
func (h *TLSServerCertGenReconciler) createSecret(secretFieldName, secretName string, ctx context.Context, cert, caCert security.Certificate) (*corev1.Secret, error) {
secret := corev1.Secret{
ObjectMeta: metav1.ObjectMeta{
Namespace: h.Vdb.Namespace,
Expand Down Expand Up @@ -151,7 +151,7 @@ func (h *TLSServerCertGenReconciler) createSecret(secretFieldName string, secret
}

// setSecretNameInVDB will set the secretName in the vdb to indicate we have created that secret
func (h *TLSServerCertGenReconciler) setSecretNameInVDB(ctx context.Context, secretFieldName string, secretName string) error {
func (h *TLSServerCertGenReconciler) setSecretNameInVDB(ctx context.Context, secretFieldName, secretName string) error {
nm := h.Vdb.ExtractNamespacedName()
return retry.RetryOnConflict(retry.DefaultBackoff, func() error {
// Always fetch the latest in case we are in the retry loop
Expand Down

0 comments on commit 4ebf883

Please sign in to comment.