Skip to content

Commit 0686e3c

Browse files
authored
Bump Kubernetes API to v0.35.1 (#4042)
Also bump all dependencies. Signed-off-by: Nahshon Unna Tsameret <nunnatsa@redhat.com>
1 parent 68b2566 commit 0686e3c

File tree

2,297 files changed

+90883
-79839
lines changed

Some content is hidden

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

2,297 files changed

+90883
-79839
lines changed

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

Lines changed: 12 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ spec:
464464
resources:
465465
description: |-
466466
resources represents the minimum resources the volume should have.
467-
If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements
467+
Users are allowed to specify resource requirements
468468
that are lower than previous value but must still be higher than capacity recorded in the
469469
status field of the claim.
470470
More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
@@ -2229,9 +2229,10 @@ spec:
22292229
operator:
22302230
description: |-
22312231
Operator represents a key's relationship to the value.
2232-
Valid operators are Exists and Equal. Defaults to Equal.
2232+
Valid operators are Exists, Equal, Lt, and Gt. Defaults to Equal.
22332233
Exists is equivalent to wildcard for value, so that a pod can
22342234
tolerate all taints of a particular category.
2235+
Lt and Gt perform numeric comparisons (requires feature gate TaintTolerationComparisonOperators).
22352236
type: string
22362237
tolerationSeconds:
22372238
description: |-
@@ -2932,16 +2933,11 @@ spec:
29322933
looks like this:
29332934
29342935
ciphers:
2935-
29362936
- ECDHE-ECDSA-CHACHA20-POLY1305
2937-
29382937
- ECDHE-RSA-CHACHA20-POLY1305
2939-
29402938
- ECDHE-RSA-AES128-GCM-SHA256
2941-
29422939
- ECDHE-ECDSA-AES128-GCM-SHA256
2943-
2944-
minTLSVersion: VersionTLS11
2940+
minTLSVersion: TLSv1.1
29452941
nullable: true
29462942
properties:
29472943
ciphers:
@@ -2955,14 +2951,13 @@ spec:
29552951
items:
29562952
type: string
29572953
type: array
2958-
x-kubernetes-list-type: atomic
29592954
minTLSVersion:
29602955
description: |-
29612956
minTLSVersion is used to specify the minimal version of the TLS protocol
29622957
that is negotiated during the TLS handshake. For example, to use TLS
29632958
versions 1.1, 1.2 and 1.3 (yaml):
29642959
2965-
minTLSVersion: VersionTLS11
2960+
minTLSVersion: TLSv1.1
29662961
29672962
NOTE: currently the highest minTLSVersion allowed is VersionTLS12
29682963
enum:
@@ -2981,30 +2976,18 @@ spec:
29812976
and looks like this (yaml):
29822977
29832978
ciphers:
2984-
29852979
- TLS_AES_128_GCM_SHA256
2986-
29872980
- TLS_AES_256_GCM_SHA384
2988-
29892981
- TLS_CHACHA20_POLY1305_SHA256
2990-
29912982
- ECDHE-ECDSA-AES128-GCM-SHA256
2992-
29932983
- ECDHE-RSA-AES128-GCM-SHA256
2994-
29952984
- ECDHE-ECDSA-AES256-GCM-SHA384
2996-
29972985
- ECDHE-RSA-AES256-GCM-SHA384
2998-
29992986
- ECDHE-ECDSA-CHACHA20-POLY1305
3000-
30012987
- ECDHE-RSA-CHACHA20-POLY1305
3002-
30032988
- DHE-RSA-AES128-GCM-SHA256
3004-
30052989
- DHE-RSA-AES256-GCM-SHA384
3006-
3007-
minTLSVersion: VersionTLS12
2990+
minTLSVersion: TLSv1.2
30082991
nullable: true
30092992
type: object
30102993
modern:
@@ -3016,14 +2999,12 @@ spec:
30162999
and looks like this (yaml):
30173000
30183001
ciphers:
3019-
30203002
- TLS_AES_128_GCM_SHA256
3021-
30223003
- TLS_AES_256_GCM_SHA384
3023-
30243004
- TLS_CHACHA20_POLY1305_SHA256
3005+
minTLSVersion: TLSv1.3
30253006
3026-
minTLSVersion: VersionTLS13
3007+
NOTE: Currently unsupported.
30273008
nullable: true
30283009
type: object
30293010
old:
@@ -3035,66 +3016,36 @@ spec:
30353016
and looks like this (yaml):
30363017
30373018
ciphers:
3038-
30393019
- TLS_AES_128_GCM_SHA256
3040-
30413020
- TLS_AES_256_GCM_SHA384
3042-
30433021
- TLS_CHACHA20_POLY1305_SHA256
3044-
30453022
- ECDHE-ECDSA-AES128-GCM-SHA256
3046-
30473023
- ECDHE-RSA-AES128-GCM-SHA256
3048-
30493024
- ECDHE-ECDSA-AES256-GCM-SHA384
3050-
30513025
- ECDHE-RSA-AES256-GCM-SHA384
3052-
30533026
- ECDHE-ECDSA-CHACHA20-POLY1305
3054-
30553027
- ECDHE-RSA-CHACHA20-POLY1305
3056-
30573028
- DHE-RSA-AES128-GCM-SHA256
3058-
30593029
- DHE-RSA-AES256-GCM-SHA384
3060-
30613030
- DHE-RSA-CHACHA20-POLY1305
3062-
30633031
- ECDHE-ECDSA-AES128-SHA256
3064-
30653032
- ECDHE-RSA-AES128-SHA256
3066-
30673033
- ECDHE-ECDSA-AES128-SHA
3068-
30693034
- ECDHE-RSA-AES128-SHA
3070-
30713035
- ECDHE-ECDSA-AES256-SHA384
3072-
30733036
- ECDHE-RSA-AES256-SHA384
3074-
30753037
- ECDHE-ECDSA-AES256-SHA
3076-
30773038
- ECDHE-RSA-AES256-SHA
3078-
30793039
- DHE-RSA-AES128-SHA256
3080-
30813040
- DHE-RSA-AES256-SHA256
3082-
30833041
- AES128-GCM-SHA256
3084-
30853042
- AES256-GCM-SHA384
3086-
30873043
- AES128-SHA256
3088-
30893044
- AES256-SHA256
3090-
30913045
- AES128-SHA
3092-
30933046
- AES256-SHA
3094-
30953047
- DES-CBC3-SHA
3096-
3097-
minTLSVersion: VersionTLS10
3048+
minTLSVersion: TLSv1.0
30983049
nullable: true
30993050
type: object
31003051
type:
@@ -4183,9 +4134,10 @@ spec:
41834134
operator:
41844135
description: |-
41854136
Operator represents a key's relationship to the value.
4186-
Valid operators are Exists and Equal. Defaults to Equal.
4137+
Valid operators are Exists, Equal, Lt, and Gt. Defaults to Equal.
41874138
Exists is equivalent to wildcard for value, so that a pod can
41884139
tolerate all taints of a particular category.
4140+
Lt and Gt perform numeric comparisons (requires feature gate TaintTolerationComparisonOperators).
41894141
type: string
41904142
tolerationSeconds:
41914143
description: |-
@@ -4501,7 +4453,7 @@ spec:
45014453
resources:
45024454
description: |-
45034455
resources represents the minimum resources the volume should have.
4504-
If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements
4456+
Users are allowed to specify resource requirements
45054457
that are lower than previous value but must still be higher than capacity recorded in the
45064458
status field of the claim.
45074459
More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources

controllers/alerts/serviceMonitor.go

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -85,23 +85,7 @@ func NewServiceMonitor(namespace string, owner metav1.OwnerReference) *monitorin
8585
MatchLabels: labels,
8686
},
8787
Endpoints: []monitoringv1.Endpoint{
88-
{
89-
Port: OperatorPortName,
90-
Scheme: "https",
91-
Authorization: &monitoringv1.SafeAuthorization{
92-
Credentials: &corev1.SecretKeySelector{
93-
LocalObjectReference: corev1.LocalObjectReference{
94-
Name: secretName,
95-
},
96-
Key: "token",
97-
},
98-
},
99-
TLSConfig: &monitoringv1.TLSConfig{
100-
SafeTLSConfig: monitoringv1.SafeTLSConfig{
101-
InsecureSkipVerify: ptr.To(true),
102-
},
103-
},
104-
},
88+
CreateEndpoint(secretName),
10589
},
10690
}
10791

