diff options
author | Andrew Butcher <abutcher@afrolegs.com> | 2016-10-10 19:43:29 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-10 19:43:29 -0400 |
commit | 131bcdcd7ee5c3191c748beb7aad8d45c4477b98 (patch) | |
tree | fde8f40b975acd3800d7e7b3e14689254d26d5f2 /roles | |
parent | 2514eee77b58e09091bc957c959e2153868ee0f4 (diff) | |
parent | 492a513a253eb7a61b47f312f1002a62c7a7bfb0 (diff) | |
download | openshift-131bcdcd7ee5c3191c748beb7aad8d45c4477b98.tar.gz openshift-131bcdcd7ee5c3191c748beb7aad8d45c4477b98.tar.bz2 openshift-131bcdcd7ee5c3191c748beb7aad8d45c4477b98.tar.xz openshift-131bcdcd7ee5c3191c748beb7aad8d45c4477b98.zip |
Merge pull request #2579 from sdodson/fix-registry-volume-namespace
Fix config and namespace for registry volume detection
Diffstat (limited to 'roles')
-rw-r--r-- | roles/openshift_hosted/tasks/registry/storage/persistent_volume.yml | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/roles/openshift_hosted/tasks/registry/storage/persistent_volume.yml b/roles/openshift_hosted/tasks/registry/storage/persistent_volume.yml index 60eefd71a..0172f5ca0 100644 --- a/roles/openshift_hosted/tasks/registry/storage/persistent_volume.yml +++ b/roles/openshift_hosted/tasks/registry/storage/persistent_volume.yml @@ -3,7 +3,11 @@ registry_volume_claim: "{{ openshift.hosted.registry.storage.volume.name }}-claim" - name: Determine if volume is already attached to dc/docker-registry - command: "{{ openshift.common.client_binary }} get -o template dc/docker-registry --template=\\{\\{.spec.template.spec.volumes\\}\\} --output-version=v1" + command: > + {{ openshift.common.client_binary }} + --config={{ openshift_hosted_kubeconfig }} + --namespace={{ openshift.hosted.registry.namespace | default('default') }} + get -o template dc/docker-registry --template=\\{\\{.spec.template.spec.volumes\\}\\} --output-version=v1 changed_when: false failed_when: false register: registry_volumes_output @@ -13,7 +17,10 @@ - name: Add volume to dc/docker-registry command: > - {{ openshift.common.client_binary }} volume dc/docker-registry + {{ openshift.common.client_binary }} + --config={{ openshift_hosted_kubeconfig }} + --namespace={{ openshift.hosted.registry.namespace | default('default') }} + volume dc/docker-registry --add --overwrite -t persistentVolumeClaim --claim-name={{ registry_volume_claim }} --name=registry-storage when: not volume_attached | bool |