Skip to content

Commit

Permalink
fix(expose): make ingress required.
Browse files Browse the repository at this point in the history
  • Loading branch information
wangcanfeng authored and bitsf committed Dec 7, 2021
1 parent b088d17 commit 05328e4
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 2 deletions.
1 change: 1 addition & 0 deletions apis/goharbor.io/v1alpha3/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions apis/goharbor.io/v1beta1/harbor_types.go
Expand Up @@ -702,8 +702,8 @@ type HarborExposeComponentSpec struct {
// +kubebuilder:validation:Optional
TLS *harbormetav1.ComponentsTLSSpec `json:"tls,omitempty"`

// +kubebuilder:validation:Optional
Ingress *HarborExposeIngressSpec `json:"ingress,omitempty"`
// +kubebuilder:validation:Required
Ingress *HarborExposeIngressSpec `json:"ingress"`
}

type HarborExposeIngressSpec struct {
Expand Down
1 change: 1 addition & 0 deletions apis/goharbor.io/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions apis/meta/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions charts/harbor-operator/templates/crds.yaml
Expand Up @@ -6997,6 +6997,8 @@ spec:
pattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'
type: string
type: object
required:
- ingress
type: object
notary:
description: The ingress of the notary, required when notary component enabled.
Expand Down Expand Up @@ -7029,6 +7031,8 @@ spec:
pattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'
type: string
type: object
required:
- ingress
type: object
required:
- core
Expand Down Expand Up @@ -7816,6 +7820,8 @@ spec:
pattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'
type: string
type: object
required:
- ingress
type: object
required:
- enable
Expand Down Expand Up @@ -8063,6 +8069,8 @@ spec:
pattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'
type: string
type: object
required:
- ingress
type: object
required:
- enable
Expand Down Expand Up @@ -10827,6 +10835,8 @@ spec:
pattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'
type: string
type: object
required:
- ingress
type: object
notary:
description: The ingress of the notary, required when notary component enabled.
Expand Down Expand Up @@ -10859,6 +10869,8 @@ spec:
pattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'
type: string
type: object
required:
- ingress
type: object
required:
- core
Expand Down
9 changes: 9 additions & 0 deletions controllers/goharbor/harbor_test.go
Expand Up @@ -147,6 +147,15 @@ func setupValidHarbor(ctx context.Context, ns string) (Resource, client.ObjectKe
ExternalURL: publicURL.String(),
HarborAdminPasswordRef: adminSecretName,
Version: test.GetVersion(),
Expose: goharborv1.HarborExposeSpec{
Core: goharborv1.HarborExposeComponentSpec{
TLS: nil,
Ingress: &goharborv1.HarborExposeIngressSpec{
Host: "core.goharbor.io",
},
},
Notary: nil,
},
ImageChartStorage: &goharborv1.HarborStorageImageChartStorageSpec{
FileSystem: &goharborv1.HarborStorageImageChartStorageFileSystemSpec{
RegistryPersistentVolume: goharborv1.HarborStorageRegistryPersistentVolumeSpec{
Expand Down
12 changes: 12 additions & 0 deletions manifests/cluster/deployment.yaml
Expand Up @@ -7016,6 +7016,8 @@ spec:
pattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'
type: string
type: object
required:
- ingress
type: object
notary:
description: The ingress of the notary, required when notary component enabled.
Expand Down Expand Up @@ -7048,6 +7050,8 @@ spec:
pattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'
type: string
type: object
required:
- ingress
type: object
required:
- core
Expand Down Expand Up @@ -7835,6 +7839,8 @@ spec:
pattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'
type: string
type: object
required:
- ingress
type: object
required:
- enable
Expand Down Expand Up @@ -8082,6 +8088,8 @@ spec:
pattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'
type: string
type: object
required:
- ingress
type: object
required:
- enable
Expand Down Expand Up @@ -10851,6 +10859,8 @@ spec:
pattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'
type: string
type: object
required:
- ingress
type: object
notary:
description: The ingress of the notary, required when notary component enabled.
Expand Down Expand Up @@ -10883,6 +10893,8 @@ spec:
pattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'
type: string
type: object
required:
- ingress
type: object
required:
- core
Expand Down
12 changes: 12 additions & 0 deletions manifests/harbor/deployment.yaml
Expand Up @@ -7016,6 +7016,8 @@ spec:
pattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'
type: string
type: object
required:
- ingress
type: object
notary:
description: The ingress of the notary, required when notary component enabled.
Expand Down Expand Up @@ -7048,6 +7050,8 @@ spec:
pattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'
type: string
type: object
required:
- ingress
type: object
required:
- core
Expand Down Expand Up @@ -7835,6 +7839,8 @@ spec:
pattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'
type: string
type: object
required:
- ingress
type: object
required:
- enable
Expand Down Expand Up @@ -8082,6 +8088,8 @@ spec:
pattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'
type: string
type: object
required:
- ingress
type: object
required:
- enable
Expand Down Expand Up @@ -10851,6 +10859,8 @@ spec:
pattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'
type: string
type: object
required:
- ingress
type: object
notary:
description: The ingress of the notary, required when notary component enabled.
Expand Down Expand Up @@ -10883,6 +10893,8 @@ spec:
pattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'
type: string
type: object
required:
- ingress
type: object
required:
- core
Expand Down

0 comments on commit 05328e4

Please sign in to comment.