mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 18:43:34 +00:00
rebase: update kubernetes to 1.26.1
update kubernetes and its dependencies to v1.26.1 Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
committed by
mergify[bot]
parent
e9e33fb851
commit
9c8de9471e
2
vendor/k8s.io/component-base/logs/api/v1/kube_features.go
generated
vendored
2
vendor/k8s.io/component-base/logs/api/v1/kube_features.go
generated
vendored
@ -22,7 +22,7 @@ import (
|
||||
|
||||
const (
|
||||
// owner: @pohly
|
||||
// kep: http://kep.k8s.io/3077
|
||||
// kep: https://kep.k8s.io/3077
|
||||
// alpha: v1.24
|
||||
//
|
||||
// Enables looking up a logger from a context.Context instead of using
|
||||
|
23
vendor/k8s.io/component-base/logs/api/v1/options.go
generated
vendored
23
vendor/k8s.io/component-base/logs/api/v1/options.go
generated
vendored
@ -20,7 +20,6 @@ import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"math"
|
||||
"sort"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
@ -32,6 +31,7 @@ import (
|
||||
"k8s.io/apimachinery/pkg/util/validation/field"
|
||||
cliflag "k8s.io/component-base/cli/flag"
|
||||
"k8s.io/component-base/featuregate"
|
||||
"k8s.io/component-base/logs/klogflags"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -183,12 +183,8 @@ func apply(c *LoggingConfiguration, featureGate featuregate.FeatureGate) error {
|
||||
|
||||
// AddFlags adds command line flags for the configuration.
|
||||
func AddFlags(c *LoggingConfiguration, fs *pflag.FlagSet) {
|
||||
// The help text is generated assuming that flags will eventually use
|
||||
// hyphens, even if currently no normalization function is set for the
|
||||
// flag set yet.
|
||||
unsupportedFlags := strings.Join(unsupportedLoggingFlagNames(cliflag.WordSepNormalizeFunc), ", ")
|
||||
formats := logRegistry.list()
|
||||
fs.StringVar(&c.Format, "logging-format", c.Format, fmt.Sprintf("Sets the log format. Permitted formats: %s.\nNon-default formats don't honor these flags: %s.\nNon-default choices are currently alpha and subject to change without warning.", formats, unsupportedFlags))
|
||||
fs.StringVar(&c.Format, "logging-format", c.Format, fmt.Sprintf("Sets the log format. Permitted formats: %s.", formats))
|
||||
// No new log formats should be added after generation is of flag options
|
||||
logRegistry.freeze()
|
||||
|
||||
@ -236,14 +232,13 @@ var loggingFlags pflag.FlagSet
|
||||
|
||||
func init() {
|
||||
var fs flag.FlagSet
|
||||
klog.InitFlags(&fs)
|
||||
klogflags.Init(&fs)
|
||||
loggingFlags.AddGoFlagSet(&fs)
|
||||
}
|
||||
|
||||
// List of logs (k8s.io/klog + k8s.io/component-base/logs) flags supported by all logging formats
|
||||
var supportedLogsFlags = map[string]struct{}{
|
||||
"v": {},
|
||||
// TODO: support vmodule after 1.19 Alpha
|
||||
}
|
||||
|
||||
// unsupportedLoggingFlags lists unsupported logging flags. The normalize
|
||||
@ -268,15 +263,3 @@ func unsupportedLoggingFlags(normalizeFunc func(f *pflag.FlagSet, name string) p
|
||||
})
|
||||
return allFlags
|
||||
}
|
||||
|
||||
// unsupportedLoggingFlagNames lists unsupported logging flags by name, with
|
||||
// optional normalization and sorted.
|
||||
func unsupportedLoggingFlagNames(normalizeFunc func(f *pflag.FlagSet, name string) pflag.NormalizedName) []string {
|
||||
unsupportedFlags := unsupportedLoggingFlags(normalizeFunc)
|
||||
names := make([]string, 0, len(unsupportedFlags))
|
||||
for _, f := range unsupportedFlags {
|
||||
names = append(names, "--"+f.Name)
|
||||
}
|
||||
sort.Strings(names)
|
||||
return names
|
||||
}
|
||||
|
Reference in New Issue
Block a user