Skip to content

Commit

Permalink
fix coreurl mismatch
Browse files Browse the repository at this point in the history
Signed-off-by: Ziming Zhang <zziming@vmware.com>
  • Loading branch information
bitsf committed Jan 19, 2021
1 parent d9e9b55 commit aa6769d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion controllers/goharbor/harbor/jobservice.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,16 @@ func (r *Reconciler) GetJobService(ctx context.Context, harbor *goharborv1alpha2
name := r.NormalizeName(ctx, harbor.GetName())
namespace := harbor.GetNamespace()

host := r.NormalizeName(ctx, harbor.GetName(), controllers.Core.String())
if harbor.Spec.InternalTLS.IsEnabled() {
host += ":443"
} else {
host += ":80"
}

coreURL := (&url.URL{
Scheme: harbor.Spec.InternalTLS.GetScheme(),
Host: r.NormalizeName(ctx, harbor.GetName(), controllers.Core.String()),
Host: host,
}).String()
coreSecretRef := r.NormalizeName(ctx, harbor.GetName(), controllers.Core.String(), "secret")
registryAuthRef := r.NormalizeName(ctx, harbor.GetName(), controllers.Registry.String(), "basicauth")
Expand Down

0 comments on commit aa6769d

Please sign in to comment.