Skip to content

Commit

Permalink
Merge pull request openstack-k8s-operators#152 from bogdando/db_by_cl…
Browse files Browse the repository at this point in the history
…uster_ip

Filter by mariadb service cluster IP instead
  • Loading branch information
fao89 authored Sep 14, 2023
2 parents bc58d55 + a15fdd5 commit 14d7e31
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docs/openstack/mariadb_copy.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ just illustrative, use values that are correct for your environment:
```
MARIADB_IMAGE=quay.io/podified-antelope-centos9/openstack-mariadb:current-podified
PODIFIED_MARIADB_IP=$(oc get -o yaml pod mariadb-openstack | grep podIP: | awk '{ print $2; }')
PODIFIED_CELL1_MARIADB_IP=$(oc get -o yaml pod mariadb-openstack-cell1 | grep podIP: | awk '{ print $2; }')
PODIFIED_MARIADB_IP=$(oc get svc --selector "cr=mariadb-openstack" -ojsonpath='{.items[0].spec.clusterIP}')
PODIFIED_CELL1_MARIADB_IP=$(oc get svc --selector "cr=mariadb-openstack-cell1" -ojsonpath='{.items[0].spec.clusterIP}')
PODIFIED_DB_ROOT_PASSWORD=$(oc get -o json secret/osp-secret | jq -r .data.DbRootPassword | base64 -d)
# Replace with your environment's MariaDB IP:
Expand Down
8 changes: 4 additions & 4 deletions tests/roles/mariadb_copy/tasks/main.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
- name: get podified MariaDB IP
- name: get podified MariaDB service cluster IP
ansible.builtin.shell: |
{{ shell_header }}
{{ oc_header }}
oc get -o yaml pod mariadb-openstack | grep podIP: | awk '{ print $2; }'
oc get svc --selector "cr=mariadb-openstack" -ojsonpath='{.items[0].spec.clusterIP}'
register: podified_mariadb_ip_result

- name: get podified cell1 MariaDB IP
ansible.builtin.shell: |
{{ shell_header }}
{{ oc_header }}
oc get -o yaml pod mariadb-openstack-cell1 | grep podIP: | awk '{ print $2; }'
oc get svc --selector "cr=mariadb-openstack-cell1" -ojsonpath='{.items[0].spec.clusterIP}'
register: podified_cell1_mariadb_ip_result

- name: set MariaDB copy shell vars
Expand Down Expand Up @@ -51,4 +51,4 @@
no_log: "{{ use_no_log }}"
ansible.builtin.shell:
cmd: "{{ lookup('ansible.builtin.template', 'post_checks.bash') }}"


0 comments on commit 14d7e31

Please sign in to comment.