mirror of
https://github.com/TECHNOFAB11/zfs-localpv.git
synced 2025-12-12 14:30:12 +01:00
40 lines
1.3 KiB
YAML
40 lines
1.3 KiB
YAML
---
|
|
- block:
|
|
- name: Check whether the provider storageclass is present
|
|
shell: kubectl get sc "{{ lookup('env','STORAGE_CLASS') }}"
|
|
args:
|
|
executable: /bin/bash
|
|
register: result
|
|
failed_when: "result.rc != 0"
|
|
|
|
- name: Replace the storageclass placeholder with test specific value
|
|
replace:
|
|
path: "{{ application }}"
|
|
regexp: "testclass"
|
|
replace: "{{ lookup('env','STORAGE_CLASS') }}"
|
|
|
|
- name: Replace the application pvc placeholder with test specific value
|
|
replace:
|
|
path: "{{ application }}"
|
|
regexp: "testclaim"
|
|
replace: "{{ lookup('env','APP_PVC') }}"
|
|
|
|
- name: Replace the persistent volume capcity placeholder with test specific value
|
|
replace:
|
|
path: "{{ application }}"
|
|
regexp: "teststorage"
|
|
replace: "{{ lookup('env','PV_CAPACITY') }}"
|
|
|
|
- name: Get the application label value from env
|
|
set_fact:
|
|
app_lkey: "{{ app_label.split('=')[0] }}"
|
|
app_lvalue: "{{ app_label.split('=')[1] }}"
|
|
|
|
- name: Replace the application label placeholder in deployment spec
|
|
replace:
|
|
path: "{{ application }}"
|
|
regexp: "lkey: lvalue"
|
|
replace: "{{ app_lkey }}: {{ app_lvalue }}"
|
|
|
|
# Create test specific namespace
|
|
- include_tasks: /e2e-tests/utils/k8s/create_ns.yml
|