Skip to content

Commit

Permalink
fix: stop validating root secrets
Browse files Browse the repository at this point in the history
Config Sync doesn't generate a copy of root Secret, so no need to
validate the generated secret name length.

b/326430718
  • Loading branch information
nan-yu committed Feb 22, 2024
1 parent 13c8f48 commit 6b93f71
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions pkg/reconcilermanager/controllers/rootsync_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -896,11 +896,6 @@ func (r *RootSyncReconciler) validateRootSecret(ctx context.Context, rootSync *v
return nil
}

secretName := ReconcilerResourceName(reconcilerName, rootSync.Spec.SecretRef.Name)
if errs := validation.IsDNS1123Label(secretName); errs != nil {
return errors.Errorf("The managed secret name %q is invalid: %s. To fix it, update '.spec.git.secretRef.name'", secretName, strings.Join(errs, ", "))
}

secret, err := validateSecretExist(ctx,
v1beta1.GetSecretName(rootSync.Spec.SecretRef),
rootSync.Namespace,
Expand Down

0 comments on commit 6b93f71

Please sign in to comment.