Skip to content

Commit

Permalink
fix: helm charts
Browse files Browse the repository at this point in the history
Signed-off-by: cndoit18 <cndoit18@outlook.com>
  • Loading branch information
cndoit18 authored and bitsf committed Jun 30, 2021
1 parent 241271d commit 678182a
Show file tree
Hide file tree
Showing 58 changed files with 25,476 additions and 187 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,9 @@ $(CHARTS_DIRECTORY)/harbor-operator-$(RELEASE_VERSION).tgz: $(CHART_HARBOR_OPERA
--destination $(CHARTS_DIRECTORY)

$(CHART_HARBOR_OPERATOR)/crds: config/crd/bases
rm -f '$@'
ln -vs ../../config/crd/bases '$@'
rm -rf '$@'
mkdir '$@'
$(KUSTOMIZE) build config/helm/crds/ -o '$@'

$(CHART_HARBOR_OPERATOR)/assets:
rm -f '$@'
Expand Down
1 change: 0 additions & 1 deletion apis/goharbor.io/v1alpha3/chartmuseum_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.

// +kubebuilder:object:root=true
// +kubebuilder:storageversion
// +k8s:openapi-gen=true
// +resource:path=chartmuseum
// +kubebuilder:subresource:status
Expand Down
15 changes: 0 additions & 15 deletions apis/goharbor.io/v1alpha3/chartmuseum_webhook.go

This file was deleted.

1 change: 0 additions & 1 deletion apis/goharbor.io/v1alpha3/core_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.

// +kubebuilder:object:root=true
// +kubebuilder:storageversion
// +k8s:openapi-gen=true
// +resource:path=core
// +kubebuilder:subresource:status
Expand Down
15 changes: 0 additions & 15 deletions apis/goharbor.io/v1alpha3/core_webhook.go

This file was deleted.

1 change: 0 additions & 1 deletion apis/goharbor.io/v1alpha3/exporter_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.

// +kubebuilder:object:root=true
// +kubebuilder:storageversion
// +k8s:openapi-gen=true
// +resource:path=exporter
// +kubebuilder:subresource:status
Expand Down
15 changes: 0 additions & 15 deletions apis/goharbor.io/v1alpha3/exporter_webhook.go

This file was deleted.

1 change: 0 additions & 1 deletion apis/goharbor.io/v1alpha3/harbor_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.

// +kubebuilder:object:root=true
// +kubebuilder:storageversion
// +k8s:openapi-gen=true
// +resource:path=harbor
// +kubebuilder:subresource:status
Expand Down
36 changes: 18 additions & 18 deletions apis/goharbor.io/v1alpha3/harborcluster_conversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func Convert_v1alpha3_HarborClusterSpec_To_v1beta1_HarborClusterSpec(src *Harbor
Convert_v1alpha3_Cache_To_v1beta1_Cache(src.InClusterCache, &dst.Cache)
} else if src.Redis != nil {
dst.Cache = v1beta1.Cache{
Kind: "Redis",
Kind: v1beta1.KindCacheRedis,
Spec: &v1beta1.CacheSpec{
Redis: &v1beta1.ExternalRedisSpec{
RedisHostSpec: src.Redis.RedisHostSpec,
Expand Down Expand Up @@ -219,7 +219,7 @@ func Convert_v1alpha3_ImageSourceSpec_To_v1beta1_ImageSourceSpec(src *ImageSourc

func Convert_v1alpha3_Cache_To_v1beta1_Cache(src *Cache, dst *v1beta1.Cache) { // nolint
if src.RedisSpec != nil {
dst.Kind = "RedisFailover"
dst.Kind = v1beta1.KindCacheRedisFailover
dst.Spec = &v1beta1.CacheSpec{}
Convert_v1alpha3_RedisSpec_To_v1beta1_CacheSpec(src.RedisSpec, dst.Spec)
}
Expand Down Expand Up @@ -252,7 +252,7 @@ func Convert_v1alpha3_RedisSpec_To_v1beta1_CacheSpec(src *RedisSpec, dst *v1beta

func Convert_v1alpha3_HarborStorageImageChartStorageSpec_To_v1beta1_Storage(src *HarborStorageImageChartStorageSpec, dst *v1beta1.Storage) { // nolint
if src.FileSystem != nil {
dst.Kind = "FileSystem"
dst.Kind = v1beta1.KindStorageFileSystem
dst.Spec.FileSystem = &v1beta1.FileSystemSpec{
HarborStorageImageChartStorageFileSystemSpec: v1beta1.HarborStorageImageChartStorageFileSystemSpec{
RegistryPersistentVolume: v1beta1.HarborStorageRegistryPersistentVolumeSpec{
Expand All @@ -274,7 +274,7 @@ func Convert_v1alpha3_HarborStorageImageChartStorageSpec_To_v1beta1_Storage(src
}

if src.S3 != nil {
dst.Kind = "S3"
dst.Kind = v1beta1.KindStorageS3
dst.Spec.S3 = &v1beta1.S3Spec{
HarborStorageImageChartStorageS3Spec: v1beta1.HarborStorageImageChartStorageS3Spec{
RegistryStorageDriverS3Spec: v1beta1.RegistryStorageDriverS3Spec{
Expand All @@ -298,7 +298,7 @@ func Convert_v1alpha3_HarborStorageImageChartStorageSpec_To_v1beta1_Storage(src
}

if src.Swift != nil {
dst.Kind = "Swift"
dst.Kind = v1beta1.KindStorageSwift
dst.Spec.Swift = &v1beta1.SwiftSpec{
HarborStorageImageChartStorageSwiftSpec: v1beta1.HarborStorageImageChartStorageSwiftSpec{
RegistryStorageDriverSwiftSpec: v1beta1.RegistryStorageDriverSwiftSpec{
Expand Down Expand Up @@ -327,7 +327,7 @@ func Convert_v1alpha3_HarborStorageImageChartStorageSpec_To_v1beta1_Storage(src

func Convert_v1alpha3_Storage_To_v1beta1_Storage(src *Storage, dst *v1beta1.Storage) { // nolint
if src.MinIOSpec != nil {
dst.Kind = "MinIO"
dst.Kind = v1beta1.KindStorageMinIO
dst.Spec.MinIO = &v1beta1.MinIOSpec{}
Convert_v1alpha3_MinIOSpec_to_v1beta1_MinIOSpec(src.MinIOSpec, dst.Spec.MinIO)
}
Expand Down Expand Up @@ -379,7 +379,7 @@ func Convert_v1alpha3_HarborExposeIngressSpec_To_v1beta1_HarborExposeIngressSpec
}

func Convert_v1alpha3_HarborDatabaseSpec_To_v1beta1_Database(src *HarborDatabaseSpec, dst *v1beta1.Database) { // nolint
dst.Kind = "PostgreSQL"
dst.Kind = v1beta1.KindDatabasePostgreSQL
dst.Spec = v1beta1.DatabaseSpec{
PostgreSQL: &v1beta1.PostgreSQLSpec{
HarborDatabaseSpec: v1beta1.HarborDatabaseSpec{
Expand All @@ -394,7 +394,7 @@ func Convert_v1alpha3_HarborDatabaseSpec_To_v1beta1_Database(src *HarborDatabase

func Convert_v1alpha3_Database_To_v1beta1_Database(src *Database, dst *v1beta1.Database) { // nolint
if src.PostgresSQLSpec != nil {
dst.Kind = "Zlando/PostgreSQL"
dst.Kind = v1beta1.KindDatabaseZlandoPostgreSQL
dst.Spec.ZlandoPostgreSQL = &v1beta1.ZlandoPostgreSQLSpec{}
Convert_v1alpha3_PostgresSQLSpec_To_v1beta1_ZlandoPostgresSQLSpec(src.PostgresSQLSpec, dst.Spec.ZlandoPostgreSQL)
}
Expand Down Expand Up @@ -435,13 +435,13 @@ func Convert_v1alpha3_HarborClusterStatus_To_v1beta1_HarborClusterStatus(src *Ha
//-----------------------------------------------------------

func Convert_v1beta1_HarborClusterSpec_To_v1alpha3_HarborClusterSpec(src *v1beta1.HarborClusterSpec, dst *HarborClusterSpec) { // nolint
if src.Cache.Kind == "Redis" && src.Cache.Spec.Redis != nil {
if src.Cache.Kind == v1beta1.KindCacheRedis && src.Cache.Spec.Redis != nil {
if dst.Redis == nil {
dst.Redis = &ExternalRedisSpec{}
}

Convert_v1beta1_ExternalRedisSpec_To_v1alpha3_ExternalRedisSpec(src.Cache.Spec.Redis, dst.Redis)
} else if src.Cache.Kind == "RedisFailover" {
} else if src.Cache.Kind == v1beta1.KindCacheRedisFailover {
if dst.InClusterCache == nil {
dst.InClusterCache = &Cache{}
}
Expand All @@ -454,33 +454,33 @@ func Convert_v1beta1_HarborClusterSpec_To_v1alpha3_HarborClusterSpec(src *v1beta
}

switch src.Storage.Kind {
case "FileSystem":
case v1beta1.KindStorageFileSystem:
if src.Storage.Spec.FileSystem != nil {
Convert_v1beta1_FileSystemSpec_To_v1alpha3_HarborStorageImageChartStorage(src.Storage.Spec.FileSystem, dst.ImageChartStorage)
}
case "S3":
case v1beta1.KindStorageS3:
if src.Storage.Spec.S3 != nil {
Convert_v1beta1_S3Spec_To_v1alpha3_HarborStorageImageChartStorage(src.Storage.Spec.S3, dst.ImageChartStorage)
}
case "Swift":
case v1beta1.KindStorageSwift:
if src.Storage.Spec.Swift != nil {
Convert_v1beta1_SwiftSpec_To_v1alpha3_HarborStorageImageChartStorage(src.Storage.Spec.Swift, dst.ImageChartStorage)
}
case "MinIO":
case v1beta1.KindStorageMinIO:
if dst.InClusterStorage == nil {
dst.InClusterStorage = &Storage{}
}

Convert_v1beta1_Storage_To_v1alpha3_Storage(&src.Storage, dst.InClusterStorage)
}

if src.Database.Kind == "PostgreSQL" && src.Database.Spec.PostgreSQL != nil {
if src.Database.Kind == v1beta1.KindDatabasePostgreSQL && src.Database.Spec.PostgreSQL != nil {
if dst.Database == nil {
dst.Database = &HarborDatabaseSpec{}
}

Convert_v1beta1_PostgreSQLSpec_To_v1alpha3_HarborDatabaseSpec(src.Database.Spec.PostgreSQL, dst.Database)
} else if src.Database.Kind == "Zlando/PostgreSQL" {
} else if src.Database.Kind == v1beta1.KindDatabaseZlandoPostgreSQL {
if dst.InClusterDatabase == nil {
dst.InClusterDatabase = &Database{}
}
Expand Down Expand Up @@ -685,7 +685,7 @@ func Convert_v1beta1_ExternalRedisSpec_To_v1alpha3_ExternalRedisSpec(src *v1beta
}

func Convert_v1beta1_Cache_To_v1alpha3_Cache(src *v1beta1.Cache, dst *Cache) { // nolint
dst.Kind = "Redis"
dst.Kind = v1beta1.KindCacheRedis
if src.Spec != nil {
dst.RedisSpec = &RedisSpec{}
Convert_v1beta1_RedisSpec_To_v1alpha3_CacheSpec(src.Spec, dst.RedisSpec)
Expand Down Expand Up @@ -792,7 +792,7 @@ func Convert_v1beta1_PostgreSQLSpec_To_v1alpha3_HarborDatabaseSpec(src *v1beta1.
}

func Convert_v1beta1_Database_To_v1alpha3_Database(src *v1beta1.Database, dst *Database) { // nolint
dst.Kind = "PostgresSQL"
dst.Kind = v1beta1.KindDatabasePostgreSQL

if src.Spec.ZlandoPostgreSQL != nil {
dst.PostgresSQLSpec = &PostgresSQLSpec{}
Expand Down
1 change: 0 additions & 1 deletion apis/goharbor.io/v1alpha3/harborcluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,6 @@ const (
)

// +kubebuilder:object:root=true
// +kubebuilder:storageversion
// +k8s:openapi-gen=true
// +resource:path=harborcluster
// +kubebuilder:subresource:status
Expand Down
1 change: 0 additions & 1 deletion apis/goharbor.io/v1alpha3/jobservice_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.

// +kubebuilder:object:root=true
// +kubebuilder:storageversion
// +k8s:openapi-gen=true
// +resource:path=jobservice
// +kubebuilder:subresource:status
Expand Down
1 change: 0 additions & 1 deletion apis/goharbor.io/v1alpha3/notaryserver_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.

// +kubebuilder:object:root=true
// +kubebuilder:storageversion
// +k8s:openapi-gen=true
// +resource:path=notaryserver
// +kubebuilder:subresource:status
Expand Down
1 change: 0 additions & 1 deletion apis/goharbor.io/v1alpha3/notarysigner_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ const NotarySignerAPIPort = 7899
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.

// +kubebuilder:object:root=true
// +kubebuilder:storageversion
// +k8s:openapi-gen=true
// +resource:path=notarysigner
// +kubebuilder:subresource:status
Expand Down
1 change: 0 additions & 1 deletion apis/goharbor.io/v1alpha3/portal_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.

// +kubebuilder:object:root=true
// +kubebuilder:storageversion
// +k8s:openapi-gen=true
// +resource:path=portal
// +kubebuilder:subresource:status
Expand Down
15 changes: 0 additions & 15 deletions apis/goharbor.io/v1alpha3/portal_webhook.go

This file was deleted.

1 change: 0 additions & 1 deletion apis/goharbor.io/v1alpha3/registry_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.

// +kubebuilder:object:root=true
// +kubebuilder:storageversion
// +k8s:openapi-gen=true
// +resource:path=registry
// +kubebuilder:subresource:status
Expand Down
1 change: 0 additions & 1 deletion apis/goharbor.io/v1alpha3/registryctl_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ const (
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.

// +kubebuilder:object:root=true
// +kubebuilder:storageversion
// +k8s:openapi-gen=true
// +resource:path=registrycontroller
// +kubebuilder:subresource:status
Expand Down
15 changes: 0 additions & 15 deletions apis/goharbor.io/v1alpha3/registryctl_webhook.go

This file was deleted.

1 change: 0 additions & 1 deletion apis/goharbor.io/v1alpha3/trivy_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.

// +kubebuilder:object:root=true
// +kubebuilder:storageversion
// +k8s:openapi-gen=true
// +resource:path=trivy
// +kubebuilder:subresource:status
Expand Down
15 changes: 0 additions & 15 deletions apis/goharbor.io/v1alpha3/trivy_webhook.go

This file was deleted.

1 change: 1 addition & 0 deletions apis/goharbor.io/v1beta1/chartmuseum_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.

// +kubebuilder:object:root=true
// +kubebuilder:storageversion
// +k8s:openapi-gen=true
// +resource:path=chartmuseum
// +kubebuilder:subresource:status
Expand Down
1 change: 1 addition & 0 deletions apis/goharbor.io/v1beta1/core_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.

// +kubebuilder:object:root=true
// +kubebuilder:storageversion
// +k8s:openapi-gen=true
// +resource:path=core
// +kubebuilder:subresource:status
Expand Down
1 change: 1 addition & 0 deletions apis/goharbor.io/v1beta1/exporter_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.

// +kubebuilder:object:root=true
// +kubebuilder:storageversion
// +k8s:openapi-gen=true
// +resource:path=exporter
// +kubebuilder:subresource:status
Expand Down
1 change: 1 addition & 0 deletions apis/goharbor.io/v1beta1/harbor_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.

// +kubebuilder:object:root=true
// +kubebuilder:storageversion
// +k8s:openapi-gen=true
// +resource:path=harbor
// +kubebuilder:subresource:status
Expand Down
Loading

0 comments on commit 678182a

Please sign in to comment.