From 84a131773a1c353fbcccf2c38667ad37519f4711 Mon Sep 17 00:00:00 2001 From: Alexis Leroux <60Alexis@gmail.com> Date: Thu, 27 Jul 2023 12:35:01 +0200 Subject: [PATCH] Conserve sentinel_master_set value between upgraded versions (#18875) fix(migration): Conserve sentinel_master_set value between upgraded versions Signed-off-by: Alexis Leroux Co-authored-by: Alexis Leroux Co-authored-by: MinerYang --- make/photon/prepare/migrations/version_2_0_0/harbor.yml.jinja | 4 ++++ make/photon/prepare/migrations/version_2_1_0/harbor.yml.jinja | 4 ++++ make/photon/prepare/migrations/version_2_2_0/harbor.yml.jinja | 4 ++++ make/photon/prepare/migrations/version_2_3_0/harbor.yml.jinja | 4 ++++ make/photon/prepare/migrations/version_2_4_0/harbor.yml.jinja | 4 ++++ make/photon/prepare/migrations/version_2_5_0/harbor.yml.jinja | 4 ++++ make/photon/prepare/migrations/version_2_6_0/harbor.yml.jinja | 4 ++++ make/photon/prepare/migrations/version_2_7_0/harbor.yml.jinja | 4 ++++ make/photon/prepare/migrations/version_2_8_0/harbor.yml.jinja | 4 ++++ 9 files changed, 36 insertions(+) diff --git a/make/photon/prepare/migrations/version_2_0_0/harbor.yml.jinja b/make/photon/prepare/migrations/version_2_0_0/harbor.yml.jinja index 1acfdef03..a0253023f 100644 --- a/make/photon/prepare/migrations/version_2_0_0/harbor.yml.jinja +++ b/make/photon/prepare/migrations/version_2_0_0/harbor.yml.jinja @@ -326,7 +326,11 @@ external_redis: host: {{ external_redis.host }}:{{ external_redis.port }} password: {{ external_redis.password }} # sentinel_master_set must be set to support redis+sentinel + {% if external_redis.sentinel_master_set is defined %} + sentinel_master_set: {{ external_redis.sentinel_master_set }} + {% else %} #sentinel_master_set: + {% endif %} # db_index 0 is for core, it's unchangeable registry_db_index: {{ external_redis.registry_db_index }} jobservice_db_index: {{ external_redis.jobservice_db_index }} diff --git a/make/photon/prepare/migrations/version_2_1_0/harbor.yml.jinja b/make/photon/prepare/migrations/version_2_1_0/harbor.yml.jinja index 347d16171..269217b40 100644 --- a/make/photon/prepare/migrations/version_2_1_0/harbor.yml.jinja +++ b/make/photon/prepare/migrations/version_2_1_0/harbor.yml.jinja @@ -376,7 +376,11 @@ external_redis: host: {{ external_redis.host }}:{{ external_redis.port }} password: {{ external_redis.password }} # sentinel_master_set must be set to support redis+sentinel + {% if external_redis.sentinel_master_set is defined %} + sentinel_master_set: {{ external_redis.sentinel_master_set }} + {% else %} #sentinel_master_set: + {% endif %} # db_index 0 is for core, it's unchangeable registry_db_index: {{ external_redis.registry_db_index }} jobservice_db_index: {{ external_redis.jobservice_db_index }} diff --git a/make/photon/prepare/migrations/version_2_2_0/harbor.yml.jinja b/make/photon/prepare/migrations/version_2_2_0/harbor.yml.jinja index f5ec35ea9..686018335 100644 --- a/make/photon/prepare/migrations/version_2_2_0/harbor.yml.jinja +++ b/make/photon/prepare/migrations/version_2_2_0/harbor.yml.jinja @@ -353,7 +353,11 @@ external_redis: host: {{ external_redis.host }} password: {{ external_redis.password }} # sentinel_master_set must be set to support redis+sentinel + {% if external_redis.sentinel_master_set is defined %} + sentinel_master_set: {{ external_redis.sentinel_master_set }} + {% else %} #sentinel_master_set: + {% endif %} # db_index 0 is for core, it's unchangeable registry_db_index: {{ external_redis.registry_db_index }} jobservice_db_index: {{ external_redis.jobservice_db_index }} diff --git a/make/photon/prepare/migrations/version_2_3_0/harbor.yml.jinja b/make/photon/prepare/migrations/version_2_3_0/harbor.yml.jinja index 282f27325..ca8aa0b12 100644 --- a/make/photon/prepare/migrations/version_2_3_0/harbor.yml.jinja +++ b/make/photon/prepare/migrations/version_2_3_0/harbor.yml.jinja @@ -353,7 +353,11 @@ external_redis: host: {{ external_redis.host }} password: {{ external_redis.password }} # sentinel_master_set must be set to support redis+sentinel + {% if external_redis.sentinel_master_set is defined %} + sentinel_master_set: {{ external_redis.sentinel_master_set }} + {% else %} #sentinel_master_set: + {% endif %} # db_index 0 is for core, it's unchangeable registry_db_index: {{ external_redis.registry_db_index }} jobservice_db_index: {{ external_redis.jobservice_db_index }} diff --git a/make/photon/prepare/migrations/version_2_4_0/harbor.yml.jinja b/make/photon/prepare/migrations/version_2_4_0/harbor.yml.jinja index 8f4767295..26100256d 100644 --- a/make/photon/prepare/migrations/version_2_4_0/harbor.yml.jinja +++ b/make/photon/prepare/migrations/version_2_4_0/harbor.yml.jinja @@ -359,7 +359,11 @@ external_redis: host: {{ external_redis.host }} password: {{ external_redis.password }} # sentinel_master_set must be set to support redis+sentinel + {% if external_redis.sentinel_master_set is defined %} + sentinel_master_set: {{ external_redis.sentinel_master_set }} + {% else %} #sentinel_master_set: + {% endif %} # db_index 0 is for core, it's unchangeable registry_db_index: {{ external_redis.registry_db_index }} jobservice_db_index: {{ external_redis.jobservice_db_index }} diff --git a/make/photon/prepare/migrations/version_2_5_0/harbor.yml.jinja b/make/photon/prepare/migrations/version_2_5_0/harbor.yml.jinja index d3722b9f1..e6bec1d9c 100644 --- a/make/photon/prepare/migrations/version_2_5_0/harbor.yml.jinja +++ b/make/photon/prepare/migrations/version_2_5_0/harbor.yml.jinja @@ -373,7 +373,11 @@ external_redis: host: {{ external_redis.host }} password: {{ external_redis.password }} # sentinel_master_set must be set to support redis+sentinel + {% if external_redis.sentinel_master_set is defined %} + sentinel_master_set: {{ external_redis.sentinel_master_set }} + {% else %} #sentinel_master_set: + {% endif %} # db_index 0 is for core, it's unchangeable registry_db_index: {{ external_redis.registry_db_index }} jobservice_db_index: {{ external_redis.jobservice_db_index }} diff --git a/make/photon/prepare/migrations/version_2_6_0/harbor.yml.jinja b/make/photon/prepare/migrations/version_2_6_0/harbor.yml.jinja index f409ffa9f..4dafe665e 100644 --- a/make/photon/prepare/migrations/version_2_6_0/harbor.yml.jinja +++ b/make/photon/prepare/migrations/version_2_6_0/harbor.yml.jinja @@ -373,7 +373,11 @@ external_redis: host: {{ external_redis.host }} password: {{ external_redis.password }} # sentinel_master_set must be set to support redis+sentinel + {% if external_redis.sentinel_master_set is defined %} + sentinel_master_set: {{ external_redis.sentinel_master_set }} + {% else %} #sentinel_master_set: + {% endif %} # db_index 0 is for core, it's unchangeable registry_db_index: {{ external_redis.registry_db_index }} jobservice_db_index: {{ external_redis.jobservice_db_index }} diff --git a/make/photon/prepare/migrations/version_2_7_0/harbor.yml.jinja b/make/photon/prepare/migrations/version_2_7_0/harbor.yml.jinja index 782ec7927..b62eaedd8 100644 --- a/make/photon/prepare/migrations/version_2_7_0/harbor.yml.jinja +++ b/make/photon/prepare/migrations/version_2_7_0/harbor.yml.jinja @@ -380,7 +380,11 @@ external_redis: host: {{ external_redis.host }} password: {{ external_redis.password }} # sentinel_master_set must be set to support redis+sentinel + {% if external_redis.sentinel_master_set is defined %} + sentinel_master_set: {{ external_redis.sentinel_master_set }} + {% else %} #sentinel_master_set: + {% endif %} # db_index 0 is for core, it's unchangeable registry_db_index: {{ external_redis.registry_db_index }} jobservice_db_index: {{ external_redis.jobservice_db_index }} diff --git a/make/photon/prepare/migrations/version_2_8_0/harbor.yml.jinja b/make/photon/prepare/migrations/version_2_8_0/harbor.yml.jinja index d87218dfc..17fabd8ab 100644 --- a/make/photon/prepare/migrations/version_2_8_0/harbor.yml.jinja +++ b/make/photon/prepare/migrations/version_2_8_0/harbor.yml.jinja @@ -396,7 +396,11 @@ external_redis: # username: {% endif %} # sentinel_master_set must be set to support redis+sentinel + {% if external_redis.sentinel_master_set is defined %} + sentinel_master_set: {{ external_redis.sentinel_master_set }} + {% else %} #sentinel_master_set: + {% endif %} # db_index 0 is for core, it's unchangeable registry_db_index: {{ external_redis.registry_db_index }} jobservice_db_index: {{ external_redis.jobservice_db_index }}