Merge pull request #9849 from containerd/dependabot/go_modules/k8s-ee769a58bd
build(deps): bump the k8s group with 5 updates
This commit is contained in:
commit
7628c046be
14
go.mod
14
go.mod
@ -71,12 +71,12 @@ require (
|
|||||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240102182953-50ed04b92917
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20240102182953-50ed04b92917
|
||||||
google.golang.org/grpc v1.61.0
|
google.golang.org/grpc v1.61.0
|
||||||
google.golang.org/protobuf v1.32.0
|
google.golang.org/protobuf v1.32.0
|
||||||
k8s.io/apimachinery v0.29.1
|
k8s.io/apimachinery v0.29.2
|
||||||
k8s.io/client-go v0.29.1
|
k8s.io/client-go v0.29.2
|
||||||
k8s.io/component-base v0.29.1
|
k8s.io/component-base v0.29.2
|
||||||
k8s.io/cri-api v0.30.0-alpha.2.0.20240216190946-4e003cc3b0a4
|
k8s.io/cri-api v0.30.0-alpha.2.0.20240216190946-4e003cc3b0a4
|
||||||
k8s.io/klog/v2 v2.110.1
|
k8s.io/klog/v2 v2.120.1
|
||||||
k8s.io/kubelet v0.29.1
|
k8s.io/kubelet v0.29.2
|
||||||
k8s.io/utils v0.0.0-20230726121419-3b25d923346b
|
k8s.io/utils v0.0.0-20230726121419-3b25d923346b
|
||||||
tags.cncf.io/container-device-interface v0.6.2
|
tags.cncf.io/container-device-interface v0.6.2
|
||||||
)
|
)
|
||||||
@ -133,8 +133,8 @@ require (
|
|||||||
gopkg.in/inf.v0 v0.9.1 // indirect
|
gopkg.in/inf.v0 v0.9.1 // indirect
|
||||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||||
k8s.io/api v0.29.1 // indirect
|
k8s.io/api v0.29.2 // indirect
|
||||||
k8s.io/apiserver v0.29.1 // indirect
|
k8s.io/apiserver v0.29.2 // indirect
|
||||||
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
|
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
|
||||||
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
|
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
|
||||||
sigs.k8s.io/yaml v1.3.0 // indirect
|
sigs.k8s.io/yaml v1.3.0 // indirect
|
||||||
|
29
go.sum
29
go.sum
@ -144,7 +144,6 @@ github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2
|
|||||||
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
|
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
|
||||||
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
|
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
|
||||||
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
||||||
github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
|
|
||||||
github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
|
github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
|
||||||
github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
|
github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
|
||||||
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
|
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
|
||||||
@ -790,24 +789,24 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh
|
|||||||
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
|
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
|
||||||
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
||||||
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
||||||
k8s.io/api v0.29.1 h1:DAjwWX/9YT7NQD4INu49ROJuZAAAP/Ijki48GUPzxqw=
|
k8s.io/api v0.29.2 h1:hBC7B9+MU+ptchxEqTNW2DkUosJpp1P+Wn6YncZ474A=
|
||||||
k8s.io/api v0.29.1/go.mod h1:7Kl10vBRUXhnQQI8YR/R327zXC8eJ7887/+Ybta+RoQ=
|
k8s.io/api v0.29.2/go.mod h1:sdIaaKuU7P44aoyyLlikSLayT6Vb7bvJNCX105xZXY0=
|
||||||
k8s.io/apimachinery v0.29.1 h1:KY4/E6km/wLBguvCZv8cKTeOwwOBqFNjwJIdMkMbbRc=
|
k8s.io/apimachinery v0.29.2 h1:EWGpfJ856oj11C52NRCHuU7rFDwxev48z+6DSlGNsV8=
|
||||||
k8s.io/apimachinery v0.29.1/go.mod h1:6HVkd1FwxIagpYrHSwJlQqZI3G9LfYWRPAkUvLnXTKU=
|
k8s.io/apimachinery v0.29.2/go.mod h1:6HVkd1FwxIagpYrHSwJlQqZI3G9LfYWRPAkUvLnXTKU=
|
||||||
k8s.io/apiserver v0.29.1 h1:e2wwHUfEmMsa8+cuft8MT56+16EONIEK8A/gpBSco+g=
|
k8s.io/apiserver v0.29.2 h1:+Z9S0dSNr+CjnVXQePG8TcBWHr3Q7BmAr7NraHvsMiQ=
|
||||||
k8s.io/apiserver v0.29.1/go.mod h1:V0EpkTRrJymyVT3M49we8uh2RvXf7fWC5XLB0P3SwRw=
|
k8s.io/apiserver v0.29.2/go.mod h1:B0LieKVoyU7ykQvPFm7XSdIHaCHSzCzQWPFa5bqbeMQ=
|
||||||
k8s.io/client-go v0.29.1 h1:19B/+2NGEwnFLzt0uB5kNJnfTsbV8w6TgQRz9l7ti7A=
|
k8s.io/client-go v0.29.2 h1:FEg85el1TeZp+/vYJM7hkDlSTFZ+c5nnK44DJ4FyoRg=
|
||||||
k8s.io/client-go v0.29.1/go.mod h1:TDG/psL9hdet0TI9mGyHJSgRkW3H9JZk2dNEUS7bRks=
|
k8s.io/client-go v0.29.2/go.mod h1:knlvFZE58VpqbQpJNbCbctTVXcd35mMyAAwBdpt4jrA=
|
||||||
k8s.io/component-base v0.29.1 h1:MUimqJPCRnnHsskTTjKD+IC1EHBbRCVyi37IoFBrkYw=
|
k8s.io/component-base v0.29.2 h1:lpiLyuvPA9yV1aQwGLENYyK7n/8t6l3nn3zAtFTJYe8=
|
||||||
k8s.io/component-base v0.29.1/go.mod h1:fP9GFjxYrLERq1GcWWZAE3bqbNcDKDytn2srWuHTtKc=
|
k8s.io/component-base v0.29.2/go.mod h1:BfB3SLrefbZXiBfbM+2H1dlat21Uewg/5qtKOl8degM=
|
||||||
k8s.io/cri-api v0.30.0-alpha.2.0.20240216190946-4e003cc3b0a4 h1:MkxF8QPcofA/nw9k03EQcMkCdP2RcyDZeF1Zda9m/3w=
|
k8s.io/cri-api v0.30.0-alpha.2.0.20240216190946-4e003cc3b0a4 h1:MkxF8QPcofA/nw9k03EQcMkCdP2RcyDZeF1Zda9m/3w=
|
||||||
k8s.io/cri-api v0.30.0-alpha.2.0.20240216190946-4e003cc3b0a4/go.mod h1:9fQTFm+wi4FLyqrkVUoMJiUB3mE74XrVvHz8uFY/sSw=
|
k8s.io/cri-api v0.30.0-alpha.2.0.20240216190946-4e003cc3b0a4/go.mod h1:9fQTFm+wi4FLyqrkVUoMJiUB3mE74XrVvHz8uFY/sSw=
|
||||||
k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0=
|
k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw=
|
||||||
k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo=
|
k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
|
||||||
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/AuzbMm96cd3YHRTU83I780=
|
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/AuzbMm96cd3YHRTU83I780=
|
||||||
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA=
|
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA=
|
||||||
k8s.io/kubelet v0.29.1 h1:cso8Dk8dymkj8q+EvW/aCbIYU2aOkH27gho48tYza/8=
|
k8s.io/kubelet v0.29.2 h1:bQ2StqkUqPCFNLtGLsb3v3O2LKQHXNMju537zOGboRg=
|
||||||
k8s.io/kubelet v0.29.1/go.mod h1:hTl/naFcCVG1Ku17fMgj/krbheBwBkf3gnFhaboMx7E=
|
k8s.io/kubelet v0.29.2/go.mod h1:i5orNPqW/fAMrqptbCXFW/vLBBP12TZZc41IrrvF7SY=
|
||||||
k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI=
|
k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI=
|
||||||
k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
|
k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
|
||||||
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
|
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
|
||||||
|
61
vendor/github.com/go-logr/logr/slogr/slogr.go
generated
vendored
61
vendor/github.com/go-logr/logr/slogr/slogr.go
generated
vendored
@ -1,61 +0,0 @@
|
|||||||
//go:build go1.21
|
|
||||||
// +build go1.21
|
|
||||||
|
|
||||||
/*
|
|
||||||
Copyright 2023 The logr Authors.
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Package slogr enables usage of a slog.Handler with logr.Logger as front-end
|
|
||||||
// API and of a logr.LogSink through the slog.Handler and thus slog.Logger
|
|
||||||
// APIs.
|
|
||||||
//
|
|
||||||
// See the README in the top-level [./logr] package for a discussion of
|
|
||||||
// interoperability.
|
|
||||||
//
|
|
||||||
// Deprecated: use the main logr package instead.
|
|
||||||
package slogr
|
|
||||||
|
|
||||||
import (
|
|
||||||
"log/slog"
|
|
||||||
|
|
||||||
"github.com/go-logr/logr"
|
|
||||||
)
|
|
||||||
|
|
||||||
// NewLogr returns a logr.Logger which writes to the slog.Handler.
|
|
||||||
//
|
|
||||||
// Deprecated: use [logr.FromSlogHandler] instead.
|
|
||||||
func NewLogr(handler slog.Handler) logr.Logger {
|
|
||||||
return logr.FromSlogHandler(handler)
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewSlogHandler returns a slog.Handler which writes to the same sink as the logr.Logger.
|
|
||||||
//
|
|
||||||
// Deprecated: use [logr.ToSlogHandler] instead.
|
|
||||||
func NewSlogHandler(logger logr.Logger) slog.Handler {
|
|
||||||
return logr.ToSlogHandler(logger)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ToSlogHandler returns a slog.Handler which writes to the same sink as the logr.Logger.
|
|
||||||
//
|
|
||||||
// Deprecated: use [logr.ToSlogHandler] instead.
|
|
||||||
func ToSlogHandler(logger logr.Logger) slog.Handler {
|
|
||||||
return logr.ToSlogHandler(logger)
|
|
||||||
}
|
|
||||||
|
|
||||||
// SlogSink is an optional interface that a LogSink can implement to support
|
|
||||||
// logging through the slog.Logger or slog.Handler APIs better.
|
|
||||||
//
|
|
||||||
// Deprecated: use [logr.SlogSink] instead.
|
|
||||||
type SlogSink = logr.SlogSink
|
|
2
vendor/k8s.io/api/core/v1/generated.proto
generated
vendored
2
vendor/k8s.io/api/core/v1/generated.proto
generated
vendored
@ -3286,7 +3286,7 @@ message PersistentVolumeStatus {
|
|||||||
|
|
||||||
// lastPhaseTransitionTime is the time the phase transitioned from one to another
|
// lastPhaseTransitionTime is the time the phase transitioned from one to another
|
||||||
// and automatically resets to current time everytime a volume phase transitions.
|
// and automatically resets to current time everytime a volume phase transitions.
|
||||||
// This is an alpha field and requires enabling PersistentVolumeLastPhaseTransitionTime feature.
|
// This is a beta field and requires the PersistentVolumeLastPhaseTransitionTime feature to be enabled (enabled by default).
|
||||||
// +featureGate=PersistentVolumeLastPhaseTransitionTime
|
// +featureGate=PersistentVolumeLastPhaseTransitionTime
|
||||||
// +optional
|
// +optional
|
||||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastPhaseTransitionTime = 4;
|
optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastPhaseTransitionTime = 4;
|
||||||
|
2
vendor/k8s.io/api/core/v1/types.go
generated
vendored
2
vendor/k8s.io/api/core/v1/types.go
generated
vendored
@ -423,7 +423,7 @@ type PersistentVolumeStatus struct {
|
|||||||
Reason string `json:"reason,omitempty" protobuf:"bytes,3,opt,name=reason"`
|
Reason string `json:"reason,omitempty" protobuf:"bytes,3,opt,name=reason"`
|
||||||
// lastPhaseTransitionTime is the time the phase transitioned from one to another
|
// lastPhaseTransitionTime is the time the phase transitioned from one to another
|
||||||
// and automatically resets to current time everytime a volume phase transitions.
|
// and automatically resets to current time everytime a volume phase transitions.
|
||||||
// This is an alpha field and requires enabling PersistentVolumeLastPhaseTransitionTime feature.
|
// This is a beta field and requires the PersistentVolumeLastPhaseTransitionTime feature to be enabled (enabled by default).
|
||||||
// +featureGate=PersistentVolumeLastPhaseTransitionTime
|
// +featureGate=PersistentVolumeLastPhaseTransitionTime
|
||||||
// +optional
|
// +optional
|
||||||
LastPhaseTransitionTime *metav1.Time `json:"lastPhaseTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastPhaseTransitionTime"`
|
LastPhaseTransitionTime *metav1.Time `json:"lastPhaseTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastPhaseTransitionTime"`
|
||||||
|
2
vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go
generated
vendored
2
vendor/k8s.io/api/core/v1/types_swagger_doc_generated.go
generated
vendored
@ -1478,7 +1478,7 @@ var map_PersistentVolumeStatus = map[string]string{
|
|||||||
"phase": "phase indicates if a volume is available, bound to a claim, or released by a claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#phase",
|
"phase": "phase indicates if a volume is available, bound to a claim, or released by a claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#phase",
|
||||||
"message": "message is a human-readable message indicating details about why the volume is in this state.",
|
"message": "message is a human-readable message indicating details about why the volume is in this state.",
|
||||||
"reason": "reason is a brief CamelCase string that describes any failure and is meant for machine parsing and tidy display in the CLI.",
|
"reason": "reason is a brief CamelCase string that describes any failure and is meant for machine parsing and tidy display in the CLI.",
|
||||||
"lastPhaseTransitionTime": "lastPhaseTransitionTime is the time the phase transitioned from one to another and automatically resets to current time everytime a volume phase transitions. This is an alpha field and requires enabling PersistentVolumeLastPhaseTransitionTime feature.",
|
"lastPhaseTransitionTime": "lastPhaseTransitionTime is the time the phase transitioned from one to another and automatically resets to current time everytime a volume phase transitions. This is a beta field and requires the PersistentVolumeLastPhaseTransitionTime feature to be enabled (enabled by default).",
|
||||||
}
|
}
|
||||||
|
|
||||||
func (PersistentVolumeStatus) SwaggerDoc() map[string]string {
|
func (PersistentVolumeStatus) SwaggerDoc() map[string]string {
|
||||||
|
4
vendor/k8s.io/klog/v2/OWNERS
generated
vendored
4
vendor/k8s.io/klog/v2/OWNERS
generated
vendored
@ -1,14 +1,16 @@
|
|||||||
# See the OWNERS docs at https://go.k8s.io/owners
|
# See the OWNERS docs at https://go.k8s.io/owners
|
||||||
reviewers:
|
reviewers:
|
||||||
- harshanarayana
|
- harshanarayana
|
||||||
|
- mengjiao-liu
|
||||||
- pohly
|
- pohly
|
||||||
approvers:
|
approvers:
|
||||||
- dims
|
- dims
|
||||||
|
- pohly
|
||||||
- thockin
|
- thockin
|
||||||
- serathius
|
|
||||||
emeritus_approvers:
|
emeritus_approvers:
|
||||||
- brancz
|
- brancz
|
||||||
- justinsb
|
- justinsb
|
||||||
- lavalamp
|
- lavalamp
|
||||||
- piosz
|
- piosz
|
||||||
|
- serathius
|
||||||
- tallclair
|
- tallclair
|
||||||
|
31
vendor/k8s.io/klog/v2/contextual_slog.go
generated
vendored
Normal file
31
vendor/k8s.io/klog/v2/contextual_slog.go
generated
vendored
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
//go:build go1.21
|
||||||
|
// +build go1.21
|
||||||
|
|
||||||
|
/*
|
||||||
|
Copyright 2021 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package klog
|
||||||
|
|
||||||
|
import (
|
||||||
|
"log/slog"
|
||||||
|
|
||||||
|
"github.com/go-logr/logr"
|
||||||
|
)
|
||||||
|
|
||||||
|
// SetSlogLogger reconfigures klog to log through the slog logger. The logger must not be nil.
|
||||||
|
func SetSlogLogger(logger *slog.Logger) {
|
||||||
|
SetLoggerWithOptions(logr.FromSlogHandler(logger.Handler()), ContextualLogger(true))
|
||||||
|
}
|
23
vendor/k8s.io/klog/v2/klog.go
generated
vendored
23
vendor/k8s.io/klog/v2/klog.go
generated
vendored
@ -14,9 +14,26 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
// Package klog implements logging analogous to the Google-internal C++ INFO/ERROR/V setup.
|
// Package klog contains the following functionality:
|
||||||
// It provides functions Info, Warning, Error, Fatal, plus formatting variants such as
|
//
|
||||||
// Infof. It also provides V-style logging controlled by the -v and -vmodule=file=2 flags.
|
// - output routing as defined via command line flags ([InitFlags])
|
||||||
|
// - log formatting as text, either with a single, unstructured string ([Info], [Infof], etc.)
|
||||||
|
// or as a structured log entry with message and key/value pairs ([InfoS], etc.)
|
||||||
|
// - management of a go-logr [Logger] ([SetLogger], [Background], [TODO])
|
||||||
|
// - helper functions for logging values ([Format]) and managing the state of klog ([CaptureState], [State.Restore])
|
||||||
|
// - wrappers for [logr] APIs for contextual logging where the wrappers can
|
||||||
|
// be turned into no-ops ([EnableContextualLogging], [NewContext], [FromContext],
|
||||||
|
// [LoggerWithValues], [LoggerWithName]); if the ability to turn off
|
||||||
|
// contextual logging is not needed, then go-logr can also be used directly
|
||||||
|
// - type aliases for go-logr types to simplify imports in code which uses both (e.g. [Logger])
|
||||||
|
// - [k8s.io/klog/v2/textlogger]: a logger which uses the same formatting as klog log with
|
||||||
|
// simpler output routing; beware that it comes with its own command line flags
|
||||||
|
// and does not use the ones from klog
|
||||||
|
// - [k8s.io/klog/v2/ktesting]: per-test output in Go unit tests
|
||||||
|
// - [k8s.io/klog/v2/klogr]: a deprecated, standalone [logr.Logger] on top of the main klog package;
|
||||||
|
// use [Background] instead if klog output routing is needed, [k8s.io/klog/v2/textlogger] if not
|
||||||
|
// - [k8s.io/klog/v2/examples]: demos of this functionality
|
||||||
|
// - [k8s.io/klog/v2/test]: reusable tests for [logr.Logger] implementations
|
||||||
//
|
//
|
||||||
// Basic examples:
|
// Basic examples:
|
||||||
//
|
//
|
||||||
|
10
vendor/k8s.io/klog/v2/klogr_slog.go
generated
vendored
10
vendor/k8s.io/klog/v2/klogr_slog.go
generated
vendored
@ -25,7 +25,7 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/go-logr/logr/slogr"
|
"github.com/go-logr/logr"
|
||||||
|
|
||||||
"k8s.io/klog/v2/internal/buffer"
|
"k8s.io/klog/v2/internal/buffer"
|
||||||
"k8s.io/klog/v2/internal/serialize"
|
"k8s.io/klog/v2/internal/serialize"
|
||||||
@ -35,7 +35,7 @@ import (
|
|||||||
|
|
||||||
func (l *klogger) Handle(ctx context.Context, record slog.Record) error {
|
func (l *klogger) Handle(ctx context.Context, record slog.Record) error {
|
||||||
if logging.logger != nil {
|
if logging.logger != nil {
|
||||||
if slogSink, ok := logging.logger.GetSink().(slogr.SlogSink); ok {
|
if slogSink, ok := logging.logger.GetSink().(logr.SlogSink); ok {
|
||||||
// Let that logger do the work.
|
// Let that logger do the work.
|
||||||
return slogSink.Handle(ctx, record)
|
return slogSink.Handle(ctx, record)
|
||||||
}
|
}
|
||||||
@ -77,13 +77,13 @@ func slogOutput(file string, line int, now time.Time, err error, s severity.Seve
|
|||||||
buffer.PutBuffer(b)
|
buffer.PutBuffer(b)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (l *klogger) WithAttrs(attrs []slog.Attr) slogr.SlogSink {
|
func (l *klogger) WithAttrs(attrs []slog.Attr) logr.SlogSink {
|
||||||
clone := *l
|
clone := *l
|
||||||
clone.values = serialize.WithValues(l.values, sloghandler.Attrs2KVList(l.groups, attrs))
|
clone.values = serialize.WithValues(l.values, sloghandler.Attrs2KVList(l.groups, attrs))
|
||||||
return &clone
|
return &clone
|
||||||
}
|
}
|
||||||
|
|
||||||
func (l *klogger) WithGroup(name string) slogr.SlogSink {
|
func (l *klogger) WithGroup(name string) logr.SlogSink {
|
||||||
clone := *l
|
clone := *l
|
||||||
if clone.groups != "" {
|
if clone.groups != "" {
|
||||||
clone.groups += "." + name
|
clone.groups += "." + name
|
||||||
@ -93,4 +93,4 @@ func (l *klogger) WithGroup(name string) slogr.SlogSink {
|
|||||||
return &clone
|
return &clone
|
||||||
}
|
}
|
||||||
|
|
||||||
var _ slogr.SlogSink = &klogger{}
|
var _ logr.SlogSink = &klogger{}
|
||||||
|
34
vendor/k8s.io/klog/v2/safeptr.go
generated
vendored
Normal file
34
vendor/k8s.io/klog/v2/safeptr.go
generated
vendored
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
//go:build go1.18
|
||||||
|
// +build go1.18
|
||||||
|
|
||||||
|
/*
|
||||||
|
Copyright 2023 The Kubernetes Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package klog
|
||||||
|
|
||||||
|
// SafePtr is a function that takes a pointer of any type (T) as an argument.
|
||||||
|
// If the provided pointer is not nil, it returns the same pointer. If it is nil, it returns nil instead.
|
||||||
|
//
|
||||||
|
// This function is particularly useful to prevent nil pointer dereferencing when:
|
||||||
|
//
|
||||||
|
// - The type implements interfaces that are called by the logger, such as `fmt.Stringer`.
|
||||||
|
// - And these interface implementations do not perform nil checks themselves.
|
||||||
|
func SafePtr[T any](p *T) any {
|
||||||
|
if p == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return p
|
||||||
|
}
|
17
vendor/modules.txt
vendored
17
vendor/modules.txt
vendored
@ -205,7 +205,6 @@ github.com/fsnotify/fsnotify
|
|||||||
## explicit; go 1.18
|
## explicit; go 1.18
|
||||||
github.com/go-logr/logr
|
github.com/go-logr/logr
|
||||||
github.com/go-logr/logr/funcr
|
github.com/go-logr/logr/funcr
|
||||||
github.com/go-logr/logr/slogr
|
|
||||||
# github.com/go-logr/stdr v1.2.2
|
# github.com/go-logr/stdr v1.2.2
|
||||||
## explicit; go 1.16
|
## explicit; go 1.16
|
||||||
github.com/go-logr/stdr
|
github.com/go-logr/stdr
|
||||||
@ -679,10 +678,10 @@ gopkg.in/yaml.v2
|
|||||||
# gopkg.in/yaml.v3 v3.0.1
|
# gopkg.in/yaml.v3 v3.0.1
|
||||||
## explicit
|
## explicit
|
||||||
gopkg.in/yaml.v3
|
gopkg.in/yaml.v3
|
||||||
# k8s.io/api v0.29.1
|
# k8s.io/api v0.29.2
|
||||||
## explicit; go 1.21
|
## explicit; go 1.21
|
||||||
k8s.io/api/core/v1
|
k8s.io/api/core/v1
|
||||||
# k8s.io/apimachinery v0.29.1
|
# k8s.io/apimachinery v0.29.2
|
||||||
## explicit; go 1.21
|
## explicit; go 1.21
|
||||||
k8s.io/apimachinery/pkg/api/errors
|
k8s.io/apimachinery/pkg/api/errors
|
||||||
k8s.io/apimachinery/pkg/api/resource
|
k8s.io/apimachinery/pkg/api/resource
|
||||||
@ -724,10 +723,10 @@ k8s.io/apimachinery/pkg/version
|
|||||||
k8s.io/apimachinery/pkg/watch
|
k8s.io/apimachinery/pkg/watch
|
||||||
k8s.io/apimachinery/third_party/forked/golang/netutil
|
k8s.io/apimachinery/third_party/forked/golang/netutil
|
||||||
k8s.io/apimachinery/third_party/forked/golang/reflect
|
k8s.io/apimachinery/third_party/forked/golang/reflect
|
||||||
# k8s.io/apiserver v0.29.1
|
# k8s.io/apiserver v0.29.2
|
||||||
## explicit; go 1.21
|
## explicit; go 1.21
|
||||||
k8s.io/apiserver/pkg/endpoints/responsewriter
|
k8s.io/apiserver/pkg/endpoints/responsewriter
|
||||||
# k8s.io/client-go v0.29.1
|
# k8s.io/client-go v0.29.2
|
||||||
## explicit; go 1.21
|
## explicit; go 1.21
|
||||||
k8s.io/client-go/pkg/apis/clientauthentication
|
k8s.io/client-go/pkg/apis/clientauthentication
|
||||||
k8s.io/client-go/pkg/apis/clientauthentication/install
|
k8s.io/client-go/pkg/apis/clientauthentication/install
|
||||||
@ -749,15 +748,15 @@ k8s.io/client-go/util/exec
|
|||||||
k8s.io/client-go/util/flowcontrol
|
k8s.io/client-go/util/flowcontrol
|
||||||
k8s.io/client-go/util/keyutil
|
k8s.io/client-go/util/keyutil
|
||||||
k8s.io/client-go/util/workqueue
|
k8s.io/client-go/util/workqueue
|
||||||
# k8s.io/component-base v0.29.1
|
# k8s.io/component-base v0.29.2
|
||||||
## explicit; go 1.21
|
## explicit; go 1.21
|
||||||
k8s.io/component-base/logs/logreduction
|
k8s.io/component-base/logs/logreduction
|
||||||
# k8s.io/cri-api v0.30.0-alpha.2.0.20240216190946-4e003cc3b0a4
|
# k8s.io/cri-api v0.30.0-alpha.2.0.20240216190946-4e003cc3b0a4
|
||||||
## explicit; go 1.21
|
## explicit; go 1.21
|
||||||
k8s.io/cri-api/pkg/apis/runtime/v1
|
k8s.io/cri-api/pkg/apis/runtime/v1
|
||||||
k8s.io/cri-api/pkg/errors
|
k8s.io/cri-api/pkg/errors
|
||||||
# k8s.io/klog/v2 v2.110.1
|
# k8s.io/klog/v2 v2.120.1
|
||||||
## explicit; go 1.13
|
## explicit; go 1.18
|
||||||
k8s.io/klog/v2
|
k8s.io/klog/v2
|
||||||
k8s.io/klog/v2/internal/buffer
|
k8s.io/klog/v2/internal/buffer
|
||||||
k8s.io/klog/v2/internal/clock
|
k8s.io/klog/v2/internal/clock
|
||||||
@ -765,7 +764,7 @@ k8s.io/klog/v2/internal/dbg
|
|||||||
k8s.io/klog/v2/internal/serialize
|
k8s.io/klog/v2/internal/serialize
|
||||||
k8s.io/klog/v2/internal/severity
|
k8s.io/klog/v2/internal/severity
|
||||||
k8s.io/klog/v2/internal/sloghandler
|
k8s.io/klog/v2/internal/sloghandler
|
||||||
# k8s.io/kubelet v0.29.1
|
# k8s.io/kubelet v0.29.2
|
||||||
## explicit; go 1.21
|
## explicit; go 1.21
|
||||||
k8s.io/kubelet/pkg/cri/streaming
|
k8s.io/kubelet/pkg/cri/streaming
|
||||||
k8s.io/kubelet/pkg/cri/streaming/portforward
|
k8s.io/kubelet/pkg/cri/streaming/portforward
|
||||||
|
Loading…
Reference in New Issue
Block a user