Skip to content

Commit 9717f22

Browse files
authored
PMM-14170 Review from Vasyl
1 parent fc575ee commit 9717f22

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pmm_qa/valkey/valkey.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
sentinel_count: 3
2424
sentinel_start_port: 26379
2525
sentinel_quorum: 2
26+
random_number: "{{ lookup('pipe', 'shuf -i 1-99999 -n 1') }}"
2627

2728
pmm_server_name: "pmm-server"
2829

@@ -202,19 +203,19 @@
202203
- name: Add the primary to monitoring
203204
community.docker.docker_container_exec:
204205
container: "valkey-primary"
205-
command: pmm-admin add valkey --cluster=valkey-cluster --replication-set=valkey-repl --environment=valkey-test --username=default --password="{{ valkey_password }}" --service-name=valkey-primary-svc --host=valkey-primary --port=6379 --custom-labels='role=primary'
206+
command: pmm-admin add valkey --cluster=valkey-cluster --replication-set=valkey-repl --environment=valkey-test --username=default --password="{{ valkey_password }}" --service-name=valkey-primary-svc-{{ random_number }} --host=valkey-primary --port=6379 --custom-labels='role=primary'
206207
ignore_errors: yes
207208

208209
- name: Add the replicas to monitoring
209210
community.docker.docker_container_exec:
210211
container: "valkey-replica-{{ item }}"
211-
command: pmm-admin add valkey --cluster=valkey-cluster --replication-set=valkey-repl --environment=valkey-test --username=default --password="{{ valkey_password }}" --service-name=valkey-replica{{ item }}-svc --host=valkey-replica-{{ item }} --port=6379 --custom-labels='role=replica'
212+
command: pmm-admin add valkey --cluster=valkey-cluster --replication-set=valkey-repl --environment=valkey-test --username=default --password="{{ valkey_password }}" --service-name=valkey-replica{{ item }}-svc-{{ random_number }} --host=valkey-replica-{{ item }} --port=6379 --custom-labels='role=replica'
212213
loop: "{{ range(1, valkey_replica_count + 1) | list }}"
213214
ignore_errors: yes
214215

215216
- name: Add Sentinels to monitoring
216217
community.docker.docker_container_exec:
217218
container: "sentinel-{{ item }}"
218-
command: pmm-admin add valkey --cluster=valkey-cluster --environment=valkey-test --username=default --password="{{ valkey_password }}" --service-name=sentinel{{ item }}-svc --host=sentinel-{{ item }} --port={{ sentinel_start_port }} --custom-labels='role=sentinel'
219+
command: pmm-admin add valkey --cluster=valkey-cluster --environment=valkey-test --username=default --password="{{ valkey_password }}" --service-name=sentinel{{ item }}-svc-{{ random_number }} --host=sentinel-{{ item }} --port={{ sentinel_start_port }} --custom-labels='role=sentinel'
219220
loop: "{{ range(1, sentinel_count + 1) | list }}"
220221
ignore_errors: yes

0 commit comments

Comments
 (0)