diff options
author | Brenton Leanhardt <bleanhar@redhat.com> | 2015-11-06 13:27:24 -0500 |
---|---|---|
committer | Brenton Leanhardt <bleanhar@redhat.com> | 2015-11-06 13:27:24 -0500 |
commit | 2929616a53a62d82e0370f276b44cf3150379df5 (patch) | |
tree | 4e642e29aebc61d94762dd3a485f259b216af4d3 /roles/kube_nfs_volumes | |
parent | 60e81d59f34bebd596ede20c55d4fbaeafd25686 (diff) | |
parent | 15ca45191af7c5c2f04f9096922590412e889e17 (diff) | |
download | openshift-2929616a53a62d82e0370f276b44cf3150379df5.tar.gz openshift-2929616a53a62d82e0370f276b44cf3150379df5.tar.bz2 openshift-2929616a53a62d82e0370f276b44cf3150379df5.tar.xz openshift-2929616a53a62d82e0370f276b44cf3150379df5.zip |
Merge pull request #829 from detiber/nov1beta3nfs
Remove v1beta3 by default for kube_nfs_volumes
Diffstat (limited to 'roles/kube_nfs_volumes')
-rw-r--r-- | roles/kube_nfs_volumes/README.md | 3 | ||||
-rw-r--r-- | roles/kube_nfs_volumes/defaults/main.yml | 6 | ||||
-rw-r--r-- | roles/kube_nfs_volumes/tasks/main.yml | 13 | ||||
l--------- | roles/kube_nfs_volumes/templates/v1/nfs.json.j2 | 1 | ||||
-rw-r--r-- | roles/kube_nfs_volumes/templates/v1beta3/nfs.json.j2 (renamed from roles/kube_nfs_volumes/templates/nfs.json.j2) | 0 |
5 files changed, 17 insertions, 6 deletions
diff --git a/roles/kube_nfs_volumes/README.md b/roles/kube_nfs_volumes/README.md index 56c69c286..1520f79b2 100644 --- a/roles/kube_nfs_volumes/README.md +++ b/roles/kube_nfs_volumes/README.md @@ -44,6 +44,9 @@ kubernetes_url: https://10.245.1.2:6443 # Token to use for authentication to the API server kubernetes_token: tJdce6Fn3cL1112YoIJ5m2exzAbzcPZX + +# API Version to use for kubernetes +kube_api_version: v1 ``` ## Dependencies diff --git a/roles/kube_nfs_volumes/defaults/main.yml b/roles/kube_nfs_volumes/defaults/main.yml index e296492f9..bdd994d07 100644 --- a/roles/kube_nfs_volumes/defaults/main.yml +++ b/roles/kube_nfs_volumes/defaults/main.yml @@ -1,4 +1,10 @@ --- +kubernetes_url: https://172.30.0.1:443 + +kube_api_version: v1 + +kube_req_template: "../templates/{{ kube_api_version }}/nfs.json.j2" + # Options of NFS exports. nfs_export_options: "*(rw,no_root_squash,insecure,no_subtree_check)" diff --git a/roles/kube_nfs_volumes/tasks/main.yml b/roles/kube_nfs_volumes/tasks/main.yml index f4a506234..d1dcf261a 100644 --- a/roles/kube_nfs_volumes/tasks/main.yml +++ b/roles/kube_nfs_volumes/tasks/main.yml @@ -16,10 +16,11 @@ - include: nfs.yml - name: export physical volumes - uri: url={{ kubernetes_url }}/api/v1beta3/persistentvolumes - method=POST - body='{{ lookup("template", "../templates/nfs.json.j2") }}' - body_format=json - status_code=201 - HEADER_Authorization="Bearer {{ kubernetes_token }}" + uri: + url: "{{ kubernetes_url }}/api/{{ kube_api_version }}/persistentvolumes" + method: POST + body: "{{ lookup('template', kube_req_template) }}" + body_format: json + status_code: 201 + HEADER_Authorization: "Bearer {{ kubernetes_token }}" with_items: partition_pool diff --git a/roles/kube_nfs_volumes/templates/v1/nfs.json.j2 b/roles/kube_nfs_volumes/templates/v1/nfs.json.j2 new file mode 120000 index 000000000..49c1191bc --- /dev/null +++ b/roles/kube_nfs_volumes/templates/v1/nfs.json.j2 @@ -0,0 +1 @@ +../v1beta3/nfs.json.j2
\ No newline at end of file diff --git a/roles/kube_nfs_volumes/templates/nfs.json.j2 b/roles/kube_nfs_volumes/templates/v1beta3/nfs.json.j2 index b42886ef1..b42886ef1 100644 --- a/roles/kube_nfs_volumes/templates/nfs.json.j2 +++ b/roles/kube_nfs_volumes/templates/v1beta3/nfs.json.j2 |