Skip to content

Commit 2868d46

Browse files
authored
Merge branch 'main' into bundle-docs
Signed-off-by: Michal Vavrinec <[email protected]>
2 parents 2fae534 + c7a8dc6 commit 2868d46

File tree

767 files changed

+65238
-28245
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

767 files changed

+65238
-28245
lines changed

.github/workflows/release-bumper.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
if [[ ${{ github.event_name }} == "workflow_dispatch" && ${{ github.ref }} != "refs/heads/main" ]]; then
2929
matrix="[{\"branch\": \"${GITHUB_REF#refs/heads/}\"}]"
3030
else
31-
matrix=$(git for-each-ref --format='%(refname:short)' refs/remotes/origin | grep -e "origin/main" -e "origin/release-1.[0-9]\+$" | grep -v "release-1\.[0,1,2,3]$" | sed -r 's/origin\/(.*)/{"branch": "\1"}/g' | jq -s)
31+
matrix=$(git for-each-ref --format='%(refname:short)' refs/remotes/origin | grep -e "origin/release-1.[0-9]\+$" | sort -V -r | head -3 | sed -r 's/origin\/(.*)/{"branch": "\1"}/g' | jq -s '. += [{"branch": "main"}] | sort')
3232
fi
3333
echo "matrix={\"branches\":$(echo $matrix)}" >> $GITHUB_OUTPUT
3434

automation/hco-nightly-reporter/go.mod

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,9 @@ module github.com/hyperconverged-cluster-operator/automation/hco-nightly-reporte
22

33
go 1.24
44

5-
require github.com/slack-go/slack v0.15.0
5+
require github.com/slack-go/slack v0.17.3
66

77
require (
8-
github.com/go-test/deep v1.1.1 // indirect
9-
github.com/google/go-cmp v0.6.0 // indirect
108
github.com/gorilla/websocket v1.5.3 // indirect
11-
github.com/stretchr/testify v1.10.0 // indirect
9+
github.com/stretchr/testify v1.11.1 // indirect
1210
)
Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,14 @@
11
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
22
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
3-
github.com/go-test/deep v1.0.4/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA=
43
github.com/go-test/deep v1.1.1 h1:0r/53hagsehfO4bzD2Pgr/+RgHqhmf+k1Bpse2cTu1U=
54
github.com/go-test/deep v1.1.1/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE=
6-
github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
7-
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
8-
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
9-
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
105
github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg=
116
github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
127
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
138
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
14-
github.com/slack-go/slack v0.15.0 h1:LE2lj2y9vqqiOf+qIIy0GvEoxgF1N5yLGZffmEZykt0=
15-
github.com/slack-go/slack v0.15.0/go.mod h1:hlGi5oXA+Gt+yWTPP0plCdRKmjsDxecdHxYQdlMQKOw=
16-
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
17-
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
18-
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
19-
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
9+
github.com/slack-go/slack v0.17.3 h1:zV5qO3Q+WJAQ/XwbGfNFrRMaJ5T/naqaonyPV/1TP4g=
10+
github.com/slack-go/slack v0.17.3/go.mod h1:X+UqOufi3LYQHDnMG1vxf0J8asC6+WllXrVrhl8/Prk=
11+
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
12+
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
2013
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
2114
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

cluster/kubevirtci_tag.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2510161106-883f7295
1+
2510241540-9fd40b1c

