Skip to content

Commit e28dcda

Browse files
committed
Merge remote-tracking branch 'origin/main' into k0s-1-29
2 parents 35f7c74 + 30a4b3b commit e28dcda

File tree

20 files changed

+268
-79
lines changed

20 files changed

+268
-79
lines changed

.gitignore

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,11 @@ hack/release
3030
*.test
3131

3232
# helm charts dependencies
33-
*.tgz
33+
*.tgz
34+
35+
# test coverage files
36+
cover.out
37+
38+
# e2e test runs locally
39+
e2e/playwright*.tar.gz
40+
e2e/support-bundle*.tar.gz

cmd/installer/goods/support/host-support-bundle.tmpl.yaml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,16 @@ spec:
299299
collectorName: "ps-detect-antivirus-and-security-tools"
300300
command: "sh"
301301
args: [-c, "ps -ef | grep -E 'clamav|sophos|esets_daemon|fsav|symantec|mfend|ds_agent|kav|bdagent|s1agent|falcon|illumio|xagt|wdavdaemon|mdatp' | grep -v grep"]
302+
- systemPackages:
303+
collectorName: security-tools-packages
304+
ubuntu:
305+
- sdcss-kmod
306+
- sdcss
307+
- sdcss-scripts
308+
rhel:
309+
- sdcss-kmod
310+
- sdcss
311+
- sdcss-scripts
302312
- filesystemPerformance:
303313
collectorName: filesystem-write-latency-etcd
304314
timeout: 5m
@@ -620,7 +630,7 @@ spec:
620630
- textAnalyze:
621631
checkName: "Detect Threat Management and Network Security Tools"
622632
fileName: host-collectors/run-host/ps-detect-antivirus-and-security-tools.txt
623-
regex: '\b(clamav|sophos|esets_daemon|fsav|symantec|mfend|ds_agent|kav|bdagent|s1agent|falcon|illumio|xagt|wdavdaemon)\b'
633+
regex: '\b(clamav|sophos|esets_daemon|fsav|symantec|mfend|ds_agent|kav|bdagent|s1agent|falcon|illumio|xagt|wdavdaemon|mdatp)\b'
624634
ignoreIfNoFiles: true
625635
outcomes:
626636
- fail:
@@ -629,6 +639,15 @@ spec:
629639
- pass:
630640
when: "false"
631641
message: "No antivirus or network security tools detected."
642+
- systemPackages:
643+
checkName: "Detected Security Packages"
644+
collectorName: security-tools-packages
645+
outcomes:
646+
- fail:
647+
when: '{{ "{{" }} .IsInstalled {{ "}}" }}'
648+
message: Package {{ "{{" }} .Name {{ "}}" }} is installed. This tool can interfere with kubernetes operation. Ensure the tool is either disabled or configured to not interfere with kubernetes operation.
649+
- pass:
650+
message: Package {{ "{{" }} .Name {{ "}}" }} is not installed
632651
- filesystemPerformance:
633652
checkName: Filesystem Write Latency
634653
collectorName: filesystem-write-latency-etcd

e2e/install_test.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -998,7 +998,6 @@ func TestMultiNodeAirgapUpgradeSameK0s(t *testing.T) {
998998
Nodes: 2,
999999
Distribution: "ubuntu",
10001000
Version: "22.04",
1001-
InstanceType: "r1.medium",
10021001
})
10031002
defer tc.Cleanup()
10041003

@@ -1074,7 +1073,6 @@ func TestMultiNodeAirgapUpgrade(t *testing.T) {
10741073
Nodes: 2,
10751074
Distribution: "ubuntu",
10761075
Version: "22.04",
1077-
InstanceType: "r1.medium",
10781076
})
10791077
defer tc.Cleanup()
10801078

@@ -1157,7 +1155,6 @@ func TestMultiNodeAirgapUpgradePreviousStable(t *testing.T) {
11571155
Nodes: 2,
11581156
Distribution: "ubuntu",
11591157
Version: "22.04",
1160-
InstanceType: "r1.medium",
11611158
})
11621159
defer tc.Cleanup(withEnv)
11631160