@@ -119,3 +103,30 @@ func NewServiceMonitor(namespace string, owner metav1.OwnerReference) *monitorin
119103
Spec: spec,
120104
}
121105
}
106+
107+
func CreateEndpoint(bearerTokenSecretName string) monitoringv1.Endpoint {
108+
109+
return monitoringv1.Endpoint{
110+
Port: OperatorPortName,
111+
Scheme: ptr.To[monitoringv1.Scheme]("https"),
112+
HTTPConfigWithProxyAndTLSFiles: monitoringv1.HTTPConfigWithProxyAndTLSFiles{
113+
HTTPConfigWithTLSFiles: monitoringv1.HTTPConfigWithTLSFiles{
114+
HTTPConfigWithoutTLS: monitoringv1.HTTPConfigWithoutTLS{
115+
Authorization: &monitoringv1.SafeAuthorization{
116+
Credentials: &corev1.SecretKeySelector{
117+
LocalObjectReference: corev1.LocalObjectReference{
118+
Name: bearerTokenSecretName,
119+
},
120+
Key: "token",
121+
},
122+
},
123+
},
124+
TLSConfig: &monitoringv1.TLSConfig{
125+
SafeTLSConfig: monitoringv1.SafeTLSConfig{
126+
InsecureSkipVerify: ptr.To(true),
127+
},
128+
},
129+
},
130+
},
131+
}
132+
}

