Skip to content

Commit

Permalink
fix: let backend port in notary ingress depend on internal tls (#744)
Browse files Browse the repository at this point in the history
Signed-off-by: He Weiwei <hweiwei@vmware.com>
  • Loading branch information
heww committed Aug 16, 2021
1 parent 8e3ad45 commit c6e2642
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
3 changes: 1 addition & 2 deletions controllers/goharbor/harbor/ingresses.go
Expand Up @@ -7,7 +7,6 @@ import (
goharborv1 "github.com/goharbor/harbor-operator/apis/goharbor.io/v1beta1"
harbormetav1 "github.com/goharbor/harbor-operator/apis/meta/v1alpha1"
"github.com/goharbor/harbor-operator/controllers"
"github.com/goharbor/harbor-operator/controllers/goharbor/notaryserver"
"github.com/goharbor/harbor-operator/pkg/graph"
"github.com/pkg/errors"
netv1 "k8s.io/api/networking/v1"
Expand Down Expand Up @@ -149,7 +148,7 @@ func (r *Reconciler) GetNotaryIngressRules(ctx context.Context, harbor *goharbor
Service: &netv1.IngressServiceBackend{
Name: r.NormalizeName(ctx, harbor.GetName(), controllers.NotaryServer.String()),
Port: netv1.ServiceBackendPort{
Number: notaryserver.PublicPort,
Number: harbor.Spec.InternalTLS.GetInternalPort(harbormetav1.NotaryServerTLS),
},
},
}
Expand Down
4 changes: 0 additions & 4 deletions controllers/goharbor/notaryserver/services.go
Expand Up @@ -10,10 +10,6 @@ import (
"k8s.io/apimachinery/pkg/util/intstr"
)

const (
PublicPort = 443
)

func (r *Reconciler) GetService(ctx context.Context, notary *goharborv1.NotaryServer) (*corev1.Service, error) {
name := r.NormalizeName(ctx, notary.GetName())
namespace := notary.GetNamespace()
Expand Down

0 comments on commit c6e2642

Please sign in to comment.