@@ -1328,6 +1325,9 @@ func TestMultiNodeHAInstallation(t *testing.T) {
13281325

13291326
checkPostUpgradeStateWithOptions(t, tc, postUpgradeStateOptions{
13301327
node: 2,
1328+
withEnv: map[string]string{
1329+
"ALLOW_PENDING_PODS": "true",
1330+
},
13311331
})
13321332

13331333
t.Logf("%s: test complete", time.Now().Format(time.RFC3339))
@@ -1346,7 +1346,6 @@ func TestMultiNodeAirgapHAInstallation(t *testing.T) {
13461346
Nodes: 4,
13471347
Distribution: "ubuntu",
13481348
Version: "22.04",
1349-
InstanceType: "r1.medium",
13501349
SupportBundleNodeIndex: 2,
13511350
})
13521351
defer tc.Cleanup()
@@ -1454,6 +1453,9 @@ func TestMultiNodeAirgapHAInstallation(t *testing.T) {
14541453

14551454
checkPostUpgradeStateWithOptions(t, tc, postUpgradeStateOptions{
14561455
node: 2,
1456+
withEnv: map[string]string{
1457+
"ALLOW_PENDING_PODS": "true",
1458+
},
14571459
})
14581460

14591461
t.Logf("%s: test complete", time.Now().Format(time.RFC3339))
@@ -1609,7 +1611,6 @@ func TestFiveNodesAirgapUpgrade(t *testing.T) {
16091611
Nodes: 5,
16101612
Distribution: "ubuntu",
16111613
Version: "22.04",
1612-
InstanceType: "r1.medium",
16131614
})
16141615
defer tc.Cleanup()
16151616

e2e/playwright/tests/deploy-upgrade/test.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ async function fillConfigForm(iframe: FrameLocator) {
3535

3636
async function handlePreflightChecks(iframe: FrameLocator) {
3737
await expect(iframe.getByText('Preflight checks', { exact: true })).toBeVisible({ timeout: 10 * 1000 });
38-
await expect(iframe.getByRole('button', { name: 'Rerun' })).toBeVisible({ timeout: 10 * 1000 });
38+
await expect(iframe.getByRole('button', { name: 'Rerun' })).toBeVisible({ timeout: 30 * 1000 });
3939
await expect(iframe.locator('#app')).toContainText('The Volume Snapshots CRD exists');
4040
await expect(iframe.getByRole('button', { name: 'Back: Config' })).toBeVisible();
4141
await iframe.getByRole('button', { name: 'Next: Confirm and deploy' }).click();

e2e/restore_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,6 @@ func TestSingleNodeAirgapDisasterRecovery(t *testing.T) {
359359
Nodes: 1,
360360
Distribution: "ubuntu",
361361
Version: "22.04",
362-
InstanceType: "r1.medium",
363362
})
364363
defer tc.Cleanup()
365364

@@ -642,7 +641,6 @@ func TestMultiNodeAirgapHADisasterRecovery(t *testing.T) {
642641
Nodes: 3,
643642
Distribution: "ubuntu",
644643
Version: "22.04",
645-
InstanceType: "r1.medium",
646644
})
647645
defer tc.Cleanup(withEnv)
648646

e2e/scripts/check-airgap-installation-state.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ main() {
4343
exit 1
4444
fi
4545

46-
validate_no_pods_in_crashloop
46+
validate_all_pods_healthy
4747
}
4848

4949
main "$@"

e2e/scripts/check-airgap-post-ha-state.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ main() {
8181
# scale the second deployment back down so that they aren't restored in the DR test
8282
kubectl scale -n "$APP_NAMESPACE" deployment/second --replicas=0
8383

84-
validate_no_pods_in_crashloop
84+
validate_all_pods_healthy
8585
}
8686

8787
main "$@"

e2e/scripts/check-installation-state.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ main() {
4949
validate_data_dirs
5050
fi
5151

52-
validate_no_pods_in_crashloop
52+
validate_all_pods_healthy
5353
}
5454

5555
main "$@"

e2e/scripts/check-post-ha-state.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ main() {
6161
exit 1
6262
fi
6363

64-
validate_no_pods_in_crashloop
64+
validate_all_pods_healthy
6565
}
6666

6767
main "$@"

e2e/scripts/check-postupgrade-state.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ main() {
111111

112112
validate_data_dirs
113113

114-
validate_no_pods_in_crashloop
114+
validate_all_pods_healthy
115115
}
116116

117117
main "$@"

e2e/scripts/common.sh

Lines changed: 109 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -455,12 +455,116 @@ validate_data_dirs() {
455455
fi
456456
}
457457

