From 33413296042950afdf9256133a6f4ac519734e7f Mon Sep 17 00:00:00 2001 From: Balazs Szekeres Date: Thu, 7 Nov 2019 13:19:52 +0100 Subject: [PATCH 1/1] Dynamic provisioner update The original seed code contained issues, this review is fixing them. - Missing meta task added - Now files templated to the right directory Change-Id: Ib7b505124fbfed41f45f18ea3dde48ad954e3b8f Signed-off-by: Balazs Szekeres --- SPECS/dynamic_local_pv_provisioner.spec | 4 ++-- ansible/roles/kubernetes_storage/meta/main.yaml | 17 +++++++++++++++++ .../tasks/create_ceph_auth_secret.yaml | 4 ++-- .../tasks/create_ceph_storage_class.yaml | 4 ++-- .../tasks/create_local_storage_class.yaml | 4 ++-- 5 files changed, 25 insertions(+), 8 deletions(-) create mode 100644 ansible/roles/kubernetes_storage/meta/main.yaml diff --git a/SPECS/dynamic_local_pv_provisioner.spec b/SPECS/dynamic_local_pv_provisioner.spec index f514bbe..7ca8b7f 100644 --- a/SPECS/dynamic_local_pv_provisioner.spec +++ b/SPECS/dynamic_local_pv_provisioner.spec @@ -15,10 +15,10 @@ %define COMPONENT dynamic_local_pv_provisioner %define RPM_NAME caas-%{COMPONENT} %define RPM_MAJOR_VERSION 0.1.0 -%define RPM_MINOR_VERSION 0 +%define RPM_MINOR_VERSION 1 %define go_version 1.12.10 %define DEPENDENCY_MANAGER_VERSION 0.5.4 -%define DYNAMIC_LOCAL_PV_PROVISIONER_VERSION 9ccb76f07031e1779f1308cb8471e2aea199e6c5 +%define DYNAMIC_LOCAL_PV_PROVISIONER_VERSION bad28e8e568a892e7d92050d34bbba4a24671462 %define IMAGE_TAG %{RPM_MAJOR_VERSION}-%{RPM_MINOR_VERSION} %define docker_build_dir %{_builddir}/%{RPM_NAME}-%{RPM_MAJOR_VERSION}/docker-build %define docker_save_dir %{_builddir}/%{RPM_NAME}-%{RPM_MAJOR_VERSION}/docker-save diff --git a/ansible/roles/kubernetes_storage/meta/main.yaml b/ansible/roles/kubernetes_storage/meta/main.yaml new file mode 100644 index 0000000..a769e1b --- /dev/null +++ b/ansible/roles/kubernetes_storage/meta/main.yaml @@ -0,0 +1,17 @@ +--- +# Copyright 2019 Nokia +# +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +dependencies: + - role: manifests + diff --git a/ansible/roles/kubernetes_storage/tasks/create_ceph_auth_secret.yaml b/ansible/roles/kubernetes_storage/tasks/create_ceph_auth_secret.yaml index 041699f..74314af 100644 --- a/ansible/roles/kubernetes_storage/tasks/create_ceph_auth_secret.yaml +++ b/ansible/roles/kubernetes_storage/tasks/create_ceph_auth_secret.yaml @@ -26,13 +26,13 @@ - name: template secret manifest template: src: ceph-secret.yaml.j2 - dest: "{{ caas.docker_directory }}/manifests/infra/ceph-{{ token.name }}-secret.yaml" + dest: "{{ caas.manifests_directory }}/ceph-{{ token.name }}-secret.yaml" vars: name: "{{ token.name }}" namespace: "{{ token.namespace }}" - name: create ceph-{{ token.name }} secret kubectl: - manifest: "{{ caas.docker_directory }}/manifests/infra/ceph-{{ token.name }}-secret.yaml" + manifest: "{{ caas.manifests_directory }}/ceph-{{ token.name }}-secret.yaml" state: present when: ( nodename | search("caas_master1") ) diff --git a/ansible/roles/kubernetes_storage/tasks/create_ceph_storage_class.yaml b/ansible/roles/kubernetes_storage/tasks/create_ceph_storage_class.yaml index dbc1854..808050c 100644 --- a/ansible/roles/kubernetes_storage/tasks/create_ceph_storage_class.yaml +++ b/ansible/roles/kubernetes_storage/tasks/create_ceph_storage_class.yaml @@ -34,13 +34,13 @@ - name: template storage class manifets template: src: ceph-storageclass.yaml.j2 - dest: "{{ caas.docker_directory }}/manifests/infra/ceph-storageclass.yaml" + dest: "{{ caas.manifests_directory }}/ceph-storageclass.yaml" vars: name: ceph-storage-class pool: caas - name: create kubernetes storage class kubectl: - manifest: "{{ caas.docker_directory }}/manifests/infra/ceph-storageclass.yaml" + manifest: "{{ caas.manifests_directory }}/ceph-storageclass.yaml" state: present when: ( nodename | search("caas_master1") ) diff --git a/ansible/roles/kubernetes_storage/tasks/create_local_storage_class.yaml b/ansible/roles/kubernetes_storage/tasks/create_local_storage_class.yaml index c80a22f..e1c4cc7 100644 --- a/ansible/roles/kubernetes_storage/tasks/create_local_storage_class.yaml +++ b/ansible/roles/kubernetes_storage/tasks/create_local_storage_class.yaml @@ -16,14 +16,14 @@ - name: template storage class manifets template: src: local-storageclass.yaml.j2 - dest: "{{ caas.docker_directory }}/manifests/infra/local-storageclass.yaml" + dest: "{{ caas.manifests_directory }}/local-storageclass.yaml" vars: name: ceph-storage-class pool: caas - name: create kubernetes storage class kubectl: - manifest: "{{ caas.docker_directory }}/manifests/infra/local-storageclass.yaml" + manifest: "{{ caas.manifests_directory }}/local-storageclass.yaml" state: present when: ( nodename | search("caas_master1") ) -- 2.16.6