Skip to content

Commit 20a2994

Browse files
Enable dynamic config (#215)
1 parent 43b9fba commit 20a2994

File tree

7 files changed

+13
-12
lines changed

7 files changed

+13
-12
lines changed

cmd/embedded-cluster/join.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ func runK0sInstallCommand(fullcmd string) error {
226226
args := strings.Split(fullcmd, " ")
227227
args = append(args, "--token-file", "/etc/k0s/join-token")
228228
if strings.Contains(fullcmd, "controller") {
229-
args = append(args, "--disable-components", "konnectivity-server")
229+
args = append(args, "--disable-components", "konnectivity-server", "--enable-dynamic-config")
230230
}
231231
cmd := exec.Command(args[0], args[1:]...)
232232
stdout := bytes.NewBuffer(nil)

pkg/config/config.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,9 @@ func generateConfigForHosts(ctx context.Context, hosts ...*cluster.Host) (*v1bet
232232
Spec: &cluster.Spec{
233233
Hosts: hosts,
234234
K0s: &cluster.K0s{
235-
Version: k0sversion.MustParse(defaults.K0sVersion),
236-
Config: k0sconfig,
235+
DynamicConfig: true,
236+
Version: k0sversion.MustParse(defaults.K0sVersion),
237+
Config: k0sconfig,
237238
},
238239
},
239240
}, nil

pkg/config/host.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ type hostcfg struct {
2727
func (h *hostcfg) render() *cluster.Host {
2828
var ifls []string
2929
if h.Role != "worker" {
30-
ifls = []string{"--disable-components konnectivity-server"}
30+
ifls = []string{"--disable-components konnectivity-server --enable-dynamic-config"}
3131
}
3232
ifls = append(ifls, labelsToArg(h.Labels)...)
3333
return &cluster.Host{

pkg/config/testdata/override-change-name.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ config: |-
1616
noTaints: true
1717
k0s:
1818
version: v1.27.5+k0s.0
19-
dynamicConfig: false
19+
dynamicConfig: true
2020
config:
2121
apiVersion: k0s.k0sproject.io/v1beta1
2222
kind: ClusterConfig
@@ -53,7 +53,7 @@ expected: |-
5353
noTaints: true
5454
k0s:
5555
version: v1.27.5+k0s.0
56-
dynamicConfig: false
56+
dynamicConfig: true
5757
config:
5858
apiVersion: k0s.k0sproject.io/v1beta1
5959
kind: ClusterConfig

pkg/config/testdata/override-enable-telemetry.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ config: |-
1616
noTaints: true
1717
k0s:
1818
version: v1.27.5+k0s.0
19-
dynamicConfig: false
19+
dynamicConfig: true
2020
config:
2121
apiVersion: k0s.k0sproject.io/v1beta1
2222
kind: ClusterConfig
@@ -54,7 +54,7 @@ expected: |-
5454
noTaints: true
5555
k0s:
5656
version: v1.27.5+k0s.0
57-
dynamicConfig: false
57+
dynamicConfig: true
5858
config:
5959
apiVersion: k0s.k0sproject.io/v1beta1
6060
kind: ClusterConfig

pkg/config/testdata/override-setting-ip-forward.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ config: |-
1616
noTaints: true
1717
k0s:
1818
version: v1.27.5+k0s.0
19-
dynamicConfig: false
19+
dynamicConfig: true
2020
config:
2121
apiVersion: k0s.k0sproject.io/v1beta1
2222
kind: ClusterConfig
@@ -57,7 +57,7 @@ expected: |-
5757
noTaints: true
5858
k0s:
5959
version: v1.27.5+k0s.0
60-
dynamicConfig: false
60+
dynamicConfig: true
6161
config:
6262
apiVersion: k0s.k0sproject.io/v1beta1
6363
kind: ClusterConfig

pkg/config/testdata/override-zero-out-sans-list.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ config: |-
1616
noTaints: true
1717
k0s:
1818
version: v1.27.5+k0s.0
19-
dynamicConfig: false
19+
dynamicConfig: true
2020
config:
2121
apiVersion: k0s.k0sproject.io/v1beta1
2222
kind: ClusterConfig
@@ -58,7 +58,7 @@ expected: |-
5858
noTaints: true
5959
k0s:
6060
version: v1.27.5+k0s.0
61-
dynamicConfig: false
61+
dynamicConfig: true
6262
config:
6363
apiVersion: k0s.k0sproject.io/v1beta1
6464
kind: ClusterConfig

0 commit comments

Comments
 (0)