Skip to content

Commit ed741cc

Browse files
authored
Allow name of the MCE object to be changed (redhat-performance#33)
1 parent caf19ac commit ed741cc

File tree

5 files changed

+7
-3
lines changed

5 files changed

+7
-3
lines changed

ansible/roles/mce-hub-deploy/defaults/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@
22
# mce-hub-deploy default vars
33

44
mce_default_channel: stable-2.7
5+
6+
mce_name: multiclusterengine

ansible/roles/mce-hub-deploy/tasks/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
3535
- name: Wait until MultiClusterEngine is Available
3636
shell: |
37-
KUBECONFIG={{ hub_cluster_kubeconfig }} {%raw%}oc get multiclusterengine engine -o go-template='{{ .status.phase }}'{%endraw%}
37+
KUBECONFIG={{ hub_cluster_kubeconfig }} oc get multiclusterengine {{ mce_name }} -o go-template={%raw%}'{{ .status.phase }}'{%endraw%}
3838
register: mce_available
3939
until: mce_available.stdout == "Available"
4040
retries: 300

ansible/roles/mce-hub-deploy/templates/mce.yaml.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
apiVersion: multicluster.openshift.io/v1
33
kind: MultiClusterEngine
44
metadata:
5-
name: engine
5+
name: {{ mce_name }}
66
spec: {}

ansible/roles/mce-image-based-install/defaults/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@
22
# mce-image-based-install default vars
33

44
mce_enable_ibio: false
5+
6+
mce_name: multiclusterengine

ansible/roles/mce-image-based-install/tasks/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
- name: Enable Image Based Install Operator
66
shell: |
77
export KUBECONFIG={{ hub_cluster_kubeconfig }}
8-
oc get mce multiclusterengine -o json | jq '.spec.overrides.components[] |= (select(.name=="image-based-install-operator").enabled = true)' | oc replace -f -
8+
oc get mce {{ mce_name }} -o json | jq '.spec.overrides.components[] |= (select(.name=="image-based-install-operator").enabled = true)' | oc replace -f -
99
when: mce_enable_ibio
1010

1111
- name: Wait for Image Based Install pod exists

0 commit comments

Comments
 (0)