Skip to content

Commit db6955e

Browse files
committed
Merge remote-tracking branch 'origin/main' into k0s-1-28
2 parents 800c6ac + 52b8846 commit db6955e

File tree

5 files changed

+35
-57
lines changed

5 files changed

+35
-57
lines changed

cmd/buildtools/k0s.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ var k0sImageComponents = map[string]string{
2121
"registry.k8s.io/metrics-server/metrics-server": "metrics-server",
2222
"quay.io/k0sproject/kube-proxy": "kube-proxy",
2323
"quay.io/k0sproject/envoy-distroless": "envoy-distroless",
24-
"registry.k8s.io/pause": "pause",
2524
}
2625

2726
var k0sComponents = map[string]addonComponent{
@@ -60,14 +59,6 @@ var k0sComponents = map[string]addonComponent{
6059
return fmt.Sprintf("envoy-%d.%d", opts.upstreamVersion.Major(), opts.upstreamVersion.Minor())
6160
},
6261
},
63-
"pause": {
64-
getWolfiPackageName: func(opts addonComponentOptions) string {
65-
return fmt.Sprintf("kubernetes-pause-%d.%d", opts.upstreamVersion.Major(), opts.upstreamVersion.Minor())
66-
},
67-
getWolfiPackageVersionComparison: func(opts addonComponentOptions) string {
68-
return latestPatchComparison(opts.k0sVersion) // pause package version follows the k8s version
69-
},
70-
},
7162
}
7263

