diff --git a/docs/operator-manual/high_availability.md b/docs/operator-manual/high_availability.md index 9c3a8ec0b03e3..66ec5cbe96f13 100644 --- a/docs/operator-manual/high_availability.md +++ b/docs/operator-manual/high_availability.md @@ -6,8 +6,8 @@ A set of HA manifests are provided for users who wish to run Argo CD in a highly [Manifests ⧉](https://github.com/argoproj/argo-cd/tree/master/manifests) -!!! note - The HA installation will require at least three different nodes due to pod anti-affinity roles in the specs. +> **NOTE:** The HA installation will require at least three different nodes due to pod anti-affinity roles in the +> specs. Additionally, IPv6 only clusters are not supported. ## Scaling Up @@ -188,4 +188,4 @@ spec: targetRevision: HEAD path: my-application # ... -``` +``` \ No newline at end of file diff --git a/manifests/ha/base/redis-ha/chart/upstream.yaml b/manifests/ha/base/redis-ha/chart/upstream.yaml index 4788682f3fce6..cd890ba33dc4c 100644 --- a/manifests/ha/base/redis-ha/chart/upstream.yaml +++ b/manifests/ha/base/redis-ha/chart/upstream.yaml @@ -41,6 +41,7 @@ data: port 6379 rename-command FLUSHDB "" rename-command FLUSHALL "" + bind 0.0.0.0 maxmemory 0 maxmemory-policy volatile-lru min-replicas-max-lag 5 @@ -53,6 +54,7 @@ data: sentinel.conf: | dir "/data" port 26379 + bind 0.0.0.0 sentinel down-after-milliseconds argocd 10000 sentinel failover-timeout argocd 180000 maxclients 10000 @@ -618,7 +620,7 @@ data: timeout check 2s listen health_check_http_url - bind [::]:8888 v4v6 + bind :8888 mode http monitor-uri /healthz option dontlognull @@ -665,7 +667,7 @@ data: # decide redis backend to use #master frontend ft_redis_master - bind [::]:6379 v4v6 + bind :6379 use_backend bk_redis_master # Check all redis servers to see if they think they are master backend bk_redis_master @@ -1045,7 +1047,7 @@ spec: release: argocd revision: "1" annotations: - checksum/config: 1f7a9ffcacb3871ceb9b0741c0714e3f7fa656d426a398c1f727fffb01073f35 + checksum/config: 718bbb277da8610063a7c0fd810984577c2e8ab215815a71211dfa6e20f67321 spec: # Needed when using unmodified rbac-setup.yml @@ -1153,7 +1155,7 @@ spec: template: metadata: annotations: - checksum/init-config: 84ccf6a9b8a7fa3ae5b62a8f17d6c65a5197e9605da9b2761179bf942828eefe + checksum/init-config: 69130412bda04eacad3530cb7bcf26cf121401e725e15d0959dd71a7380afe75 labels: release: argocd app: redis-ha diff --git a/manifests/ha/base/redis-ha/chart/values.yaml b/manifests/ha/base/redis-ha/chart/values.yaml index 563fe1080f024..db8973b575627 100644 --- a/manifests/ha/base/redis-ha/chart/values.yaml +++ b/manifests/ha/base/redis-ha/chart/values.yaml @@ -5,8 +5,11 @@ redis-ha: masterGroupName: argocd config: save: "\"\"" + bind: "0.0.0.0" haproxy: enabled: true + IPv6: + enabled: false image: tag: 2.6.2-alpine containerSecurityContext: null @@ -17,3 +20,5 @@ redis-ha: image: tag: 7.0.7-alpine containerSecurityContext: null + sentinel: + bind: "0.0.0.0" diff --git a/manifests/ha/install.yaml b/manifests/ha/install.yaml index fe6e66b414c12..063ff63705b49 100644 --- a/manifests/ha/install.yaml +++ b/manifests/ha/install.yaml @@ -15943,81 +15943,38 @@ data: fi fi done - haproxy.cfg: | - defaults REDIS - mode tcp - timeout connect 4s - timeout server 6m - timeout client 6m - timeout check 2s - - listen health_check_http_url - bind [::]:8888 v4v6 - mode http - monitor-uri /healthz - option dontlognull - # Check Sentinel and whether they are nominated master - backend check_if_redis_is_master_0 - mode tcp - option tcp-check - tcp-check connect - tcp-check send PING\r\n - tcp-check expect string +PONG - tcp-check send SENTINEL\ get-master-addr-by-name\ argocd\r\n - tcp-check expect string REPLACE_ANNOUNCE0 - tcp-check send QUIT\r\n - server R0 argocd-redis-ha-announce-0:26379 check inter 3s - server R1 argocd-redis-ha-announce-1:26379 check inter 3s - server R2 argocd-redis-ha-announce-2:26379 check inter 3s - # Check Sentinel and whether they are nominated master - backend check_if_redis_is_master_1 - mode tcp - option tcp-check - tcp-check connect - tcp-check send PING\r\n - tcp-check expect string +PONG - tcp-check send SENTINEL\ get-master-addr-by-name\ argocd\r\n - tcp-check expect string REPLACE_ANNOUNCE1 - tcp-check send QUIT\r\n - server R0 argocd-redis-ha-announce-0:26379 check inter 3s - server R1 argocd-redis-ha-announce-1:26379 check inter 3s - server R2 argocd-redis-ha-announce-2:26379 check inter 3s - # Check Sentinel and whether they are nominated master - backend check_if_redis_is_master_2 - mode tcp - option tcp-check - tcp-check connect - tcp-check send PING\r\n - tcp-check expect string +PONG - tcp-check send SENTINEL\ get-master-addr-by-name\ argocd\r\n - tcp-check expect string REPLACE_ANNOUNCE2 - tcp-check send QUIT\r\n - server R0 argocd-redis-ha-announce-0:26379 check inter 3s - server R1 argocd-redis-ha-announce-1:26379 check inter 3s - server R2 argocd-redis-ha-announce-2:26379 check inter 3s - - # decide redis backend to use - #master - frontend ft_redis_master - bind [::]:6379 v4v6 - use_backend bk_redis_master - # Check all redis servers to see if they think they are master - backend bk_redis_master - mode tcp - option tcp-check - tcp-check connect - tcp-check send PING\r\n - tcp-check expect string +PONG - tcp-check send info\ replication\r\n - tcp-check expect string role:master - tcp-check send QUIT\r\n - tcp-check expect string +OK - use-server R0 if { srv_is_up(R0) } { nbsrv(check_if_redis_is_master_0) ge 2 } - server R0 argocd-redis-ha-announce-0:6379 check inter 3s fall 1 rise 1 - use-server R1 if { srv_is_up(R1) } { nbsrv(check_if_redis_is_master_1) ge 2 } - server R1 argocd-redis-ha-announce-1:6379 check inter 3s fall 1 rise 1 - use-server R2 if { srv_is_up(R2) } { nbsrv(check_if_redis_is_master_2) ge 2 } - server R2 argocd-redis-ha-announce-2:6379 check inter 3s fall 1 rise 1 + haproxy.cfg: "defaults REDIS\n mode tcp\n timeout connect 4s\n timeout server + 6m\n timeout client 6m\n timeout check 2s\n\nlisten health_check_http_url\n + \ bind :8888 \n mode http\n monitor-uri /healthz\n option dontlognull\n# + Check Sentinel and whether they are nominated master\nbackend check_if_redis_is_master_0\n + \ mode tcp\n option tcp-check\n tcp-check connect\n tcp-check send PING\\r\\n\n + \ tcp-check expect string +PONG\n tcp-check send SENTINEL\\ get-master-addr-by-name\\ + argocd\\r\\n\n tcp-check expect string REPLACE_ANNOUNCE0\n tcp-check send QUIT\\r\\n\n + \ server R0 argocd-redis-ha-announce-0:26379 check inter 3s\n server R1 argocd-redis-ha-announce-1:26379 + check inter 3s\n server R2 argocd-redis-ha-announce-2:26379 check inter 3s\n# + Check Sentinel and whether they are nominated master\nbackend check_if_redis_is_master_1\n + \ mode tcp\n option tcp-check\n tcp-check connect\n tcp-check send PING\\r\\n\n + \ tcp-check expect string +PONG\n tcp-check send SENTINEL\\ get-master-addr-by-name\\ + argocd\\r\\n\n tcp-check expect string REPLACE_ANNOUNCE1\n tcp-check send QUIT\\r\\n\n + \ server R0 argocd-redis-ha-announce-0:26379 check inter 3s\n server R1 argocd-redis-ha-announce-1:26379 + check inter 3s\n server R2 argocd-redis-ha-announce-2:26379 check inter 3s\n# + Check Sentinel and whether they are nominated master\nbackend check_if_redis_is_master_2\n + \ mode tcp\n option tcp-check\n tcp-check connect\n tcp-check send PING\\r\\n\n + \ tcp-check expect string +PONG\n tcp-check send SENTINEL\\ get-master-addr-by-name\\ + argocd\\r\\n\n tcp-check expect string REPLACE_ANNOUNCE2\n tcp-check send QUIT\\r\\n\n + \ server R0 argocd-redis-ha-announce-0:26379 check inter 3s\n server R1 argocd-redis-ha-announce-1:26379 + check inter 3s\n server R2 argocd-redis-ha-announce-2:26379 check inter 3s\n\n# + decide redis backend to use\n#master\nfrontend ft_redis_master\n bind :6379 \n + \ use_backend bk_redis_master\n# Check all redis servers to see if they think + they are master\nbackend bk_redis_master\n mode tcp\n option tcp-check\n tcp-check + connect\n tcp-check send PING\\r\\n\n tcp-check expect string +PONG\n tcp-check + send info\\ replication\\r\\n\n tcp-check expect string role:master\n tcp-check + send QUIT\\r\\n\n tcp-check expect string +OK\n use-server R0 if { srv_is_up(R0) + } { nbsrv(check_if_redis_is_master_0) ge 2 }\n server R0 argocd-redis-ha-announce-0:6379 + check inter 3s fall 1 rise 1\n use-server R1 if { srv_is_up(R1) } { nbsrv(check_if_redis_is_master_1) + ge 2 }\n server R1 argocd-redis-ha-announce-1:6379 check inter 3s fall 1 rise + 1\n use-server R2 if { srv_is_up(R2) } { nbsrv(check_if_redis_is_master_2) ge + 2 }\n server R2 argocd-redis-ha-announce-2:6379 check inter 3s fall 1 rise 1\n" haproxy_init.sh: | HAPROXY_CONF=/data/haproxy.cfg cp /readonly/haproxy.cfg "$HAPROXY_CONF" @@ -16316,6 +16273,7 @@ data: port 6379 rename-command FLUSHDB "" rename-command FLUSHALL "" + bind 0.0.0.0 maxmemory 0 maxmemory-policy volatile-lru min-replicas-max-lag 5 @@ -16327,6 +16285,7 @@ data: sentinel.conf: | dir "/data" port 26379 + bind 0.0.0.0 sentinel down-after-milliseconds argocd 10000 sentinel failover-timeout argocd 180000 maxclients 10000 @@ -17020,7 +16979,7 @@ spec: template: metadata: annotations: - checksum/config: 1f7a9ffcacb3871ceb9b0741c0714e3f7fa656d426a398c1f727fffb01073f35 + checksum/config: 718bbb277da8610063a7c0fd810984577c2e8ab215815a71211dfa6e20f67321 labels: app.kubernetes.io/name: argocd-redis-ha-haproxy name: argocd-redis-ha-haproxy @@ -17892,7 +17851,7 @@ spec: template: metadata: annotations: - checksum/init-config: 84ccf6a9b8a7fa3ae5b62a8f17d6c65a5197e9605da9b2761179bf942828eefe + checksum/init-config: 69130412bda04eacad3530cb7bcf26cf121401e725e15d0959dd71a7380afe75 labels: app.kubernetes.io/name: argocd-redis-ha spec: diff --git a/manifests/ha/namespace-install.yaml b/manifests/ha/namespace-install.yaml index 5f3dac1fd719d..0f56433f0b492 100644 --- a/manifests/ha/namespace-install.yaml +++ b/manifests/ha/namespace-install.yaml @@ -747,81 +747,38 @@ data: fi fi done - haproxy.cfg: | - defaults REDIS - mode tcp - timeout connect 4s - timeout server 6m - timeout client 6m - timeout check 2s - - listen health_check_http_url - bind [::]:8888 v4v6 - mode http - monitor-uri /healthz - option dontlognull - # Check Sentinel and whether they are nominated master - backend check_if_redis_is_master_0 - mode tcp - option tcp-check - tcp-check connect - tcp-check send PING\r\n - tcp-check expect string +PONG - tcp-check send SENTINEL\ get-master-addr-by-name\ argocd\r\n - tcp-check expect string REPLACE_ANNOUNCE0 - tcp-check send QUIT\r\n - server R0 argocd-redis-ha-announce-0:26379 check inter 3s - server R1 argocd-redis-ha-announce-1:26379 check inter 3s - server R2 argocd-redis-ha-announce-2:26379 check inter 3s - # Check Sentinel and whether they are nominated master - backend check_if_redis_is_master_1 - mode tcp - option tcp-check - tcp-check connect - tcp-check send PING\r\n - tcp-check expect string +PONG - tcp-check send SENTINEL\ get-master-addr-by-name\ argocd\r\n - tcp-check expect string REPLACE_ANNOUNCE1 - tcp-check send QUIT\r\n - server R0 argocd-redis-ha-announce-0:26379 check inter 3s - server R1 argocd-redis-ha-announce-1:26379 check inter 3s - server R2 argocd-redis-ha-announce-2:26379 check inter 3s - # Check Sentinel and whether they are nominated master - backend check_if_redis_is_master_2 - mode tcp - option tcp-check - tcp-check connect - tcp-check send PING\r\n - tcp-check expect string +PONG - tcp-check send SENTINEL\ get-master-addr-by-name\ argocd\r\n - tcp-check expect string REPLACE_ANNOUNCE2 - tcp-check send QUIT\r\n - server R0 argocd-redis-ha-announce-0:26379 check inter 3s - server R1 argocd-redis-ha-announce-1:26379 check inter 3s - server R2 argocd-redis-ha-announce-2:26379 check inter 3s - - # decide redis backend to use - #master - frontend ft_redis_master - bind [::]:6379 v4v6 - use_backend bk_redis_master - # Check all redis servers to see if they think they are master - backend bk_redis_master - mode tcp - option tcp-check - tcp-check connect - tcp-check send PING\r\n - tcp-check expect string +PONG - tcp-check send info\ replication\r\n - tcp-check expect string role:master - tcp-check send QUIT\r\n - tcp-check expect string +OK - use-server R0 if { srv_is_up(R0) } { nbsrv(check_if_redis_is_master_0) ge 2 } - server R0 argocd-redis-ha-announce-0:6379 check inter 3s fall 1 rise 1 - use-server R1 if { srv_is_up(R1) } { nbsrv(check_if_redis_is_master_1) ge 2 } - server R1 argocd-redis-ha-announce-1:6379 check inter 3s fall 1 rise 1 - use-server R2 if { srv_is_up(R2) } { nbsrv(check_if_redis_is_master_2) ge 2 } - server R2 argocd-redis-ha-announce-2:6379 check inter 3s fall 1 rise 1 + haproxy.cfg: "defaults REDIS\n mode tcp\n timeout connect 4s\n timeout server + 6m\n timeout client 6m\n timeout check 2s\n\nlisten health_check_http_url\n + \ bind :8888 \n mode http\n monitor-uri /healthz\n option dontlognull\n# + Check Sentinel and whether they are nominated master\nbackend check_if_redis_is_master_0\n + \ mode tcp\n option tcp-check\n tcp-check connect\n tcp-check send PING\\r\\n\n + \ tcp-check expect string +PONG\n tcp-check send SENTINEL\\ get-master-addr-by-name\\ + argocd\\r\\n\n tcp-check expect string REPLACE_ANNOUNCE0\n tcp-check send QUIT\\r\\n\n + \ server R0 argocd-redis-ha-announce-0:26379 check inter 3s\n server R1 argocd-redis-ha-announce-1:26379 + check inter 3s\n server R2 argocd-redis-ha-announce-2:26379 check inter 3s\n# + Check Sentinel and whether they are nominated master\nbackend check_if_redis_is_master_1\n + \ mode tcp\n option tcp-check\n tcp-check connect\n tcp-check send PING\\r\\n\n + \ tcp-check expect string +PONG\n tcp-check send SENTINEL\\ get-master-addr-by-name\\ + argocd\\r\\n\n tcp-check expect string REPLACE_ANNOUNCE1\n tcp-check send QUIT\\r\\n\n + \ server R0 argocd-redis-ha-announce-0:26379 check inter 3s\n server R1 argocd-redis-ha-announce-1:26379 + check inter 3s\n server R2 argocd-redis-ha-announce-2:26379 check inter 3s\n# + Check Sentinel and whether they are nominated master\nbackend check_if_redis_is_master_2\n + \ mode tcp\n option tcp-check\n tcp-check connect\n tcp-check send PING\\r\\n\n + \ tcp-check expect string +PONG\n tcp-check send SENTINEL\\ get-master-addr-by-name\\ + argocd\\r\\n\n tcp-check expect string REPLACE_ANNOUNCE2\n tcp-check send QUIT\\r\\n\n + \ server R0 argocd-redis-ha-announce-0:26379 check inter 3s\n server R1 argocd-redis-ha-announce-1:26379 + check inter 3s\n server R2 argocd-redis-ha-announce-2:26379 check inter 3s\n\n# + decide redis backend to use\n#master\nfrontend ft_redis_master\n bind :6379 \n + \ use_backend bk_redis_master\n# Check all redis servers to see if they think + they are master\nbackend bk_redis_master\n mode tcp\n option tcp-check\n tcp-check + connect\n tcp-check send PING\\r\\n\n tcp-check expect string +PONG\n tcp-check + send info\\ replication\\r\\n\n tcp-check expect string role:master\n tcp-check + send QUIT\\r\\n\n tcp-check expect string +OK\n use-server R0 if { srv_is_up(R0) + } { nbsrv(check_if_redis_is_master_0) ge 2 }\n server R0 argocd-redis-ha-announce-0:6379 + check inter 3s fall 1 rise 1\n use-server R1 if { srv_is_up(R1) } { nbsrv(check_if_redis_is_master_1) + ge 2 }\n server R1 argocd-redis-ha-announce-1:6379 check inter 3s fall 1 rise + 1\n use-server R2 if { srv_is_up(R2) } { nbsrv(check_if_redis_is_master_2) ge + 2 }\n server R2 argocd-redis-ha-announce-2:6379 check inter 3s fall 1 rise 1\n" haproxy_init.sh: | HAPROXY_CONF=/data/haproxy.cfg cp /readonly/haproxy.cfg "$HAPROXY_CONF" @@ -1120,6 +1077,7 @@ data: port 6379 rename-command FLUSHDB "" rename-command FLUSHALL "" + bind 0.0.0.0 maxmemory 0 maxmemory-policy volatile-lru min-replicas-max-lag 5 @@ -1131,6 +1089,7 @@ data: sentinel.conf: | dir "/data" port 26379 + bind 0.0.0.0 sentinel down-after-milliseconds argocd 10000 sentinel failover-timeout argocd 180000 maxclients 10000 @@ -1824,7 +1783,7 @@ spec: template: metadata: annotations: - checksum/config: 1f7a9ffcacb3871ceb9b0741c0714e3f7fa656d426a398c1f727fffb01073f35 + checksum/config: 718bbb277da8610063a7c0fd810984577c2e8ab215815a71211dfa6e20f67321 labels: app.kubernetes.io/name: argocd-redis-ha-haproxy name: argocd-redis-ha-haproxy @@ -2696,7 +2655,7 @@ spec: template: metadata: annotations: - checksum/init-config: 84ccf6a9b8a7fa3ae5b62a8f17d6c65a5197e9605da9b2761179bf942828eefe + checksum/init-config: 69130412bda04eacad3530cb7bcf26cf121401e725e15d0959dd71a7380afe75 labels: app.kubernetes.io/name: argocd-redis-ha spec: