mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-28 10:28:36 +00:00
chore(globalcontext): drop globalcontext flag (#9652)
Signed-off-by: Khaled Emara <mail@KhaledEmara.dev> Co-authored-by: shuting <shuting@nirmata.com>
This commit is contained in:
parent
c649169a78
commit
589446da5d
10 changed files with 0 additions and 32 deletions
|
@ -334,7 +334,6 @@ The chart values are organised per component.
|
|||
| features.dumpPayload.enabled | bool | `false` | Enables the feature |
|
||||
| features.forceFailurePolicyIgnore.enabled | bool | `false` | Enables the feature |
|
||||
| features.generateValidatingAdmissionPolicy.enabled | bool | `false` | Enables the feature |
|
||||
| features.globalContext.enabled | bool | `true` | Enables the feature |
|
||||
| features.globalContext.maxApiCallResponseLength | int | `2000000` | Maximum allowed response size from API Calls. A value of 0 bypasses checks (not recommended) |
|
||||
| features.logging.format | string | `"text"` | Logging format |
|
||||
| features.logging.verbosity | int | `2` | Logging verbosity |
|
||||
|
|
|
@ -47,7 +47,6 @@
|
|||
{{- $flags = append $flags (print "--generateValidatingAdmissionPolicy=" .enabled) -}}
|
||||
{{- end -}}
|
||||
{{- with .globalContext -}}
|
||||
{{- $flags = append $flags (print "--enableGlobalContext=" .enabled) -}}
|
||||
{{- $flags = append $flags (print "--maxAPICallResponseLength=" (int .maxApiCallResponseLength)) -}}
|
||||
{{- end -}}
|
||||
{{- with .logging -}}
|
||||
|
|
|
@ -630,8 +630,6 @@ features:
|
|||
# -- Enables the feature
|
||||
enabled: false
|
||||
globalContext:
|
||||
# -- Enables the feature
|
||||
enabled: true
|
||||
# -- Maximum allowed response size from API Calls. A value of 0 bypasses checks (not recommended)
|
||||
maxApiCallResponseLength: 2000000
|
||||
logging:
|
||||
|
|
|
@ -117,7 +117,6 @@ func main() {
|
|||
internal.WithKyvernoDynamicClient(),
|
||||
internal.WithEventsClient(),
|
||||
internal.WithApiServerClient(),
|
||||
internal.WithGlobalContext(),
|
||||
internal.WithFlagSets(flagset),
|
||||
)
|
||||
// parse flags
|
||||
|
|
|
@ -105,7 +105,6 @@ func main() {
|
|||
internal.WithDeferredLoading(),
|
||||
internal.WithMetadataClient(),
|
||||
internal.WithApiServerClient(),
|
||||
internal.WithGlobalContext(),
|
||||
internal.WithFlagSets(flagset),
|
||||
)
|
||||
// parse flags
|
||||
|
|
|
@ -22,7 +22,6 @@ type Configuration interface {
|
|||
UsesMetadataClient() bool
|
||||
UsesKyvernoDynamicClient() bool
|
||||
UsesEventsClient() bool
|
||||
UsesGlobalContext() bool
|
||||
FlagSets() []*flag.FlagSet
|
||||
}
|
||||
|
||||
|
@ -140,12 +139,6 @@ func WithEventsClient() ConfigurationOption {
|
|||
}
|
||||
}
|
||||
|
||||
func WithGlobalContext() ConfigurationOption {
|
||||
return func(c *configuration) {
|
||||
c.usesGlobalContext = true
|
||||
}
|
||||
}
|
||||
|
||||
func WithFlagSets(flagsets ...*flag.FlagSet) ConfigurationOption {
|
||||
return func(c *configuration) {
|
||||
c.flagSets = append(c.flagSets, flagsets...)
|
||||
|
@ -170,7 +163,6 @@ type configuration struct {
|
|||
usesMetadataClient bool
|
||||
usesKyvernoDynamicClient bool
|
||||
usesEventsClient bool
|
||||
usesGlobalContext bool
|
||||
flagSets []*flag.FlagSet
|
||||
}
|
||||
|
||||
|
@ -242,10 +234,6 @@ func (c *configuration) UsesEventsClient() bool {
|
|||
return c.usesEventsClient
|
||||
}
|
||||
|
||||
func (c *configuration) UsesGlobalContext() bool {
|
||||
return c.usesGlobalContext
|
||||
}
|
||||
|
||||
func (c *configuration) FlagSets() []*flag.FlagSet {
|
||||
return c.flagSets
|
||||
}
|
||||
|
|
|
@ -137,10 +137,6 @@ func initCleanupFlags() {
|
|||
flag.StringVar(&cleanupServerPort, "cleanupServerPort", "9443", "kyverno cleanup server port, defaults to '9443'.")
|
||||
}
|
||||
|
||||
func initGlobalContextFlags() {
|
||||
flag.BoolVar(&enableGlobalContext, "enableGlobalContext", true, "Enable global context feature.")
|
||||
}
|
||||
|
||||
type options struct {
|
||||
clientRateLimitQPS float64
|
||||
clientRateLimitBurst int
|
||||
|
@ -224,10 +220,6 @@ func initFlags(config Configuration, opts ...Option) {
|
|||
if config.UsesLeaderElection() {
|
||||
initLeaderElectionFlags()
|
||||
}
|
||||
// leader election
|
||||
if config.UsesGlobalContext() {
|
||||
initGlobalContextFlags()
|
||||
}
|
||||
initCleanupFlags()
|
||||
for _, flagset := range config.FlagSets() {
|
||||
flagset.VisitAll(func(f *flag.Flag) {
|
||||
|
|
|
@ -292,7 +292,6 @@ func main() {
|
|||
internal.WithKyvernoDynamicClient(),
|
||||
internal.WithEventsClient(),
|
||||
internal.WithApiServerClient(),
|
||||
internal.WithGlobalContext(),
|
||||
internal.WithFlagSets(flagset),
|
||||
)
|
||||
// parse flags
|
||||
|
|
|
@ -244,7 +244,6 @@ func main() {
|
|||
internal.WithKyvernoDynamicClient(),
|
||||
internal.WithEventsClient(),
|
||||
internal.WithApiServerClient(),
|
||||
internal.WithGlobalContext(),
|
||||
internal.WithFlagSets(flagset),
|
||||
)
|
||||
// parse flags
|
||||
|
|
|
@ -52541,7 +52541,6 @@ spec:
|
|||
- --dumpPayload=false
|
||||
- --forceFailurePolicyIgnore=false
|
||||
- --generateValidatingAdmissionPolicy=false
|
||||
- --enableGlobalContext=true
|
||||
- --maxAPICallResponseLength=2000000
|
||||
- --loggingFormat=text
|
||||
- --v=2
|
||||
|
@ -52694,7 +52693,6 @@ spec:
|
|||
- --metricsPort=8000
|
||||
- --enableConfigMapCaching=true
|
||||
- --enableDeferredLoading=true
|
||||
- --enableGlobalContext=true
|
||||
- --maxAPICallResponseLength=2000000
|
||||
- --loggingFormat=text
|
||||
- --v=2
|
||||
|
@ -52803,7 +52801,6 @@ spec:
|
|||
- --metricsPort=8000
|
||||
- --enableDeferredLoading=true
|
||||
- --dumpPayload=false
|
||||
- --enableGlobalContext=true
|
||||
- --maxAPICallResponseLength=2000000
|
||||
- --loggingFormat=text
|
||||
- --v=2
|
||||
|
@ -52945,7 +52942,6 @@ spec:
|
|||
- --skipResourceFilters=true
|
||||
- --enableConfigMapCaching=true
|
||||
- --enableDeferredLoading=true
|
||||
- --enableGlobalContext=true
|
||||
- --maxAPICallResponseLength=2000000
|
||||
- --loggingFormat=text
|
||||
- --v=2
|
||||
|
|
Loading…
Add table
Reference in a new issue