summaryrefslogtreecommitdiffstats
path: root/roles/openshift_hosted/tasks
diff options
context:
space:
mode:
authorClayton Coleman <ccoleman@redhat.com>2017-08-17 15:33:21 -0400
committerClayton Coleman <ccoleman@redhat.com>2017-08-17 17:28:39 -0400
commitfb0adaad2e27f80ecae7790b206b29cbebdae36a (patch)
treed710cb5483fd0f077b1e58cbb034d594e306972d /roles/openshift_hosted/tasks
parentcf1aa0e3bc4bc207a0da718695326b6850b90610 (diff)
downloadopenshift-fb0adaad2e27f80ecae7790b206b29cbebdae36a.tar.gz
openshift-fb0adaad2e27f80ecae7790b206b29cbebdae36a.tar.bz2
openshift-fb0adaad2e27f80ecae7790b206b29cbebdae36a.tar.xz
openshift-fb0adaad2e27f80ecae7790b206b29cbebdae36a.zip
Allow GCS object storage to be configured
Previously, setting the GCS registry object storage settings resulted in an invalid configuration. This generates a registry-config secret that has the correct file if the GCS config is set.
Diffstat (limited to 'roles/openshift_hosted/tasks')
-rw-r--r--roles/openshift_hosted/tasks/registry/storage/object_storage.yml15
l---------roles/openshift_hosted/tasks/registry/storage/registry_config_secret.j21
2 files changed, 14 insertions, 2 deletions
diff --git a/roles/openshift_hosted/tasks/registry/storage/object_storage.yml b/roles/openshift_hosted/tasks/registry/storage/object_storage.yml
index 8aaba0f3c..8553a8098 100644
--- a/roles/openshift_hosted/tasks/registry/storage/object_storage.yml
+++ b/roles/openshift_hosted/tasks/registry/storage/object_storage.yml
@@ -2,7 +2,7 @@
- include: s3.yml
when: openshift.hosted.registry.storage.provider == 's3'
-- name: Ensure the resgistry secret exists
+- name: Ensure the registry secret exists
oc_secret:
name: "{{ registry_config_secret_name }}"
state: present
@@ -10,6 +10,19 @@
- path: /tmp/config.yml
data: "{{ lookup('template', 'registry_config.j2') }}"
register: registry_config_out
+ when: openshift_hosted_registry_storage_gcs_keyfile is not defined
+
+- name: Ensure the registry secret exists for GCS
+ oc_secret:
+ name: "{{ registry_config_secret_name }}"
+ state: present
+ contents:
+ - path: /tmp/config.yml
+ data: "{{ lookup('template', 'registry_config.j2') }}"
+ - path: /tmp/gcs.json
+ data: "{{ lookup('file', openshift_hosted_registry_storage_gcs_keyfile) | string }}"
+ register: registry_config_out
+ when: openshift_hosted_registry_storage_gcs_keyfile is defined
- name: Add secrets to registry service account
oc_serviceaccount_secret:
diff --git a/roles/openshift_hosted/tasks/registry/storage/registry_config_secret.j2 b/roles/openshift_hosted/tasks/registry/storage/registry_config_secret.j2
deleted file mode 120000
index b9e82c1ea..000000000
--- a/roles/openshift_hosted/tasks/registry/storage/registry_config_secret.j2
+++ /dev/null
@@ -1 +0,0 @@
-../../../templates/registry_config_secret.j2 \ No newline at end of file