7364
var updateK0sImagesCommand = &cli.Command{

deploy/images/pause/apko.tmpl.yaml

Lines changed: 0 additions & 20 deletions
This file was deleted.

pkg/config/images.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,7 @@ func overrideK0sImages(cfg *k0sv1beta1.ClusterConfig) {
7171
cfg.Spec.Images.KubeProxy.Image = helpers.AddonImageFromComponentName("kube-proxy")
7272
cfg.Spec.Images.KubeProxy.Version = Metadata.Images["kube-proxy"]
7373

74-
cfg.Spec.Images.Pause.Image = helpers.AddonImageFromComponentName("pause")
75-
cfg.Spec.Images.Pause.Version = Metadata.Images["pause"]
74+
cfg.Spec.Images.Pause.Image = fmt.Sprintf("proxy.replicated.com/anonymous/%s", cfg.Spec.Images.Pause.Image)
7675

7776
// TODO (salah): remove the following and uncomment when upstream PR for digest support is released: https://github.com/k0sproject/k0s/pull/4792
7877
if cfg.Spec.Network != nil &&

pkg/config/images_test.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ func TestListK0sImages(t *testing.T) {
3939
if len(filtered) == 0 {
4040
t.Errorf("ListK0sImages() = %v, want not empty", filtered)
4141
}
42+
var foundPause bool
4243
var foundEnvoyProxy bool
4344
for _, image := range filtered {
4445
if strings.Contains(image, "kube-router") {
@@ -51,7 +52,10 @@ func TestListK0sImages(t *testing.T) {
5152
t.Errorf("ListK0sImages() = %v, want not to contain apiserver-network-proxy-agent", filtered)
5253
}
5354
if strings.Contains(image, constant.KubePauseContainerImage) {
54-
t.Errorf("ListK0sImages() = %v, want the ec pause image", filtered)
55+
foundPause = true
56+
if !strings.HasPrefix(image, "proxy.replicated.com/anonymous/") {
57+
t.Errorf("ListK0sImages() = %v, want pause to be proxied", filtered)
58+
}
5559
}
5660
if strings.Contains(image, "envoy-distroless") {
5761
foundEnvoyProxy = true
@@ -60,6 +64,9 @@ func TestListK0sImages(t *testing.T) {
6064
}
6165
}
6266
}
67+
if !foundPause {
68+
t.Errorf("ListK0sImages() = %v, want to contain pause", filtered)
69+
}
6370
if !foundEnvoyProxy {
6471
t.Errorf("ListK0sImages() = %v, want to contain envoy-distroless", filtered)
6572
}

pkg/preflights/host-preflight.yaml

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,15 @@ spec:
4949
- hostOS: {}
5050
analyzers:
5151
- cpu:
52-
checkName: 'Number of CPU cores'
52+
checkName: CPU
5353
outcomes:
5454
- fail:
5555
when: 'count < 2'
5656
message: At least 2 CPU cores are required
5757
- pass:
5858
message: At least 2 CPU cores are present
5959
- memory:
60-
checkName: Amount of Memory
60+
checkName: Memory
6161
outcomes:
6262
- fail:
6363
when: '< 2G'
@@ -110,11 +110,12 @@ spec:
110110
outcomes:
111111
- fail:
112112
when: 'false'
113-
message: 'No default route found. A default route is required.'
113+
message: No default route found. A default route is required.
114114
- pass:
115115
when: 'true'
116-
message: 'Host has a default route'
116+
message: Host has a default route
117117
- ipv4Interfaces:
118+
checkName: IPv4 Interface
118119
outcomes:
119120
- fail:
120121
when: 'count == 0'
@@ -127,28 +128,28 @@ spec:
127128
outcomes:
128129
- fail:
129130
when: 'ntp == unsynchronized+inactive'
130-
message: 'System clock is not synchronized'
131+
message: System clock is not synchronized
131132
- fail:
132133
when: 'ntp == unsynchronized+active'
133134
message: System clock is not yet synchronized
134135
- pass:
135136
when: 'ntp == synchronized+active'
136-
message: 'System clock is synchronized'
137+
message: System clock is synchronized
137138
- jsonCompare:
138-
checkName: Check if either cgroup v1 or v2 is enabled
139+
checkName: Cgroups
139140
fileName: host-collectors/system/cgroups.json
140141
path: 'cgroup-enabled'
141142
value: |
142143
true
143144
outcomes:
144145
- fail:
145146
when: 'false'
146-
message: 'Neither cgroup v1 nor v2 is enabled'
147+
message: Neither cgroup v1 nor v2 is enabled
147148
- pass:
148149
when: 'true'
149-
message: 'One of cgroup v1 or v2 is enabled'
150+
message: One of cgroup v1 or v2 is enabled
150151
- jsonCompare:
151-
checkName: Check if cpu cgroup controller is enabled
152+
checkName: "'cpu' Cgroup Controller"
152153
fileName: host-collectors/system/cgroups.json
153154
jsonPath: "{$.allControllers[?(@ == 'cpu')]}"
154155
value: |
@@ -161,7 +162,7 @@ spec:
161162
when: 'true'
162163
message: "'cpu' cgroup controller is enabled"
163164
- jsonCompare:
164-
checkName: Check if cpuacct cgroup controller is enabled
165+
checkName: "'cpuacct' Cgroup Controller"
165166
fileName: host-collectors/system/cgroups.json
166167
jsonPath: "{$.allControllers[?(@ == 'cpuacct')]}"
167168
value: |
@@ -174,7 +175,7 @@ spec:
174175
when: 'true'
175176
message: "'cpuacct' cgroup controller is enabled"
176177
- jsonCompare:
177-
checkName: Check if cpuset cgroup controller is enabled
178+
checkName: "'cpuset' Cgroup Controller"
178179
fileName: host-collectors/system/cgroups.json
179180
jsonPath: "{$.allControllers[?(@ == 'cpuset')]}"
180181
value: |
@@ -187,7 +188,7 @@ spec:
187188
when: 'true'
188189
message: "'cpuset' cgroup controller is enabled"
189190
- jsonCompare:
190-
checkName: Check if memory cgroup controller is enabled
191+
checkName: "'memory' Cgroup Controller"
191192
fileName: host-collectors/system/cgroups.json
192193
jsonPath: "{$.allControllers[?(@ == 'memory')]}"
193194
value: |
@@ -200,7 +201,7 @@ spec:
200201
when: 'true'
201202
message: "'memory' cgroup controller is enabled"
202203
- jsonCompare:
203-
checkName: Check if devices cgroup controller is enabled
204+
checkName: "'devices' Cgroup Controller"
204205
fileName: host-collectors/system/cgroups.json
205206
jsonPath: "{$.allControllers[?(@ == 'devices')]}"
206207
value: |
@@ -213,7 +214,7 @@ spec:
213214
when: 'true'
214215
message: "'devices' cgroup controller is enabled"
215216
- jsonCompare:
216-
checkName: Check if freezer cgroup controller is enabled
217+
checkName: "'freezer' Cgroup Controller"
217218
fileName: host-collectors/system/cgroups.json
218219
jsonPath: "{$.allControllers[?(@ == 'freezer')]}"
219220
value: |
@@ -226,7 +227,7 @@ spec:
226227
when: 'true'
227228
message: "'freezer' cgroup controller is enabled"
228229
- jsonCompare:
229-
checkName: Check if pids cgroup controller is enabled
230+
checkName: "'pids' Cgroup Controller"
230231
fileName: host-collectors/system/cgroups.json
231232
jsonPath: "{$.allControllers[?(@ == 'pids')]}"
232233
value: |
@@ -239,18 +240,18 @@ spec:
239240
when: 'true'
240241
message: "'pids' cgroup controller is enabled"
241242
- textAnalyze:
242-
checkName: Check if /proc filesystem is mounted
243+
checkName: /proc Filesystem
243244
fileName: host-collectors/run-host/check-proc-filesystem.txt
244245
regex: 'proc'
245246
outcomes:
246247
- pass:
247248
when: "true"
248-
message: "/proc filesystem is mounted"
249+
message: /proc filesystem is mounted
249250
- fail:
250251
when: "false"
251-
message: "/proc filesystem is not mounted"
252+
message: /proc filesystem is not mounted
252253
- textAnalyze:
253-
checkName: Check if 'modprobe' command exists in PATH
254+
checkName: "'modprobe' Command"
254255
fileName: host-collectors/run-host/check-modprobe.txt
255256
regex: '/usr/sbin/modprobe'
256257
outcomes:
@@ -261,7 +262,7 @@ spec:
261262
when: "false"
262263
message: "'modprobe' command does not exist in PATH"
263264
- textAnalyze:
264-
checkName: Check if 'mount' command exists in PATH
265+
checkName: "'mount' Command"
265266
fileName: host-collectors/run-host/check-mount.txt
266267
regex: '/usr/bin/mount'
267268
outcomes:
@@ -272,7 +273,7 @@ spec:
272273
when: "false"
273274
message: "'mount' command does not exist in PATH"
274275
- textAnalyze:
275-
checkName: Check if 'umount' command exists in PATH
276+
checkName: "'umount' Command"
276277
fileName: host-collectors/run-host/check-umount.txt
277278
regex: '/usr/bin/umount'
278279
outcomes:
@@ -283,10 +284,10 @@ spec:
283284
when: "false"
284285
message: "'umount' command does not exist in PATH"
285286
- hostOS:
286-
checkName: Check minimum kernel version
287+
checkName: Kernel Version
287288
outcomes:
288289
- pass:
289290
when: "kernelVersion >= 3.10"
290-
message: "Minimum kernel version of 3.10 has been met"
291+
message: Kernel meets minimum version version of 3.10
291292
- fail:
292-
message: "Minimum kernel version of 3.10 has not been met"
293+
message: Kernel doesn't meet minimum version of 3.10

0 commit comments

Comments
 (0)