diff --git a/controllers/goharbor/harbor/core.go b/controllers/goharbor/harbor/core.go index d4067a3c0..fae919f59 100644 --- a/controllers/goharbor/harbor/core.go +++ b/controllers/goharbor/harbor/core.go @@ -251,7 +251,7 @@ func (r *Reconciler) GetCoreTokenCertificate(ctx context.Context, harbor *goharb Algorithm: certv1.RSAKeyAlgorithm, Size: CoreTokenServiceDefaultKeySize, }, - DNSNames: []string{publicDNS.Host}, + DNSNames: []string{publicDNS.Hostname()}, SecretName: secretName, Usages: []certv1.KeyUsage{certv1.UsageSigning}, IssuerRef: harbor.Spec.Core.TokenIssuer,