Skip to content

Commit c59162b

Browse files
authored
Merge pull request #493 from Fedosin/capi17
🌱 Bump cluster-api to v1.7.0
2 parents bc32047 + 716e3c0 commit c59162b

21 files changed

+3241
-1253
lines changed

api/v1alpha1/provider_conversion.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
"strings"
2121

2222
apimachineryconversion "k8s.io/apimachinery/pkg/conversion"
23-
"k8s.io/utils/pointer"
23+
"k8s.io/utils/ptr"
2424
utilconversion "sigs.k8s.io/cluster-api/util/conversion"
2525
ctrlconfigv1 "sigs.k8s.io/controller-runtime/pkg/config/v1alpha1"
2626
"sigs.k8s.io/controller-runtime/pkg/conversion"
@@ -525,5 +525,5 @@ func fromImageMeta(im *ImageMeta) *string {
525525
result = result + ":" + im.Tag
526526
}
527527

528-
return pointer.String(result)
528+
return ptr.To(result)
529529
}

cmd/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import (
3030
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
3131
clientgoscheme "k8s.io/client-go/kubernetes/scheme"
3232
"k8s.io/klog/v2"
33-
"k8s.io/klog/v2/klogr"
33+
"k8s.io/klog/v2/textlogger"
3434
"sigs.k8s.io/cluster-api-operator/internal/webhook"
3535
clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1"
3636
clusterctlv1 "sigs.k8s.io/cluster-api/cmd/clusterctl/api/v1alpha3"
@@ -129,7 +129,7 @@ func main() {
129129
pflag.CommandLine.AddGoFlagSet(flag.CommandLine)
130130
pflag.Parse()
131131

132-
ctrl.SetLogger(klogr.New())
132+
ctrl.SetLogger(textlogger.NewLogger(textlogger.NewConfig()))
133133
restConfig := ctrl.GetConfigOrDie()
134134

135135
diagnosticsOpts := flags.GetDiagnosticsOptions(diagnosticsOptions)

cmd/plugin/cmd/delete.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,12 @@ import (
2525
"github.com/go-errors/errors"
2626
"github.com/spf13/cobra"
2727
corev1 "k8s.io/api/core/v1"
28+
"k8s.io/apimachinery/pkg/api/meta"
2829
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2930
"k8s.io/apimachinery/pkg/fields"
30-
"k8s.io/apimachinery/pkg/util/wait"
31-
"k8s.io/klog/v2/klogr"
32-
3331
kerrors "k8s.io/apimachinery/pkg/util/errors"
34-
35-
"k8s.io/apimachinery/pkg/api/meta"
32+
"k8s.io/apimachinery/pkg/util/wait"
33+
"k8s.io/klog/v2/textlogger"
3634
ctrl "sigs.k8s.io/controller-runtime"
3735

3836
apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
@@ -141,7 +139,7 @@ func init() {
141139
func runDelete() error {
142140
ctx := context.Background()
143141

144-
ctrl.SetLogger(klogr.New())
142+
ctrl.SetLogger(textlogger.NewLogger(textlogger.NewConfig()))
145143

146144
hasProviderNames := deleteOpts.coreProvider ||
147145
(len(deleteOpts.bootstrapProviders) > 0) ||

cmd/plugin/cmd/upgrade_plan.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//nolint
12
/*
23
Copyright 2023 The Kubernetes Authors.
34

config/crd/bases/operator.cluster.x-k8s.io_addonproviders.yaml

Lines changed: 132 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -305,8 +305,9 @@ spec:
305305
with the corresponding weight.
306306
properties:
307307
labelSelector:
308-
description: A label query over a set of resources,
309-
in this case pods.
308+
description: |-
309+
A label query over a set of resources, in this case pods.
310+
If it's null, this PodAffinityTerm matches with no Pods.
310311
properties:
311312
matchExpressions:
312313
description: matchExpressions is a list
@@ -350,6 +351,36 @@ spec:
350351
type: object
351352
type: object
352353
x-kubernetes-map-type: atomic
354+
matchLabelKeys:
355+
description: |-
356+
MatchLabelKeys is a set of pod label keys to select which pods will
357+
be taken into consideration. The keys are used to lookup values from the
358+
incoming pod labels, those key-value labels are merged with `LabelSelector` as `key in (value)`
359+
to select the group of existing pods which pods will be taken into consideration
360+
for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming
361+
pod labels will be ignored. The default value is empty.
362+
The same key is forbidden to exist in both MatchLabelKeys and LabelSelector.
363+
Also, MatchLabelKeys cannot be set when LabelSelector isn't set.
364+
This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate.
365+
items:
366+
type: string
367+
type: array
368+
x-kubernetes-list-type: atomic
369+
mismatchLabelKeys:
370+
description: |-
371+
MismatchLabelKeys is a set of pod label keys to select which pods will
372+
be taken into consideration. The keys are used to lookup values from the
373+
incoming pod labels, those key-value labels are merged with `LabelSelector` as `key notin (value)`
374+
to select the group of existing pods which pods will be taken into consideration
375+
for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming
376+
pod labels will be ignored. The default value is empty.
377+
The same key is forbidden to exist in both MismatchLabelKeys and LabelSelector.
378+
Also, MismatchLabelKeys cannot be set when LabelSelector isn't set.
379+
This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate.
380+
items:
381+
type: string
382+
type: array
383+
x-kubernetes-list-type: atomic
353384
namespaceSelector:
354385
description: |-
355386
A label query over the set of namespaces that the term applies to.
@@ -450,8 +481,9 @@ spec:
450481
a pod of the set of pods is running
451482
properties:
452483
labelSelector:
453-
description: A label query over a set of resources,
454-
in this case pods.
484+
description: |-
485+
A label query over a set of resources, in this case pods.
486+
If it's null, this PodAffinityTerm matches with no Pods.
455487
properties:
456488
matchExpressions:
457489
description: matchExpressions is a list of label
@@ -495,6 +527,36 @@ spec:
495527
type: object
496528
type: object
497529
x-kubernetes-map-type: atomic
530+
matchLabelKeys:
531+
description: |-
532+
MatchLabelKeys is a set of pod label keys to select which pods will
533+
be taken into consideration. The keys are used to lookup values from the
534+
incoming pod labels, those key-value labels are merged with `LabelSelector` as `key in (value)`
535+
to select the group of existing pods which pods will be taken into consideration
536+
for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming
537+
pod labels will be ignored. The default value is empty.
538+
The same key is forbidden to exist in both MatchLabelKeys and LabelSelector.
539+
Also, MatchLabelKeys cannot be set when LabelSelector isn't set.
540+
This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate.
541+
items:
542+
type: string
543+
type: array
544+
x-kubernetes-list-type: atomic
545+
mismatchLabelKeys:
546+
description: |-
547+
MismatchLabelKeys is a set of pod label keys to select which pods will
548+
be taken into consideration. The keys are used to lookup values from the
549+
incoming pod labels, those key-value labels are merged with `LabelSelector` as `key notin (value)`
550+
to select the group of existing pods which pods will be taken into consideration
551+
for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming
552+
pod labels will be ignored. The default value is empty.
553+
The same key is forbidden to exist in both MismatchLabelKeys and LabelSelector.
554+
Also, MismatchLabelKeys cannot be set when LabelSelector isn't set.
555+
This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate.
556+
items:
557+
type: string
558+
type: array
559+
x-kubernetes-list-type: atomic
498560
namespaceSelector:
499561
description: |-
500562
A label query over the set of namespaces that the term applies to.
@@ -593,8 +655,9 @@ spec:
593655
with the corresponding weight.
594656
properties:
595657
labelSelector:
596-
description: A label query over a set of resources,
597-
in this case pods.
658+
description: |-
659+
A label query over a set of resources, in this case pods.
660+
If it's null, this PodAffinityTerm matches with no Pods.
598661
properties:
599662
matchExpressions:
600663
description: matchExpressions is a list
@@ -638,6 +701,36 @@ spec:
638701
type: object
639702
type: object
640703
x-kubernetes-map-type: atomic
704+
matchLabelKeys:
705+
description: |-
706+
MatchLabelKeys is a set of pod label keys to select which pods will
707+
be taken into consideration. The keys are used to lookup values from the
708+
incoming pod labels, those key-value labels are merged with `LabelSelector` as `key in (value)`
709+
to select the group of existing pods which pods will be taken into consideration
710+
for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming
711+
pod labels will be ignored. The default value is empty.
712+
The same key is forbidden to exist in both MatchLabelKeys and LabelSelector.
713+
Also, MatchLabelKeys cannot be set when LabelSelector isn't set.
714+
This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate.
715+
items:
716+
type: string
717+
type: array
718+
x-kubernetes-list-type: atomic
719+
mismatchLabelKeys:
720+
description: |-
721+
MismatchLabelKeys is a set of pod label keys to select which pods will
722+
be taken into consideration. The keys are used to lookup values from the
723+
incoming pod labels, those key-value labels are merged with `LabelSelector` as `key notin (value)`
724+
to select the group of existing pods which pods will be taken into consideration
725+
for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming
726+
pod labels will be ignored. The default value is empty.
727+
The same key is forbidden to exist in both MismatchLabelKeys and LabelSelector.
728+
Also, MismatchLabelKeys cannot be set when LabelSelector isn't set.
729+
This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate.
730+
items:
731+
type: string
732+
type: array
733+
x-kubernetes-list-type: atomic
641734
namespaceSelector:
642735
description: |-
643736
A label query over the set of namespaces that the term applies to.
@@ -738,8 +831,9 @@ spec:
738831
a pod of the set of pods is running
739832
properties:
740833
labelSelector:
741-
description: A label query over a set of resources,
742-
in this case pods.
834+
description: |-
835+
A label query over a set of resources, in this case pods.
836+
If it's null, this PodAffinityTerm matches with no Pods.
743837
properties:
744838
matchExpressions:
745839
description: matchExpressions is a list of label
@@ -783,6 +877,36 @@ spec:
783877
type: object
784878
type: object
785879
x-kubernetes-map-type: atomic
880+
matchLabelKeys:
881+
description: |-
882+
MatchLabelKeys is a set of pod label keys to select which pods will
883+
be taken into consideration. The keys are used to lookup values from the
884+
incoming pod labels, those key-value labels are merged with `LabelSelector` as `key in (value)`
885+
to select the group of existing pods which pods will be taken into consideration
886+
for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming
887+
pod labels will be ignored. The default value is empty.
888+
The same key is forbidden to exist in both MatchLabelKeys and LabelSelector.
889+
Also, MatchLabelKeys cannot be set when LabelSelector isn't set.
890+
This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate.
891+
items:
892+
type: string
893+
type: array
894+
x-kubernetes-list-type: atomic
895+
mismatchLabelKeys:
896+
description: |-
897+
MismatchLabelKeys is a set of pod label keys to select which pods will
898+
be taken into consideration. The keys are used to lookup values from the
899+
incoming pod labels, those key-value labels are merged with `LabelSelector` as `key notin (value)`
900+
to select the group of existing pods which pods will be taken into consideration
901+
for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming
902+
pod labels will be ignored. The default value is empty.
903+
The same key is forbidden to exist in both MismatchLabelKeys and LabelSelector.
904+
Also, MismatchLabelKeys cannot be set when LabelSelector isn't set.
905+
This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate.
906+
items:
907+
type: string
908+
type: array
909+
x-kubernetes-list-type: atomic
786910
namespaceSelector:
787911
description: |-
788912
A label query over the set of namespaces that the term applies to.

0 commit comments

Comments
 (0)