From aa57123f016e884f04813d5e9c87d48817b4417e Mon Sep 17 00:00:00 2001 From: batphonghan Date: Fri, 23 Feb 2024 09:55:42 +0700 Subject: [PATCH] Choose different ip range --- install/override/prometheus.yml | 6 +++--- install/templates/prometheus.tmpl | 6 +++--- stader-cli/service/migration.go | 10 ++++++++++ 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/install/override/prometheus.yml b/install/override/prometheus.yml index 04f2ddd26..6f2439be1 100644 --- a/install/override/prometheus.yml +++ b/install/override/prometheus.yml @@ -33,6 +33,6 @@ networks: ipam: driver: default config: - - subnet: 192.168.1.0/16 - ip_range: 192.168.5.0/24 - gateway: 192.168.5.254 \ No newline at end of file + - subnet: 172.23.0.0/16 + ip_range: 172.23.5.0/24 + gateway: 172.23.5.254 \ No newline at end of file diff --git a/install/templates/prometheus.tmpl b/install/templates/prometheus.tmpl index 88a8748ea..54a3ef7fd 100644 --- a/install/templates/prometheus.tmpl +++ b/install/templates/prometheus.tmpl @@ -47,9 +47,9 @@ networks: ipam: driver: default config: - - subnet: 192.168.1.0/16 - ip_range: 192.168.5.0/24 - gateway: 192.168.5.254 + - subnet: 172.23.0.0/16 + ip_range: 172.23.5.0/24 + gateway: 172.23.5.254 net: volumes: prometheus-data: \ No newline at end of file diff --git a/stader-cli/service/migration.go b/stader-cli/service/migration.go index 0aad5b1a3..41e22017e 100644 --- a/stader-cli/service/migration.go +++ b/stader-cli/service/migration.go @@ -54,6 +54,11 @@ func migrate(c *cli.Context) (runBeforeUpgrades, rundAfterUpgrades []ConfigUpgra return nil, nil, err } + v1410, err := parseVersion("1.4.10") + if err != nil { + return nil, nil, err + } + // Create the collection of upgraders upgraders := []ConfigUpgrader{ { @@ -80,6 +85,11 @@ func migrate(c *cli.Context) (runBeforeUpgrades, rundAfterUpgrades []ConfigUpgra upgradeFunc: func(c *cli.Context) error { return nil }, needInstall: true, }, + { + version: v1410, + upgradeFunc: func(c *cli.Context) error { return nil }, + needInstall: true, + }, } staderClient, err := stader.NewClientFromCtx(c)