diff --git a/install/installer/cmd/mirror_list.go b/install/installer/cmd/mirror_list.go index d75be508bd606a..f282f738256495 100644 --- a/install/installer/cmd/mirror_list.go +++ b/install/installer/cmd/mirror_list.go @@ -113,7 +113,9 @@ func renderAllKubernetesObject(cfgVersion string, cfg *configv1.Config) ([]strin }, }, S3Storage: &configv1.S3Storage{ - Bucket: "some-bucket", + Bucket: "some-bucket", + Region: "some-region", + Endpoint: "some-url", Certificate: configv1.ObjectRef{ Kind: configv1.ObjectRefSecret, Name: "value", diff --git a/install/installer/pkg/components/docker-registry/helm.go b/install/installer/pkg/components/docker-registry/helm.go index b6fc543437558f..96dadfe467fb81 100644 --- a/install/installer/pkg/components/docker-registry/helm.go +++ b/install/installer/pkg/components/docker-registry/helm.go @@ -43,11 +43,14 @@ var Helm = common.CompositeHelmFunc( inCluster := pointer.BoolDeref(cfg.Config.ContainerRegistry.InCluster, false) s3Storage := cfg.Config.ContainerRegistry.S3Storage + enablePersistence := "true" if inCluster && s3Storage != nil { + enablePersistence = "false" registryValues = append(registryValues, - helm.KeyValue("docker-registry.s3.region", cfg.Config.Metadata.Region), + helm.KeyValue("docker-registry.s3.region", s3Storage.Region), helm.KeyValue("docker-registry.s3.bucket", s3Storage.Bucket), + helm.KeyValue("docker-registry.s3.regionEndpoint", s3Storage.Endpoint), helm.KeyValue("docker-registry.s3.encrypt", "true"), helm.KeyValue("docker-registry.s3.secure", "true"), helm.KeyValue("docker-registry.storage", "s3"), @@ -55,6 +58,8 @@ var Helm = common.CompositeHelmFunc( ) } + registryValues = append(registryValues, helm.KeyValue("docker-registry.persistence.enabled", enablePersistence)) + return &common.HelmConfig{ Enabled: inCluster, Values: &values.Options{ diff --git a/install/installer/pkg/config/v1/config.go b/install/installer/pkg/config/v1/config.go index c255c629f24209..f31ee3d9e33d73 100644 --- a/install/installer/pkg/config/v1/config.go +++ b/install/installer/pkg/config/v1/config.go @@ -214,6 +214,8 @@ type ContainerRegistryExternal struct { type S3Storage struct { Bucket string `json:"bucket" validate:"required"` + Region string `json:"region" validate:"required"` + Endpoint string `json:"endpoint" validate:"required"` Certificate ObjectRef `json:"certificate" validate:"required"` } diff --git a/install/installer/third_party/charts/docker-registry/values.yaml b/install/installer/third_party/charts/docker-registry/values.yaml index 5369cb2738fa8e..d4874eb029b98d 100644 --- a/install/installer/third_party/charts/docker-registry/values.yaml +++ b/install/installer/third_party/charts/docker-registry/values.yaml @@ -2,6 +2,4 @@ # Licensed under the GNU Affero General Public License (AGPL). # See License-AGPL.txt in the project root for license information. -docker-registry: - persistence: - enabled: true \ No newline at end of file +docker-registry: {}