config/crd/bases/hco.kubevirt.io_hyperconvergeds.yaml

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -545,15 +545,13 @@ spec:
545545
volumeAttributesClassName may be used to set the VolumeAttributesClass used by this claim.
546546
If specified, the CSI driver will create or update the volume with the attributes defined
547547
in the corresponding VolumeAttributesClass. This has a different purpose than storageClassName,
548-
it can be changed after the claim is created. An empty string value means that no VolumeAttributesClass
549-
will be applied to the claim but it's not allowed to reset this field to empty string once it is set.
550-
If unspecified and the PersistentVolumeClaim is unbound, the default VolumeAttributesClass
551-
will be set by the persistentvolume controller if it exists.
548+
it can be changed after the claim is created. An empty string or nil value indicates that no
549+
VolumeAttributesClass will be applied to the claim. If the claim enters an Infeasible error state,
550+
this field can be reset to its previous value (including nil) to cancel the modification.
552551
If the resource referred to by volumeAttributesClass does not exist, this PersistentVolumeClaim will be
553552
set to a Pending state, as reflected by the modifyVolumeStatus field, until such as a resource
554553
exists.
555554
More info: https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/
556-
(Beta) Using this field requires the VolumeAttributesClass feature gate to be enabled (off by default).
557555
type: string
558556
volumeMode:
559557
description: |-
@@ -1823,8 +1821,8 @@ spec:
18231821
most preferred is the one with the greatest sum of weights, i.e.
18241822
for each node that meets all of the scheduling requirements (resource
18251823
request, requiredDuringScheduling anti-affinity expressions, etc.),
1826-
compute a sum by iterating through the elements of this field and adding
1827-
"weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the
1824+
compute a sum by iterating through the elements of this field and subtracting
1825+
"weight" from the sum if the node has pods which matches the corresponding podAffinityTerm; the
18281826
node(s) with the highest sum are the most preferred.
18291827
items:
18301828
description: The weights of all of the matched WeightedPodAffinityTerm
@@ -2768,7 +2766,7 @@ spec:
27682766
Claims lists the names of resources, defined in spec.resourceClaims,
27692767
that are used by this container.
27702768
2771-
This is an alpha field and requires enabling the
2769+
This field depends on the
27722770
DynamicResourceAllocation feature gate.
27732771
27742772
This field is immutable. It can only be set for containers.
@@ -3756,8 +3754,8 @@ spec:
37563754
most preferred is the one with the greatest sum of weights, i.e.
37573755
for each node that meets all of the scheduling requirements (resource
37583756
request, requiredDuringScheduling anti-affinity expressions, etc.),
3759-
compute a sum by iterating through the elements of this field and adding
3760-
"weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the
3757+
compute a sum by iterating through the elements of this field and subtracting
3758+
"weight" from the sum if the node has pods which matches the corresponding podAffinityTerm; the
37613759
node(s) with the highest sum are the most preferred.
37623760
items:
37633761
description: The weights of all of the matched WeightedPodAffinityTerm
@@ -4538,15 +4536,13 @@ spec:
45384536
volumeAttributesClassName may be used to set the VolumeAttributesClass used by this claim.
45394537
If specified, the CSI driver will create or update the volume with the attributes defined
45404538
in the corresponding VolumeAttributesClass. This has a different purpose than storageClassName,
4541-
it can be changed after the claim is created. An empty string value means that no VolumeAttributesClass
4542-
will be applied to the claim but it's not allowed to reset this field to empty string once it is set.
4543-
If unspecified and the PersistentVolumeClaim is unbound, the default VolumeAttributesClass
4544-
will be set by the persistentvolume controller if it exists.
4539+
it can be changed after the claim is created. An empty string or nil value indicates that no
4540+
VolumeAttributesClass will be applied to the claim. If the claim enters an Infeasible error state,
4541+
this field can be reset to its previous value (including nil) to cancel the modification.
45454542
If the resource referred to by volumeAttributesClass does not exist, this PersistentVolumeClaim will be
45464543
set to a Pending state, as reflected by the modifyVolumeStatus field, until such as a resource
45474544
exists.
45484545
More info: https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/
4549-
(Beta) Using this field requires the VolumeAttributesClass feature gate to be enabled (off by default).
45504546
type: string
45514547
volumeMode:
45524548
description: |-

