1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/registry-configuring-storage-gcp-user-infra.adoc
2025-11-18 20:12:03 +00:00

51 lines
1.6 KiB
Plaintext

// Module included in the following assemblies:
//
// * registry/configuring_registry_storage-gcp-user-infrastructure.adoc
:_mod-docs-content-type: PROCEDURE
[id="registry-configuring-storage-gcp-user-infra_{context}"]
= Configuring the registry storage for {gcp-short} with user-provisioned infrastructure
[role="_abstract"]
If the Registry Operator cannot create a {gcp-first} bucket, you must set up the storage medium manually and configure the settings in the registry custom resource (CR).
.Prerequisites
* A cluster on {gcp-short} with user-provisioned infrastructure.
* To configure registry storage for {gcp-short}, you need to provide Registry Operator
cloud credentials.
* For GCS on {gcp-short} storage, the secret is expected to contain one key whose value is the
contents of a credentials file provided by {gcp-short}:
** `REGISTRY_STORAGE_GCS_KEYFILE`
[WARNING]
====
You can secure your registry images that use a {gcp-full} Storage bucket by setting link:https://cloud.google.com/storage/docs/using-public-access-prevention[public access prevention].
====
.Procedure
. Set up an link:https://cloud.google.com/storage/docs/lifecycle[Object Lifecycle Management policy] to abort incomplete multipart uploads that are one day old.
. Fill in the storage configuration in `configs.imageregistry.operator.openshift.io/cluster`:
+
[source,terminal]
----
$ oc edit configs.imageregistry.operator.openshift.io/cluster
----
+
.Example configuration
[source,yaml]
----
apiVersion: imageregistry.operator.openshift.io/v1
kind: Config
metadata:
name: cluster
spec:
storage:
gcs:
bucket: <bucket_name>
projectID: <project_id>
region: <region_name>
----