458-
validate_no_pods_in_crashloop() {
459-
if kubectl get pods -A | grep CrashLoopBackOff -q ; then
460-
echo "found pods in CrashLoopBackOff state"
461-
kubectl get pods -A | grep CrashLoopBackOff
462-
exit 1
458+
validate_non_job_pods_healthy() {
459+
local unhealthy_pods
460+
local unready_pods
461+
462+
# Check for environment variable override (used by specific tests)
463+
if [ "${ALLOW_PENDING_PODS:-}" = "true" ]; then
464+
# Allow Running, Completed, Succeeded, Pending
465+
unhealthy_pods=$(kubectl get pods -A --no-headers -o custom-columns="NAMESPACE:.metadata.namespace,NAME:.metadata.name,STATUS:.status.phase,OWNER:.metadata.ownerReferences[0].kind" | \
466+
awk '$4 != "Job" && ($3 != "Running" && $3 != "Completed" && $3 != "Succeeded" && $3 != "Pending") { print $1 "/" $2 " (" $3 ")" }')
467+
echo "All non-Job pods are healthy (allowing Pending pods)"
468+
else
469+
# Default: only allow Running, Completed, Succeeded
470+
unhealthy_pods=$(kubectl get pods -A --no-headers -o custom-columns="NAMESPACE:.metadata.namespace,NAME:.metadata.name,STATUS:.status.phase,OWNER:.metadata.ownerReferences[0].kind" | \
471+
awk '$4 != "Job" && ($3 != "Running" && $3 != "Completed" && $3 != "Succeeded") { print $1 "/" $2 " (" $3 ")" }')
472+
echo "All non-Job pods are healthy"
473+
fi
474+
475+
# Check container readiness for Running pods (skip Completed/Succeeded pods as they don't need to be ready)
476+
unready_pods=$(kubectl get pods -A --no-headers -o custom-columns="NAMESPACE:.metadata.namespace,NAME:.metadata.name,STATUS:.status.phase,READY:.status.containerStatuses[*].ready,OWNER:.metadata.ownerReferences[0].kind" | \
477+
awk '$5 != "Job" && $3 == "Running" && ($4 == "" || $4 !~ /^(true[[:space:]]*)*$/) { print $1 "/" $2 " (not ready)" }')
478+
479+
local has_issues=0
480+
481+
if [ -n "$unhealthy_pods" ]; then
482+
echo "found non-Job pods in unhealthy state:"
483+
echo "$unhealthy_pods"
484+
has_issues=1
485+
fi
486+
487+
if [ -n "$unready_pods" ]; then
488+
echo "found non-Job pods that are Running but not ready:"
489+
echo "$unready_pods"
490+
has_issues=1
491+
fi
492+
493+
if [ $has_issues -eq 1 ]; then
494+
return 1
495+
fi
496+
497+
return 0
498+
}
499+
500+
validate_jobs_completed() {
501+
local incomplete_jobs
502+
# Check that all Jobs have succeeded (status.succeeded should equal spec.completions)
503+
# Flag any job that hasn't fully succeeded
504+
incomplete_jobs=$(kubectl get jobs -A --no-headers -o custom-columns="NAMESPACE:.metadata.namespace,NAME:.metadata.name,COMPLETIONS:.spec.completions,SUCCESSFUL:.status.succeeded" | \
505+
awk '$4 != $3 { print $1 "/" $2 " (succeeded: " $4 "/" $3 ")" }')
506+
507+
if [ -n "$incomplete_jobs" ]; then
508+
echo "found Jobs that have not completed successfully:"
509+
echo "$incomplete_jobs"
510+
echo ""
511+
echo "Job details:"
512+
kubectl get jobs -A
513+
return 1
514+
fi
515+
echo "All Jobs have completed successfully"
516+
return 0
517+
}
518+
519+
validate_all_pods_healthy() {
520+
local timeout=300 # 5 minutes
521+
local start_time
522+
local current_time
523+
local elapsed_time
524+
start_time=$(date +%s)
525+
526+
# Show what mode we're in
527+
if [ "${ALLOW_PENDING_PODS:-}" = "true" ]; then
528+
echo "Validating pod and job health (allowing Pending pods)..."
529+
else
530+
echo "Validating pod and job health (default: Running, Completed, Succeeded)..."
463531
fi
532+
533+
while true; do
534+
current_time=$(date +%s)
535+
elapsed_time=$((current_time - start_time))
536+
537+
if [ "$elapsed_time" -ge "$timeout" ]; then
538+
echo "Timed out waiting for pods and jobs to be healthy after 5 minutes"
539+
540+
# Show detailed failure info
541+
validate_non_job_pods_healthy || true
542+
echo ""
543+
validate_jobs_completed || true
544+
545+
return 1
546+
fi
547+
548+
# Check if both validations pass
549+
local pods_healthy=0
550+
local jobs_healthy=0
551+
552+
if validate_non_job_pods_healthy >/dev/null 2>&1; then
553+
pods_healthy=1
554+
fi
555+
556+
if validate_jobs_completed >/dev/null 2>&1; then
557+
jobs_healthy=1
558+
fi
559+
560+
if [ $pods_healthy -eq 1 ] && [ $jobs_healthy -eq 1 ]; then
561+
echo "All pods and jobs are healthy"
562+
return 0
563+
fi
564+
565+
echo "Waiting for pods and jobs to be healthy... (${elapsed_time}s elapsed)"
566+
sleep 10
567+
done
464568
}
465569

466570
validate_worker_profile() {

operator/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ $(CONTROLLER_GEN): $(LOCALBIN)
126126

127127
.PHONY: schemas
128128
schemas: fmt controller-gen
129-
go build ${LDFLAGS} -o bin/schemagen ./schemagen
129+
go build -o bin/schemagen ./schemagen
130130
./bin/schemagen --output-dir ./schemas
131131

132132
.PHONY: envtest

pkg/addons/adminconsole/static/metadata.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,26 @@
55
# $ make buildtools
66
# $ output/bin/buildtools update addon <addon name>
77
#
8-
version: 1.124.16-ec.5
8+
version: 1.124.17
99
location: oci://proxy.replicated.com/anonymous/registry.replicated.com/library/admin-console
1010
images:
1111
kotsadm:
1212
repo: proxy.replicated.com/anonymous/kotsadm/kotsadm
1313
tag:
14-
amd64: v1.124.16-ec.5-amd64@sha256:f4519dd15b4b978157e699ea16616fba646d7b599e8c579b0e83774c1e2e02bd
15-
arm64: v1.124.16-ec.5-arm64@sha256:53310cc5e666a8d1acafa4309a88aceedc134a86616f58306f1f665a89ddf9ed
14+
amd64: v1.124.17-amd64@sha256:60da5bcc432cf2046ff3241ac034fd9bd602f592b66d457583ce9c2d19966383
15+
arm64: v1.124.17-arm64@sha256:21413e5ea2859f96abd9b5b49407afde94aa4b95579d17d153515e4ae6ebcb35
1616
kotsadm-migrations:
1717
repo: proxy.replicated.com/anonymous/kotsadm/kotsadm-migrations
1818
tag:
19-
amd64: v1.124.16-ec.5-amd64@sha256:1c3daf5c301fc6a9d64dc7f8776d40db9be5a0e82766ba21d2fd4daa35a525eb
20-
arm64: v1.124.16-ec.5-arm64@sha256:8139f3566f96f772bf52244c0f9ddaad94193a39e64b76ee700e02adad8b441a
19+
amd64: v1.124.17-amd64@sha256:65208a0c17a3334d6199c39f54db7d4b62d97f0c3efb944aeb917cd95a72b856
20+
arm64: v1.124.17-arm64@sha256:782c6c3b8621b99fed0a26e864f68008e57a46840f30f2dfc5a404df6685a100
2121
kurl-proxy:
2222
repo: proxy.replicated.com/anonymous/kotsadm/kurl-proxy
2323
tag:
24-
amd64: v1.124.16-ec.5-amd64@sha256:1a367bae52522e45eb6a30794d7a5796b6010703926524aca31e151eca382d8a
25-
arm64: v1.124.16-ec.5-arm64@sha256:d0629818c1bb38a2a876becdce3c94c4b96dfd9f9d21e4f3d7225703994518d0
24+
amd64: v1.124.17-amd64@sha256:723c222ec08e6bdbc907c41e957e54cfd2b357b7b9f7d5a84e8a0083028642f8
25+
arm64: v1.124.17-arm64@sha256:a972e9a8fcb428263f94c8512d06675c19a48e878b54933888d5df5a47fa2f8f
2626
rqlite:
2727
repo: proxy.replicated.com/anonymous/kotsadm/rqlite
2828
tag:
29-
amd64: 8.37.0-r0-amd64@sha256:e84bc7bc4c26b81c5082b6da9c2f7f37099d9dbcbcb819fbdc27cfb56d1dbc1e
30-
arm64: 8.37.0-r0-arm64@sha256:c5b28b24a7633fb09d7fa9a63ee59b37ce4211a62cc0049544c027d1c3021e0e
29+
amd64: 8.37.2-r0-amd64@sha256:72e527882ddbb28c055f85257001969f1e6bea30816747a9d42b677e8ad802b2
30+
arm64: 8.37.2-r0-arm64@sha256:3d78afc4011c7d24c603bd6312a66be9e0e663057e397ebcd0600be101464a4b

pkg/addons/adminconsole/static/values.tpl.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,6 @@ passwordSecretRef:
1919
name: kotsadm-password
2020
service:
2121
enabled: false
22+
extraEnv:
23+
- name: SSL_CERT_CONFIGMAP
24+
value: "kotsadm-private-cas"

pkg/addons/adminconsole/values.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ func (a *AdminConsole) GenerateHelmValues(ctx context.Context, kcli client.Clien
5757
"name": "ENABLE_IMPROVED_DR",
5858
"value": "true",
5959
},
60+
{
61+
"name": "SSL_CERT_CONFIGMAP",
62+
"value": "kotsadm-private-cas",
63+
},
6064
}
6165

6266
if a.Proxy != nil {

pkg/addons/openebs/static/metadata.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,21 @@
55
# $ make buildtools
66
# $ output/bin/buildtools update addon <addon name>
77
#
8-
version: 4.2.0
8+
version: 4.3.0-develop
99
location: oci://proxy.replicated.com/anonymous/registry.replicated.com/ec-charts/openebs
1010
images:
1111
kubectl:
1212
repo: proxy.replicated.com/anonymous/replicated/ec-kubectl
1313
tag:
14-
amd64: 1.33.1-r1-amd64@sha256:5c2c30d0c7c7487e563a99f12eb4e486cc7d5c873b3e02e43f161c1e13d2a427
15-
arm64: 1.33.1-r1-arm64@sha256:4c532d484cfe82030d34df937d11539f1191635aaee299b9a614b06586210d02
14+
amd64: 1.33.1-r2-amd64@sha256:3fdcb728e6b4c950db0498fe2d84836dc8a00568daf7d08f024b2408c6eae4f9
15+
arm64: 1.33.1-r2-arm64@sha256:d738a903196054e3523aa6a782115d875dd5353ae98b93607f6e8380144f89b5
1616
openebs-linux-utils:
1717
repo: proxy.replicated.com/anonymous/replicated/ec-openebs-linux-utils
1818
tag:
19-
amd64: 4.2.0-amd64@sha256:695a78180f7b07f80379199b851791042e11db039f655479aa0d1fd736cdc51a
20-
arm64: 4.2.0-arm64@sha256:abdccdf5ca021223d64c1045fbf9401c6e7cca4a6b10fe1838dd1b995fd658b3
19+
amd64: 4.3.0-develop-amd64@sha256:0e9dfd0ada5b9d218b10e26bc1a02a7c769df6a794a5f97a6a2b94fcbe7eea7f
20+
arm64: 4.3.0-develop-arm64@sha256:ec4e819e41b74981eb750993690b5db48fe46099d91394b5578a0764f7e34e4c
2121
openebs-provisioner-localpv:
2222
repo: proxy.replicated.com/anonymous/replicated/ec-openebs-provisioner-localpv
2323
tag:
24-
amd64: 4.2.0-r5-amd64@sha256:d58b1f4745e802cd90ed9e1d0aae4f7b6e07d8441898bd3aa1dceffa24e1ddd2
25-
arm64: 4.2.0-r5-arm64@sha256:e154823edf377db6be8a1969913c3d03618a275053b81c0ad3a56e249df79170
24+
amd64: 4.3.0-r0-amd64@sha256:dc68b841610e53bd91bea01ccd5593aa4db863fbcc999e46b2c14fda58dad679
25+
arm64: 4.3.0-r0-arm64@sha256:18be54d2322a61ace6cc185fba88ff79dab4c76e049ca96da82e38ee5712f112

0 commit comments

Comments
 (0)