controllers/commontestutils/clusterMock.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,15 @@ import (
88
"k8s.io/apimachinery/pkg/api/meta"
99
"k8s.io/apimachinery/pkg/runtime"
1010
"k8s.io/client-go/rest"
11+
"k8s.io/client-go/tools/events"
1112
"k8s.io/client-go/tools/record"
1213
"sigs.k8s.io/controller-runtime/pkg/cache"
1314
"sigs.k8s.io/controller-runtime/pkg/client"
1415
"sigs.k8s.io/controller-runtime/pkg/cluster"
1516
)
1617

18+
var _ cluster.Cluster = &clusterMock{}
19+
1720
type clusterMock struct {
1821
// config is the rest.config used to talk to the apiserver. Required.
1922
config *rest.Config
@@ -78,6 +81,10 @@ func (cm *clusterMock) GetEventRecorderFor(_ string) record.EventRecorder {
7881
return nil
7982
}
8083

84+
func (cm *clusterMock) GetEventRecorder(_ string) events.EventRecorder {
85+
return nil
86+
}
87+
8188
func (cm *clusterMock) GetRESTMapper() meta.RESTMapper {
8289
return cm.mapper
8390
}

controllers/commontestutils/managerMock.go

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ import (
44
"context"
55
"net/http"
66

7+
"k8s.io/client-go/tools/events"
78
"sigs.k8s.io/controller-runtime/pkg/config"
9+
"sigs.k8s.io/controller-runtime/pkg/webhook/conversion"
810

911
"github.com/go-logr/logr"
1012
"k8s.io/apimachinery/pkg/api/meta"
@@ -19,6 +21,8 @@ import (
1921
"sigs.k8s.io/controller-runtime/pkg/webhook"
2022
)
2123

24+
var _ manager.Manager = &ManagerMock{}
25+
2226
type ManagerMock struct {
2327
runnables []manager.Runnable
2428

@@ -79,6 +83,10 @@ func (mm *ManagerMock) GetConfig() *rest.Config {
7983
return mm.cluster.GetConfig()
8084
}
8185

86+
func (mm *ManagerMock) GetConverterRegistry() conversion.Registry {
87+
return nil
88+
}
89+
8290
func (mm *ManagerMock) GetClient() client.Client {
8391
return mm.cluster.GetClient()
8492
}
@@ -99,6 +107,10 @@ func (mm *ManagerMock) GetEventRecorderFor(name string) record.EventRecorder {
99107
return mm.cluster.GetEventRecorderFor(name)
100108
}
101109

110+
func (mm *ManagerMock) GetEventRecorder(name string) events.EventRecorder {
111+
return mm.cluster.GetEventRecorder(name)
112+
}
113+
102114
func (mm *ManagerMock) GetRESTMapper() meta.RESTMapper {
103115
return mm.cluster.GetRESTMapper()
104116
}
@@ -134,15 +146,15 @@ func (mm *ManagerMock) GetRunnables() []manager.Runnable {
134146
// NewManagerMock returns a new mocked Manager for unit test which involves Controller Managers
135147
func NewManagerMock(config *rest.Config, options manager.Options, client client.Client, logger logr.Logger) (manager.Manager, error) {
136148

137-
cluster, err := NewClusterMock(config, cluster.Options{Scheme: options.Scheme}, client, logger)
149+
fakeCluster, err := NewClusterMock(config, cluster.Options{Scheme: options.Scheme}, client, logger)
138150
if err != nil {
139151
return nil, err
140152
}
141153

142154
runnables := make([]manager.Runnable, 0)
143155

144156
return &ManagerMock{
145-
cluster: cluster,
157+
cluster: fakeCluster,
146158
runnables: runnables,
147159
controllerOptions: options.Controller,
148160
logger: logger,

controllers/commontestutils/testClient.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@ func (c *HcoTestClient) RESTMapper() meta.RESTMapper {
144144
return c.client.RESTMapper()
145145
}
146146

147+
var _ client.StatusWriter = &HcoTestStatusWriter{}
148+
147149
type HcoTestStatusWriter struct {
148150
client client.SubResourceWriter
149151
errors TestErrors
@@ -170,6 +172,10 @@ func (sw *HcoTestStatusWriter) Patch(ctx context.Context, obj client.Object, pat
170172
return sw.client.Patch(ctx, obj, patch, opts...)
171173
}
172174

175+
func (sw *HcoTestStatusWriter) Apply(ctx context.Context, obj runtime.ApplyConfiguration, opts ...client.SubResourceApplyOption) error {
176+
return sw.client.Apply(ctx, obj, opts...)
177+
}
178+
173179
func (sw *HcoTestStatusWriter) InitiateErrors(errs ...error) {
174180
sw.errors = errs
175181
}

controllers/webhooks/bearer-token-controller/serviceMonitor.go

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@ package bearer_token_controller
22

33
import (
44
monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1"
5-
corev1 "k8s.io/api/core/v1"
65
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
7-
"k8s.io/utils/ptr"
86

97
"github.com/kubevirt/hyperconverged-cluster-operator/controllers/alerts"
108
)
@@ -20,23 +18,7 @@ func newServiceMonitor(namespace string, owner metav1.OwnerReference) *monitorin
2018
MatchLabels: smLabels,
2119
},
2220
Endpoints: []monitoringv1.Endpoint{
23-
{
24-
Port: alerts.OperatorPortName,
25-
Scheme: "https",
26-
Authorization: &monitoringv1.SafeAuthorization{
27-
Credentials: &corev1.SecretKeySelector{
28-
LocalObjectReference: corev1.LocalObjectReference{
29-
Name: secretName,
30-
},
31-
Key: "token",
32-
},
33-
},
34-
TLSConfig: &monitoringv1.TLSConfig{
35-
SafeTLSConfig: monitoringv1.SafeTLSConfig{
36-
InsecureSkipVerify: ptr.To(true),
37-
},
38-
},
39-
},
21+
alerts.CreateEndpoint(secretName),
4022
},
4123
}
4224

0 commit comments

Comments
 (0)