diff --git a/apis/quay/v1/quayregistry_types.go b/apis/quay/v1/quayregistry_types.go index 11e3b69f8..6cd1f7563 100644 --- a/apis/quay/v1/quayregistry_types.go +++ b/apis/quay/v1/quayregistry_types.go @@ -390,7 +390,7 @@ func NeedsBundleSecret(quay *QuayRegistry) bool { // being Managed AND containing a custom user config provided through the config bundle // secret. func ComponentSupportsConfigWhenManaged(cmp Component) bool { - return cmp.Kind == ComponentRoute || cmp.Kind == ComponentMirror || cmp.Kind == ComponentRedis + return cmp.Kind == ComponentRoute || cmp.Kind == ComponentMirror || cmp.Kind == ComponentRedis || cmp.Kind == ComponentCache } func EnsureComponents(components []Component) []Component { diff --git a/controllers/quay/quayregistry_controller_test.go b/controllers/quay/quayregistry_controller_test.go index 2f7fdb60f..8b83bb252 100644 --- a/controllers/quay/quayregistry_controller_test.go +++ b/controllers/quay/quayregistry_controller_test.go @@ -1067,8 +1067,9 @@ func Test_hasNecessaryConfig(t *testing.T) { quay: quayWithUnmanagedComponents(v1.ComponentCache), }, { + // managed cache supports user config: operator overwrites infra fields anyway name: "managed cache and redis but with provided config", - experr: true, + experr: false, cfg: map[string][]byte{ "config.yaml": []byte("DATA_MODEL_CACHE_CONFIG:\n engine: redis\n redis_config:\n host: somehost\n port: 12345\n repository_blob_cache_ttl: 120s\n catalog_page_cache_ttl: 120s\n active_repo_tags_cache_ttl: 120s\n value_size_limit: 5MiB\n")}, quay: quayWithUnmanagedComponents(),