mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 02:33:34 +00:00
rebase: bump k8s.io/kubernetes in the k8s-dependencies group
Bumps the k8s-dependencies group with 1 update: [k8s.io/kubernetes](https://github.com/kubernetes/kubernetes). Updates `k8s.io/kubernetes` from 1.32.3 to 1.33.0 - [Release notes](https://github.com/kubernetes/kubernetes/releases) - [Commits](https://github.com/kubernetes/kubernetes/compare/v1.32.3...v1.33.0) --- updated-dependencies: - dependency-name: k8s.io/kubernetes dependency-version: 1.33.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: k8s-dependencies ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
committed by
mergify[bot]
parent
4147d5d15a
commit
51895f8619
48
vendor/k8s.io/client-go/util/cert/cert.go
generated
vendored
48
vendor/k8s.io/client-go/util/cert/cert.go
generated
vendored
@ -90,11 +90,37 @@ func NewSelfSignedCACert(cfg Config, key crypto.Signer) (*x509.Certificate, erro
|
||||
return x509.ParseCertificate(certDERBytes)
|
||||
}
|
||||
|
||||
// SelfSignedCertKeyOptions contains configuration parameters for generating self-signed certificates.
|
||||
type SelfSignedCertKeyOptions struct {
|
||||
// Host is required, and identifies the host of the serving certificate. Can be a DNS name or IP address.
|
||||
Host string
|
||||
// AlternateIPs is optional, and identifies additional IPs the serving certificate should be valid for.
|
||||
AlternateIPs []net.IP
|
||||
// AlternateDNS is optional, and identifies additional DNS names the serving certificate should be valid for.
|
||||
AlternateDNS []string
|
||||
|
||||
// MaxAge controls the duration of the issued certificate.
|
||||
// Defaults to 1 year if unset.
|
||||
// Ignored if FixtureDirectory is set.
|
||||
MaxAge time.Duration
|
||||
|
||||
// FixtureDirectory is intended for use in tests.
|
||||
// If non-empty, it is a directory path which can contain pre-generated certs. The format is:
|
||||
// <host>_<ip>-<ip>_<alternateDNS>-<alternateDNS>.crt
|
||||
// <host>_<ip>-<ip>_<alternateDNS>-<alternateDNS>.key
|
||||
// Certs/keys not existing in that directory are created with a duration of 100 years.
|
||||
FixtureDirectory string
|
||||
}
|
||||
|
||||
// GenerateSelfSignedCertKey creates a self-signed certificate and key for the given host.
|
||||
// Host may be an IP or a DNS name
|
||||
// You may also specify additional subject alt names (either ip or dns names) for the certificate.
|
||||
func GenerateSelfSignedCertKey(host string, alternateIPs []net.IP, alternateDNS []string) ([]byte, []byte, error) {
|
||||
return GenerateSelfSignedCertKeyWithFixtures(host, alternateIPs, alternateDNS, "")
|
||||
return GenerateSelfSignedCertKeyWithOptions(SelfSignedCertKeyOptions{
|
||||
Host: host,
|
||||
AlternateIPs: alternateIPs,
|
||||
AlternateDNS: alternateDNS,
|
||||
})
|
||||
}
|
||||
|
||||
// GenerateSelfSignedCertKeyWithFixtures creates a self-signed certificate and key for the given host.
|
||||
@ -106,8 +132,26 @@ func GenerateSelfSignedCertKey(host string, alternateIPs []net.IP, alternateDNS
|
||||
// <host>_<ip>-<ip>_<alternateDNS>-<alternateDNS>.key
|
||||
// Certs/keys not existing in that directory are created.
|
||||
func GenerateSelfSignedCertKeyWithFixtures(host string, alternateIPs []net.IP, alternateDNS []string, fixtureDirectory string) ([]byte, []byte, error) {
|
||||
return GenerateSelfSignedCertKeyWithOptions(SelfSignedCertKeyOptions{
|
||||
Host: host,
|
||||
AlternateIPs: alternateIPs,
|
||||
AlternateDNS: alternateDNS,
|
||||
FixtureDirectory: fixtureDirectory,
|
||||
})
|
||||
}
|
||||
|
||||
// GenerateSelfSignedCertKeyWithOptions generates a self-signed certificate and key based on the provided options.
|
||||
func GenerateSelfSignedCertKeyWithOptions(opts SelfSignedCertKeyOptions) ([]byte, []byte, error) {
|
||||
host := opts.Host
|
||||
alternateIPs := opts.AlternateIPs
|
||||
alternateDNS := opts.AlternateDNS
|
||||
fixtureDirectory := opts.FixtureDirectory
|
||||
maxAge := opts.MaxAge
|
||||
if maxAge == 0 {
|
||||
maxAge = 365 * 24 * time.Hour
|
||||
}
|
||||
|
||||
validFrom := time.Now().Add(-time.Hour) // valid an hour earlier to avoid flakes due to clock skew
|
||||
maxAge := time.Hour * 24 * 365 // one year self-signed certs
|
||||
|
||||
baseName := fmt.Sprintf("%s_%s_%s", host, strings.Join(ipsToStrings(alternateIPs), "-"), strings.Join(alternateDNS, "-"))
|
||||
certFixturePath := filepath.Join(fixtureDirectory, baseName+".crt")
|
||||
|
2
vendor/k8s.io/client-go/util/consistencydetector/data_consistency_detector.go
generated
vendored
2
vendor/k8s.io/client-go/util/consistencydetector/data_consistency_detector.go
generated
vendored
@ -22,7 +22,7 @@ import (
|
||||
"sort"
|
||||
"time"
|
||||
|
||||
"github.com/google/go-cmp/cmp"
|
||||
"github.com/google/go-cmp/cmp" //nolint:depguard
|
||||
|
||||
"k8s.io/apimachinery/pkg/api/meta"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
5
vendor/k8s.io/client-go/util/flowcontrol/backoff.go
generated
vendored
5
vendor/k8s.io/client-go/util/flowcontrol/backoff.go
generated
vendored
@ -22,7 +22,6 @@ import (
|
||||
"time"
|
||||
|
||||
"k8s.io/utils/clock"
|
||||
testingclock "k8s.io/utils/clock/testing"
|
||||
)
|
||||
|
||||
type backoffEntry struct {
|
||||
@ -49,7 +48,7 @@ type Backoff struct {
|
||||
maxJitterFactor float64
|
||||
}
|
||||
|
||||
func NewFakeBackOff(initial, max time.Duration, tc *testingclock.FakeClock) *Backoff {
|
||||
func NewFakeBackOff(initial, max time.Duration, tc clock.Clock) *Backoff {
|
||||
return newBackoff(tc, initial, max, 0.0)
|
||||
}
|
||||
|
||||
@ -57,7 +56,7 @@ func NewBackOff(initial, max time.Duration) *Backoff {
|
||||
return NewBackOffWithJitter(initial, max, 0.0)
|
||||
}
|
||||
|
||||
func NewFakeBackOffWithJitter(initial, max time.Duration, tc *testingclock.FakeClock, maxJitterFactor float64) *Backoff {
|
||||
func NewFakeBackOffWithJitter(initial, max time.Duration, tc clock.Clock, maxJitterFactor float64) *Backoff {
|
||||
return newBackoff(tc, initial, max, maxJitterFactor)
|
||||
}
|
||||
|
||||
|
19
vendor/k8s.io/client-go/util/workqueue/delaying_queue.go
generated
vendored
19
vendor/k8s.io/client-go/util/workqueue/delaying_queue.go
generated
vendored
@ -22,6 +22,7 @@ import (
|
||||
"time"
|
||||
|
||||
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
|
||||
"k8s.io/klog/v2"
|
||||
"k8s.io/utils/clock"
|
||||
)
|
||||
|
||||
@ -46,6 +47,10 @@ type DelayingQueueConfig = TypedDelayingQueueConfig[any]
|
||||
|
||||
// TypedDelayingQueueConfig specifies optional configurations to customize a DelayingInterface.
|
||||
type TypedDelayingQueueConfig[T comparable] struct {
|
||||
// An optional logger. The name of the queue does *not* get added to it, this should
|
||||
// be done by the caller if desired.
|
||||
Logger *klog.Logger
|
||||
|
||||
// Name for the queue. If unnamed, the metrics will not be registered.
|
||||
Name string
|
||||
|
||||
@ -94,6 +99,10 @@ func TypedNewDelayingQueue[T comparable]() TypedDelayingInterface[T] {
|
||||
// NewTypedDelayingQueueWithConfig constructs a new workqueue with options to
|
||||
// customize different properties.
|
||||
func NewTypedDelayingQueueWithConfig[T comparable](config TypedDelayingQueueConfig[T]) TypedDelayingInterface[T] {
|
||||
logger := klog.Background()
|
||||
if config.Logger != nil {
|
||||
logger = *config.Logger
|
||||
}
|
||||
if config.Clock == nil {
|
||||
config.Clock = clock.RealClock{}
|
||||
}
|
||||
@ -106,7 +115,7 @@ func NewTypedDelayingQueueWithConfig[T comparable](config TypedDelayingQueueConf
|
||||
})
|
||||
}
|
||||
|
||||
return newDelayingQueue(config.Clock, config.Queue, config.Name, config.MetricsProvider)
|
||||
return newDelayingQueue(logger, config.Clock, config.Queue, config.Name, config.MetricsProvider)
|
||||
}
|
||||
|
||||
// NewDelayingQueueWithCustomQueue constructs a new workqueue with ability to
|
||||
@ -135,7 +144,7 @@ func NewDelayingQueueWithCustomClock(clock clock.WithTicker, name string) Delayi
|
||||
})
|
||||
}
|
||||
|
||||
func newDelayingQueue[T comparable](clock clock.WithTicker, q TypedInterface[T], name string, provider MetricsProvider) *delayingType[T] {
|
||||
func newDelayingQueue[T comparable](logger klog.Logger, clock clock.WithTicker, q TypedInterface[T], name string, provider MetricsProvider) *delayingType[T] {
|
||||
ret := &delayingType[T]{
|
||||
TypedInterface: q,
|
||||
clock: clock,
|
||||
@ -145,7 +154,7 @@ func newDelayingQueue[T comparable](clock clock.WithTicker, q TypedInterface[T],
|
||||
metrics: newRetryMetrics(name, provider),
|
||||
}
|
||||
|
||||
go ret.waitingLoop()
|
||||
go ret.waitingLoop(logger)
|
||||
return ret
|
||||
}
|
||||
|
||||
@ -264,8 +273,8 @@ func (q *delayingType[T]) AddAfter(item T, duration time.Duration) {
|
||||
const maxWait = 10 * time.Second
|
||||
|
||||
// waitingLoop runs until the workqueue is shutdown and keeps a check on the list of items to be added.
|
||||
func (q *delayingType[T]) waitingLoop() {
|
||||
defer utilruntime.HandleCrash()
|
||||
func (q *delayingType[T]) waitingLoop(logger klog.Logger) {
|
||||
defer utilruntime.HandleCrashWithLogger(logger)
|
||||
|
||||
// Make a placeholder channel to use when there are no items in our list
|
||||
never := make(<-chan time.Time)
|
||||
|
2
vendor/k8s.io/client-go/util/workqueue/doc.go
generated
vendored
2
vendor/k8s.io/client-go/util/workqueue/doc.go
generated
vendored
@ -23,4 +23,4 @@ limitations under the License.
|
||||
// - Multiple consumers and producers. In particular, it is allowed for an
|
||||
// item to be reenqueued while it is being processed.
|
||||
// - Shutdown notifications.
|
||||
package workqueue // import "k8s.io/client-go/util/workqueue"
|
||||
package workqueue
|
||||
|
2
vendor/k8s.io/client-go/util/workqueue/parallelizer.go
generated
vendored
2
vendor/k8s.io/client-go/util/workqueue/parallelizer.go
generated
vendored
@ -74,7 +74,7 @@ func ParallelizeUntil(ctx context.Context, workers, pieces int, doWorkPiece DoWo
|
||||
wg.Add(workers)
|
||||
for i := 0; i < workers; i++ {
|
||||
go func() {
|
||||
defer utilruntime.HandleCrash()
|
||||
defer utilruntime.HandleCrashWithContext(ctx)
|
||||
defer wg.Done()
|
||||
for chunk := range toProcess {
|
||||
start := chunk * chunkSize
|
||||
|
Reference in New Issue
Block a user