controllers/alerts/secret.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ func (r *SecretReconciler) UpdateExistingResource(ctx context.Context, cl client
9292

9393
// Check if the secret has the correct token
9494
if string(found.Data["token"]) == token {
95-
return nil, false, nil
95+
return found, false, nil
9696
}
9797

9898
// If the token is incorrect, delete the old secret and create a new one

controllers/descheduler/descheduler_controller.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,9 @@ func (r *ReconcileDescheduler) isDeschedulerMisconfigured(ctx context.Context) (
101101
return false, err
102102
}
103103

104-
// TODO: modify this once deschedulerv1.RelieveAndMigrate will graduate, loosing
105-
// the "Dev" prefix, and will be "KubeVirtRelieveAndMigrate", then we will need
106-
// to change it to:
107-
// misconfiguredDescheduler = slices.Contains(instance.Spec.Profiles, deschedulerv1.RelieveAndMigrate)
108104
return !slices.ContainsFunc(instance.Spec.Profiles, func(profile deschedulerv1.DeschedulerProfile) bool {
109105
switch profile {
110-
case deschedulerv1.RelieveAndMigrate, "KubeVirtRelieveAndMigrate":
106+
case deschedulerv1.KubeVirtRelieveAndMigrate, deschedulerv1.DevKubeVirtRelieveAndMigrate, deschedulerv1.LifecycleAndUtilization:
111107
return true
112108
}
113109
return false

controllers/descheduler/descheduler_controller_test.go

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ var _ = Describe("DeschedulerController", func() {
9191
},
9292
BeTrue(),
9393
),
94-
Entry("should set the metric to false for the KubeDescheduler with a valid configuration",
94+
Entry("should set the metric to false for the KubeDescheduler with a valid configuration - LifecycleAndUtilization",
9595
[]client.Object{
9696
&deschedulerv1.KubeDescheduler{
9797
ObjectMeta: metav1.ObjectMeta{
@@ -100,7 +100,23 @@ var _ = Describe("DeschedulerController", func() {
100100
},
101101
Spec: deschedulerv1.KubeDeschedulerSpec{
102102
Profiles: []deschedulerv1.DeschedulerProfile{
103-
deschedulerv1.RelieveAndMigrate,
103+
deschedulerv1.LifecycleAndUtilization,
104+
},
105+
},
106+
},
107+
},
108+
BeFalse(),
109+
),
110+
Entry("should set the metric to false for the KubeDescheduler with a valid configuration - DevKubeVirtRelieveAndMigrate",
111+
[]client.Object{
112+
&deschedulerv1.KubeDescheduler{
113+
ObjectMeta: metav1.ObjectMeta{
114+
Name: hcoutil.DeschedulerCRName,
115+
Namespace: hcoutil.DeschedulerNamespace,
116+
},
117+
Spec: deschedulerv1.KubeDeschedulerSpec{
118+
Profiles: []deschedulerv1.DeschedulerProfile{
119+
deschedulerv1.DevKubeVirtRelieveAndMigrate,
104120
},
105121
ProfileCustomizations: &deschedulerv1.ProfileCustomizations{
106122
DevDeviationThresholds: &deschedulerv1.AsymmetricLowDeviationThreshold,
@@ -112,6 +128,22 @@ var _ = Describe("DeschedulerController", func() {
112128
},
113129
BeFalse(),
114130
),
131+
Entry("should set the metric to false for the KubeDescheduler with a valid configuration - KubeVirtRelieveAndMigrate",
132+
[]client.Object{
133+
&deschedulerv1.KubeDescheduler{
134+
ObjectMeta: metav1.ObjectMeta{
135+
Name: hcoutil.DeschedulerCRName,
136+
Namespace: hcoutil.DeschedulerNamespace,
137+
},
138+
Spec: deschedulerv1.KubeDeschedulerSpec{
139+
Profiles: []deschedulerv1.DeschedulerProfile{
140+
deschedulerv1.KubeVirtRelieveAndMigrate,
141+
},
142+
},
143+
},
144+
},
145+
BeFalse(),
146+
),
115147
)
116148
})
117149
})

controllers/hyperconverged/hyperconverged_controller.go

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -968,7 +968,7 @@ func (r *ReconcileHyperConverged) updateConditions(req *common.HcoRequest) {
968968
req.StatusDirty = true
969969
}
970970

971-
systemHealthStatus := r.getSystemHealthStatus(req.Conditions)
971+
systemHealthStatus := r.getSystemHealthStatus(req)
972972

973973
if systemHealthStatus != req.Instance.Status.SystemHealthStatus {
974974
req.Instance.Status.SystemHealthStatus = systemHealthStatus
@@ -1030,24 +1030,34 @@ func (r *ReconcileHyperConverged) detectTaintedConfiguration(req *common.HcoRequ
10301030
}
10311031
}
10321032

1033-
func (r *ReconcileHyperConverged) getSystemHealthStatus(conditions common.HcoConditions) string {
1034-
if isSystemHealthStatusError(conditions) {
1033+
func (r *ReconcileHyperConverged) getSystemHealthStatus(req *common.HcoRequest) string {
1034+
if isSystemHealthStatusError(req) {
10351035
return systemHealthStatusError
10361036
}
10371037

1038-
if isSystemHealthStatusWarning(conditions) {
1038+
if isSystemHealthStatusWarning(req) {
10391039
return systemHealthStatusWarning
10401040
}
10411041

10421042
return systemHealthStatusHealthy
10431043
}
10441044

1045-
func isSystemHealthStatusError(conditions common.HcoConditions) bool {
1046-
return !conditions.IsStatusConditionTrue(hcov1beta1.ConditionAvailable) || conditions.IsStatusConditionTrue(hcov1beta1.ConditionDegraded)
1045+
func isSystemHealthStatusError(req *common.HcoRequest) bool {
1046+
// During upgrade, only Degraded=True is an error. Temporary Available=false is expected.
1047+
if req.UpgradeMode {
1048+
return req.Conditions.IsStatusConditionTrue(hcov1beta1.ConditionDegraded)
1049+
}
1050+
1051+
return !req.Conditions.IsStatusConditionTrue(hcov1beta1.ConditionAvailable) || req.Conditions.IsStatusConditionTrue(hcov1beta1.ConditionDegraded)
10471052
}
10481053

1049-
func isSystemHealthStatusWarning(conditions common.HcoConditions) bool {
1050-
return !conditions.IsStatusConditionTrue(hcov1beta1.ConditionReconcileComplete) || conditions.IsStatusConditionTrue(hcov1beta1.ConditionProgressing)
1054+
func isSystemHealthStatusWarning(req *common.HcoRequest) bool {
1055+
// During upgrade, treat health as non-warning while progressing; wait for reconcile complete.
1056+
if req.UpgradeMode {
1057+
return !req.Conditions.IsStatusConditionTrue(hcov1beta1.ConditionReconcileComplete)
1058+
}
1059+
1060+
return !req.Conditions.IsStatusConditionTrue(hcov1beta1.ConditionReconcileComplete) || req.Conditions.IsStatusConditionTrue(hcov1beta1.ConditionProgressing)
10511061
}
10521062

10531063
func getNumOfChangesJSONPatch(jsonPatch string) int {

controllers/hyperconverged/hyperconverged_controller_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1648,6 +1648,9 @@ var _ = Describe("HyperconvergedController", func() {
16481648
Expect(cond.Reason).To(Equal("HCOUpgrading"))
16491649
Expect(cond.Message).To(Equal("HCO is now upgrading to version " + newHCOVersion))
16501650

1651+
// system health should remain healthy during upgrade progression
1652+
verifySystemHealthStatusHealthy(foundResource)
1653+
16511654
// check that the upgrade is not done if the not all the versions are match.
16521655
// Conditions are valid
16531656
makeComponentReady()
@@ -1667,6 +1670,9 @@ var _ = Describe("HyperconvergedController", func() {
16671670
Expect(cond.Reason).To(Equal("HCOUpgrading"))
16681671
Expect(cond.Message).To(Equal("HCO is now upgrading to version " + newHCOVersion))
16691672

1673+
// system health should remain healthy during upgrade progression
1674+
verifySystemHealthStatusHealthy(foundResource)
1675+
16701676
// now, complete the upgrade
16711677
updateComponentVersion()
16721678

0 commit comments

Comments
 (0)