Dynamic provisioner update 31/1931/7
authorBalazs Szekeres <balazs.szekeres@nokia.com>
Thu, 7 Nov 2019 12:19:52 +0000 (13:19 +0100)
committerBalazs Szekeres <balazs.szekeres@nokia.com>
Mon, 11 Nov 2019 09:55:53 +0000 (10:55 +0100)
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 <balazs.szekeres@nokia.com>
SPECS/dynamic_local_pv_provisioner.spec
ansible/roles/kubernetes_storage/meta/main.yaml [new file with mode: 0644]
ansible/roles/kubernetes_storage/tasks/create_ceph_auth_secret.yaml
ansible/roles/kubernetes_storage/tasks/create_ceph_storage_class.yaml
ansible/roles/kubernetes_storage/tasks/create_local_storage_class.yaml

index f514bbe..7ca8b7f 100644 (file)
 %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 (file)
index 0000000..a769e1b
--- /dev/null
@@ -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
+
index 041699f..74314af 100644 (file)
   - 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") )
index dbc1854..808050c 100644 (file)
   - 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") )
index c80a22f..e1c4cc7 100644 (file)
   - 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") )