Skip to content

Commit

Permalink
fix(storage): refine some definitions
Browse files Browse the repository at this point in the history
Signed-off-by: soulseen <zhuxiaoyang1996@gmail.com>
  • Loading branch information
soulseen committed Mar 6, 2021
1 parent bc6508c commit 3f5c55c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apis/meta/v1alpha1/tls.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func (r ComponentWithTLS) GetName() string {
type ComponentsTLSSpec struct {
// +kubebuilder:validation:Required
// +kubebuilder:validation:Pattern="[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*"
CertificateRef string `json:"certificateRef"`
CertificateRef string `json:"certificateRef,omitempty"`
}

func (tls *ComponentsTLSSpec) Enabled() bool {
Expand Down
3 changes: 2 additions & 1 deletion pkg/cluster/controllers/storage/provision.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"fmt"
"reflect"
"strings"

goharborv1alpha2 "github.com/goharbor/harbor-operator/apis/goharbor.io/v1alpha2"
"github.com/goharbor/harbor-operator/apis/meta/v1alpha1"
Expand Down Expand Up @@ -88,7 +89,7 @@ func (m *MinIOController) getMinIOProperties(minioInstance *minio.Tenant) (*goha
endpoint = fmt.Sprintf("http://%s.%s.svc:%s", m.getServiceName(), m.HarborCluster.Namespace, "9000")
}

storageSpec.S3.RegionEndpoint = endpoint
storageSpec.S3.RegionEndpoint = strings.ToLower(endpoint)
storageSpec.S3.Secure = &secure
storageSpec.S3.V4Auth = &v4Auth
storageSpec.S3.SkipVerify = skipVerify
Expand Down

0 comments on commit 3f5c55c

Please sign in to comment.