Skip to content

Commit 57db321

Browse files
authored
Set '--config=/etc/k0s/k0s.yaml' only on controller install (#106)
* Set '--config=/etc/k0s/k0s.yaml' only on controller install Signed-off-by: Jussi Nummelin <[email protected]> * pull system images from quay.io to mitigate possible docker hub rate limits Signed-off-by: Jussi Nummelin <[email protected]> * use 0.11.0 for smokes Signed-off-by: Jussi Nummelin <[email protected]>
1 parent 9535e37 commit 57db321

File tree

3 files changed

+32
-3
lines changed

3 files changed

+32
-3
lines changed

config/cluster/host.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,9 @@ func (h *Host) K0sInstallCommand() string {
173173
flags.AddUnlessExist(fmt.Sprintf(`--token-file "%s"`, h.K0sJoinTokenPath()))
174174
}
175175

176-
flags.AddUnlessExist(fmt.Sprintf(`--config "%s"`, h.K0sConfigPath()))
176+
if h.IsController() {
177+
flags.AddUnlessExist(fmt.Sprintf(`--config "%s"`, h.K0sConfigPath()))
178+
}
177179

178180
return h.Configurer.K0sCmdf("install %s %s", role, flags.Join())
179181
}

config/cluster/host_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func TestK0sInstallCommand(t *testing.T) {
6262
h := Host{Role: "worker"}
6363
h.Configurer = &mockconfigurer{}
6464

65-
require.Equal(t, `k0s install worker --token-file "from-configurer" --config "from-configurer"`, h.K0sInstallCommand())
65+
require.Equal(t, `k0s install worker --token-file "from-configurer"`, h.K0sInstallCommand())
6666

6767
h.Role = "controller"
6868
h.Metadata.IsK0sLeader = true

smoke-test/k0sctl.yaml

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,31 @@ spec:
1515
port: 9023
1616
keyPath: ./id_rsa_k0s
1717
k0s:
18-
version: "0.11.0-rc1"
18+
version: "0.11.0"
19+
config:
20+
images:
21+
konnectivity:
22+
image: us.gcr.io/k8s-artifacts-prod/kas-network-proxy/proxy-agent
23+
version: v0.0.13
24+
metricsserver:
25+
image: gcr.io/k8s-staging-metrics-server/metrics-server
26+
version: v0.3.7
27+
kubeproxy:
28+
image: k8s.gcr.io/kube-proxy
29+
version: v1.20.4
30+
coredns:
31+
image: quay.io/jnummelin/coredns
32+
version: 1.7.0
33+
calico:
34+
cni:
35+
image: quay.io/jnummelin/calico-cni
36+
version: v3.16.2
37+
flexvolume:
38+
image: quay.io/jnummelin/calico-pod2daemon-flexvol
39+
version: v3.16.2
40+
node:
41+
image: quay.io/jnummelin/calico-node
42+
version: v3.16.2
43+
kubecontrollers:
44+
image: quay.io/jnummelin/calico-kube-controllers
45+
version: v3.16.2

0 commit comments

Comments
 (0)