Skip to content

Commit 08411ec

Browse files
committed
Consolidate openstack ns var: cifmw_openstack_namespace
There are multiple variables related to openstack namespace in OCP. This commit tries to consolidate them all with a single variable defined in group_vars. At some places, ns var were being read from cifmw_install_yamls_defaults and they are left unchanged. Signed-off-by: Amartya Sinha <amsinha@redhat.com>
1 parent 14b37c7 commit 08411ec

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

group_vars/all.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,5 @@ cifmw_installyamls_repos_relative: src/github.com/openstack-k8s-operators/instal
1010
cifmw_installyamls_repos: "{{ ansible_user_dir }}/{{ cifmw_installyamls_repos_relative }}"
1111
cifmw_architecture_repo_relative: src/github.com/openstack-k8s-operators/architecture
1212
cifmw_architecture_repo: "{{ ansible_user_dir }}/{{ cifmw_architecture_repo_relative }}"
13+
14+
cifmw_openstack_namespace: openstack

roles/shiftstack/molecule/default/cleanup.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
vars:
2020
cifmw_path: "{{ ansible_user_dir }}/.crc/bin:{{ ansible_user_dir }}/.crc/bin/oc:{{ ansible_user_dir }}/bin:{{ ansible_env.PATH }}"
2121
cifmw_openshift_kubeconfig: "{{ ansible_user_dir }}/.crc/machines/crc/kubeconfig"
22-
openstack_namespace_name: openstack
2322
tasks:
2423
- name: Include the shiftstack role and run the cleanup
2524
ansible.builtin.include_role:
@@ -34,4 +33,4 @@
3433
apiVersion: v1
3534
kind: Namespace
3635
metadata:
37-
name: "{{ openstack_namespace_name }}"
36+
name: "{{ cifmw_openstack_namespace }}"

roles/shiftstack/molecule/default/prepare.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
vars:
2121
cifmw_path: "{{ ansible_user_dir }}/.crc/bin:{{ ansible_user_dir }}/.crc/bin/oc:{{ ansible_user_dir }}/bin:{{ ansible_env.PATH }}"
2222
cifmw_openshift_kubeconfig: "{{ ansible_user_dir }}/.crc/machines/crc/kubeconfig"
23-
openstack_namespace_name: openstack
2423
openstack_config_name: openstack-config
2524
openstack_config_secret_name: openstack-config-secret
2625
openstack_root_ca_secret_name: rootca-public
@@ -40,7 +39,7 @@
4039
apiVersion: v1
4140
kind: Namespace
4241
metadata:
43-
name: "{{ openstack_namespace_name }}"
42+
name: "{{ cifmw_openstack_namespace }}"
4443

4544
- name: Create a dummy configmap
4645
kubernetes.core.k8s:
@@ -51,7 +50,7 @@
5150
kind: ConfigMap
5251
metadata:
5352
name: "{{ openstack_config_name }}"
54-
namespace: "{{ openstack_namespace_name }}"
53+
namespace: "{{ cifmw_openstack_namespace }}"
5554
data:
5655
key1: dummy1
5756
key2: dummy2
@@ -65,7 +64,7 @@
6564
kind: Secret
6665
metadata:
6766
name: "{{ openstack_config_secret_name }}"
68-
namespace: "{{ openstack_namespace_name }}"
67+
namespace: "{{ cifmw_openstack_namespace }}"
6968
type: Opaque
7069
data:
7170
secure.yaml: ZHVtbXkK # Base64 encoded value of "dummy"
@@ -79,7 +78,7 @@
7978
kind: Secret
8079
metadata:
8180
name: "{{ openstack_root_ca_secret_name }}"
82-
namespace: "{{ openstack_namespace_name }}"
81+
namespace: "{{ cifmw_openstack_namespace }}"
8382
type: Opaque
8483
data:
8584
ca.crt: ZHVtbXkK # Base64 encoded value of "dummy"

0 commit comments

Comments
 (0)