Merge pull request #111254 from dims/update-to-golang-1.19-rc2
[golang] Update to 1.19rc2 (from 1.18.3) Kubernetes-commit: 3ffdfbe286ebcea5d75617da6accaf67f815e0cf
This commit is contained in:
commit
f53b829906
16
go.mod
16
go.mod
|
|
@ -38,10 +38,10 @@ require (
|
|||
google.golang.org/grpc v1.47.0
|
||||
gopkg.in/natefinch/lumberjack.v2 v2.0.0
|
||||
gopkg.in/square/go-jose.v2 v2.2.2
|
||||
k8s.io/api v0.0.0-20220725160253-f6f0d0e54216
|
||||
k8s.io/apimachinery v0.0.0-20220726200055-965218438260
|
||||
k8s.io/client-go v0.0.0-20220726200551-b5c7588f8a17
|
||||
k8s.io/component-base v0.0.0-20220726160733-a30295a8559b
|
||||
k8s.io/api v0.0.0-20220727000259-04aced3612cf
|
||||
k8s.io/apimachinery v0.0.0-20220727000102-7fb03423f864
|
||||
k8s.io/client-go v0.0.0-20220727000546-cc879cd5b66e
|
||||
k8s.io/component-base v0.0.0-20220727001241-c9db45da9b0d
|
||||
k8s.io/klog/v2 v2.70.1
|
||||
k8s.io/kube-openapi v0.0.0-20220627174259-011e075b9cb8
|
||||
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9
|
||||
|
|
@ -119,8 +119,8 @@ require (
|
|||
)
|
||||
|
||||
replace (
|
||||
k8s.io/api => k8s.io/api v0.0.0-20220725160253-f6f0d0e54216
|
||||
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20220726200055-965218438260
|
||||
k8s.io/client-go => k8s.io/client-go v0.0.0-20220726200551-b5c7588f8a17
|
||||
k8s.io/component-base => k8s.io/component-base v0.0.0-20220726160733-a30295a8559b
|
||||
k8s.io/api => k8s.io/api v0.0.0-20220727000259-04aced3612cf
|
||||
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20220727000102-7fb03423f864
|
||||
k8s.io/client-go => k8s.io/client-go v0.0.0-20220727000546-cc879cd5b66e
|
||||
k8s.io/component-base => k8s.io/component-base v0.0.0-20220727001241-c9db45da9b0d
|
||||
)
|
||||
|
|
|
|||
16
go.sum
16
go.sum
|
|
@ -957,14 +957,14 @@ 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-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=
|
||||
k8s.io/api v0.0.0-20220725160253-f6f0d0e54216 h1:lK3Ih8q6XH8zLGPKkAx0CDs3WYWiQuK3NxL/W7LtqSw=
|
||||
k8s.io/api v0.0.0-20220725160253-f6f0d0e54216/go.mod h1:esLTNaRjCQz5pCDYxvulIzMUPDaw9bOuAQ9d6ndNdvs=
|
||||
k8s.io/apimachinery v0.0.0-20220726200055-965218438260 h1:Yec9pKZ5AYLiwe5G9piTsqNR7/V57T/9dL/ISMGZRQM=
|
||||
k8s.io/apimachinery v0.0.0-20220726200055-965218438260/go.mod h1:E6C2QnwpsJTXktTwPqd4nAJ/xmsdi1AHqDD0iPB61j0=
|
||||
k8s.io/client-go v0.0.0-20220726200551-b5c7588f8a17 h1:MYlOGcV0K+H+o5Yiq/hRUt1N/4dGMufXcyBFd/SKrlY=
|
||||
k8s.io/client-go v0.0.0-20220726200551-b5c7588f8a17/go.mod h1:6znMa9u+KyzSQQnh6UEpILB1x+o3W2AH7mDwMFYQ5So=
|
||||
k8s.io/component-base v0.0.0-20220726160733-a30295a8559b h1:+Sr/CAv5xYeHBxwjOo7co4ytWysYS4PfY6FZUVzIkfs=
|
||||
k8s.io/component-base v0.0.0-20220726160733-a30295a8559b/go.mod h1:2ZwXfZeHFUAwysA0hGv1l0RMXhoy17B56bqQIP+o1SU=
|
||||
k8s.io/api v0.0.0-20220727000259-04aced3612cf h1:kkCK4zgoE0+1Fsp4XsTu4rqZNhWOxvoiHBocRmvb+Qg=
|
||||
k8s.io/api v0.0.0-20220727000259-04aced3612cf/go.mod h1:FsQVUKy1P+2xAVDq48sxpYxRCSComqggD4SjWqnqoM4=
|
||||
k8s.io/apimachinery v0.0.0-20220727000102-7fb03423f864 h1:4PKVBjm5Lzfp9XRjEzRJHLhh0FGAUntjaxAkWBdSOyc=
|
||||
k8s.io/apimachinery v0.0.0-20220727000102-7fb03423f864/go.mod h1:E6C2QnwpsJTXktTwPqd4nAJ/xmsdi1AHqDD0iPB61j0=
|
||||
k8s.io/client-go v0.0.0-20220727000546-cc879cd5b66e h1:Q2QjBuNVEgKIeyh9JO8X8JXzz4udSErwftdZ+IgO4lI=
|
||||
k8s.io/client-go v0.0.0-20220727000546-cc879cd5b66e/go.mod h1:vrs8X7WddujTXgdqbHhB3/I4TqDSw6mbHd2JaiV+Jyw=
|
||||
k8s.io/component-base v0.0.0-20220727001241-c9db45da9b0d h1:dHV7+lFA6F4YJWImzUGXBewnQKxc+/BakC1dBI59WLk=
|
||||
k8s.io/component-base v0.0.0-20220727001241-c9db45da9b0d/go.mod h1:jZYQhhSRyD1R0iBcEq+yckE4pefrgSWAN9nQi3NdtdU=
|
||||
k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE=
|
||||
k8s.io/klog/v2 v2.70.1 h1:7aaoSdahviPmR+XkS7FyxlkkXs6tHISSG03RxleQAVQ=
|
||||
k8s.io/klog/v2 v2.70.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ type WantsDrainedNotification interface {
|
|||
// WantsFeatureGate defines a function which passes the featureGates for inspection by an admission plugin.
|
||||
// Admission plugins should not hold a reference to the featureGates. Instead, they should query a particular one
|
||||
// and assign it to a simple bool in the admission plugin struct.
|
||||
//
|
||||
// func (a *admissionPlugin) InspectFeatureGates(features featuregate.FeatureGate){
|
||||
// a.myFeatureIsOn = features.Enabled("my-feature")
|
||||
// }
|
||||
|
|
|
|||
|
|
@ -18,12 +18,14 @@ limitations under the License.
|
|||
// source: k8s.io/kubernetes/vendor/k8s.io/apiserver/pkg/apis/example2/v1/generated.proto
|
||||
|
||||
/*
|
||||
Package v1 is a generated protocol buffer package.
|
||||
Package v1 is a generated protocol buffer package.
|
||||
|
||||
It is generated from these files:
|
||||
|
||||
It is generated from these files:
|
||||
k8s.io/kubernetes/vendor/k8s.io/apiserver/pkg/apis/example2/v1/generated.proto
|
||||
|
||||
It has these top-level messages:
|
||||
It has these top-level messages:
|
||||
|
||||
ReplicaSet
|
||||
ReplicaSetSpec
|
||||
ReplicaSetStatus
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ var leadingDigits = regexp.MustCompile(`^(\d+)`)
|
|||
|
||||
// MajorMinor parses a numeric major/minor version from the provided version info.
|
||||
// The minor version drops all characters after the first non-digit character:
|
||||
//
|
||||
// version.Info{Major:"1", Minor:"2+"} -> 1,2
|
||||
// version.Info{Major:"1", Minor:"2.3-build4"} -> 1,2
|
||||
func MajorMinor(v version.Info) (int, int, error) {
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ func TestNamespaceContext(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
//TestUserContext validates that a userinfo can be get/set on a context object
|
||||
// TestUserContext validates that a userinfo can be get/set on a context object
|
||||
func TestUserContext(t *testing.T) {
|
||||
ctx := NewContext()
|
||||
_, ok := UserFrom(ctx)
|
||||
|
|
|
|||
|
|
@ -424,7 +424,9 @@ func (s *GenericAPIServer) PrepareRun() preparedGenericAPIServer {
|
|||
// | |
|
||||
// ShutdownInitiated (shutdownInitiatedCh) |
|
||||
// | |
|
||||
//
|
||||
// (ShutdownDelayDuration) (PreShutdownHooks)
|
||||
//
|
||||
// | |
|
||||
// AfterShutdownDelayDuration (delayedStopCh) PreShutdownHooksStopped (preShutdownHooksHasStoppedCh)
|
||||
// | |
|
||||
|
|
@ -437,7 +439,9 @@ func (s *GenericAPIServer) PrepareRun() preparedGenericAPIServer {
|
|||
// |---------------------------------------------------------|
|
||||
// | | | |
|
||||
// [without [with | |
|
||||
//
|
||||
// ShutdownSendRetryAfter] ShutdownSendRetryAfter] | |
|
||||
//
|
||||
// | | | |
|
||||
// | ---------------| |
|
||||
// | | |
|
||||
|
|
@ -452,7 +456,6 @@ func (s *GenericAPIServer) PrepareRun() preparedGenericAPIServer {
|
|||
// listenerStoppedCh
|
||||
// |
|
||||
// HTTPServerStoppedListening (httpServerStoppedListeningCh)
|
||||
//
|
||||
func (s preparedGenericAPIServer) Run(stopCh <-chan struct{}) error {
|
||||
delayedStopCh := s.lifecycleSignals.AfterShutdownDelayDuration
|
||||
shutdownInitiatedCh := s.lifecycleSignals.ShutdownInitiated
|
||||
|
|
|
|||
|
|
@ -170,7 +170,6 @@ func newSignalInterceptingTestStep() *signalInterceptingTestStep {
|
|||
// <-stoppedCh
|
||||
// |
|
||||
// return nil
|
||||
//
|
||||
func TestGracefulTerminationWithKeepListeningDuringGracefulTerminationDisabled(t *testing.T) {
|
||||
fakeAudit := &fakeAudit{}
|
||||
s := newGenericAPIServer(t, fakeAudit, false)
|
||||
|
|
@ -335,9 +334,12 @@ func TestGracefulTerminationWithKeepListeningDuringGracefulTerminationDisabled(t
|
|||
|
||||
// This test exercises the graceful termination scenario
|
||||
// described in the following diagram
|
||||
//
|
||||
// - every vertical line is an independent timeline
|
||||
//
|
||||
// - the leftmost vertical line represents the go routine that
|
||||
// is executing GenericAPIServer.Run method
|
||||
//
|
||||
// - (signal) indicates that the given lifecycle signal has been fired
|
||||
//
|
||||
// stopCh
|
||||
|
|
@ -376,7 +378,6 @@ func TestGracefulTerminationWithKeepListeningDuringGracefulTerminationDisabled(t
|
|||
// <-stoppedCh
|
||||
// |
|
||||
// return nil
|
||||
//
|
||||
func TestGracefulTerminationWithKeepListeningDuringGracefulTerminationEnabled(t *testing.T) {
|
||||
fakeAudit := &fakeAudit{}
|
||||
s := newGenericAPIServer(t, fakeAudit, true)
|
||||
|
|
|
|||
|
|
@ -154,7 +154,7 @@ func (d director) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
|||
d.nonGoRestfulMux.ServeHTTP(w, req)
|
||||
}
|
||||
|
||||
//TODO: Unify with RecoverPanics?
|
||||
// TODO: Unify with RecoverPanics?
|
||||
func logStackOnRecover(s runtime.NegotiatedSerializer, panicReason interface{}, w http.ResponseWriter) {
|
||||
var buffer bytes.Buffer
|
||||
buffer.WriteString(fmt.Sprintf("recover from panic situation: - %v\r\n", panicReason))
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ limitations under the License.
|
|||
|
||||
// Package healthz implements basic http server health checking.
|
||||
// Usage:
|
||||
//
|
||||
// import "k8s.io/apiserver/pkg/server/healthz"
|
||||
// healthz.InstallHandler(mux)
|
||||
package healthz // import "k8s.io/apiserver/pkg/server/healthz"
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ import (
|
|||
// 2. conflicts between the different processes all trying to perform the same action
|
||||
// 3. partially complete work (API server crashes while running your hook)
|
||||
// 4. API server access **BEFORE** your hook has completed
|
||||
//
|
||||
// Think of it like a mini-controller that is super privileged and gets to run in-process
|
||||
// If you use this feature, tag @deads2k on github who has promised to review code for anyone's PostStartHook
|
||||
// until it becomes easier to use.
|
||||
|
|
|
|||
|
|
@ -70,6 +70,7 @@ type AdmissionOptions struct {
|
|||
|
||||
// NewAdmissionOptions creates a new instance of AdmissionOptions
|
||||
// Note:
|
||||
//
|
||||
// In addition it calls RegisterAllAdmissionPlugins to register
|
||||
// all generic admission plugins.
|
||||
//
|
||||
|
|
@ -115,6 +116,7 @@ func (a *AdmissionOptions) AddFlags(fs *pflag.FlagSet) {
|
|||
// In case admission plugin names were not provided by a cluster-admin they will be prepared from the recommended/default values.
|
||||
// In addition the method lazily initializes a generic plugin that is appended to the list of pluginInitializers
|
||||
// note this method uses:
|
||||
//
|
||||
// genericconfig.Authorizer
|
||||
func (a *AdmissionOptions) ApplyTo(
|
||||
c *server.Config,
|
||||
|
|
@ -220,7 +222,7 @@ func (a *AdmissionOptions) enabledPluginNames() []string {
|
|||
return orderedPlugins
|
||||
}
|
||||
|
||||
//Return names of plugins which are enabled by default
|
||||
// Return names of plugins which are enabled by default
|
||||
func (a *AdmissionOptions) defaultEnabledPluginNames() []string {
|
||||
defaultOnPluginNames := []string{}
|
||||
for _, pluginName := range a.RecommendedPluginOrder {
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ import (
|
|||
// DelegatingAuthorizationOptions provides an easy way for composing API servers to delegate their authorization to
|
||||
// the root kube API server.
|
||||
// WARNING: never assume that every authenticated incoming request already does authorization.
|
||||
//
|
||||
// The aggregator in the kube API server does this today, but this behaviour is not
|
||||
// guaranteed in the future.
|
||||
type DelegatingAuthorizationOptions struct {
|
||||
|
|
|
|||
|
|
@ -585,6 +585,7 @@ func (c *Cacher) Get(ctx context.Context, key string, opts storage.GetOptions, o
|
|||
}
|
||||
|
||||
// NOTICE: Keep in sync with shouldListFromStorage function in
|
||||
//
|
||||
// staging/src/k8s.io/apiserver/pkg/util/flowcontrol/request/list_work_estimator.go
|
||||
func shouldDelegateList(opts storage.ListOptions) bool {
|
||||
resourceVersion := opts.ResourceVersion
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ const (
|
|||
|
||||
// timeBudget implements a budget of time that you can use and is
|
||||
// periodically being refreshed. The pattern to use it is:
|
||||
//
|
||||
// budget := newTimeBudget(...)
|
||||
// ...
|
||||
// timeout := budget.takeAvailable()
|
||||
|
|
|
|||
|
|
@ -53,7 +53,9 @@ import (
|
|||
// an interval as invalid iff we need to copy events from the
|
||||
// watchCache and we end up needing events that have already
|
||||
// been popped off. This translates to the following condition:
|
||||
//
|
||||
// watchCacheInterval::startIndex >= watchCache::startIndex.
|
||||
//
|
||||
// When this condition becomes false, the interval is no longer
|
||||
// valid and should not be used to retrieve and serve elements
|
||||
// from the underlying source.
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ func NewETCDLatencyTracker(delegate clientv3.KV) clientv3.KV {
|
|||
// tracking function TrackStorageLatency is thread safe.
|
||||
//
|
||||
// NOTE: Compact is an asynchronous process and is not associated with
|
||||
//
|
||||
// any request, so we will not be tracking its latency.
|
||||
type clientV3KVLatencyTracker struct {
|
||||
clientv3.KV
|
||||
|
|
|
|||
|
|
@ -20,11 +20,16 @@ package testingcert
|
|||
// https://github.com/coreos/etcd/tree/master/hack/tls-setup for more details.
|
||||
//
|
||||
// ca-config.json:
|
||||
//
|
||||
// expiry was changed from 1 year to 100 years (876000h)
|
||||
//
|
||||
// ca-csr.json:
|
||||
//
|
||||
// ca expiry was set to 100 years (876000h) ("ca":{"expiry":"876000h"})
|
||||
// key was changed from ecdsa,384 to rsa,2048
|
||||
//
|
||||
// req-csr.json:
|
||||
//
|
||||
// key was changed from ecdsa,384 to rsa,2048
|
||||
// hosts were changed to "localhost","127.0.0.1"
|
||||
const CAFileContent = `
|
||||
|
|
|
|||
|
|
@ -49,11 +49,11 @@ func getAvailablePorts(count int) ([]int, error) {
|
|||
|
||||
// NewTestConfig returns a configuration for an embedded etcd server.
|
||||
// The configuration is based on embed.NewConfig(), with the following adjustments:
|
||||
// * sets UnsafeNoFsync = true to improve test performance (only reasonable in a test-only
|
||||
// - sets UnsafeNoFsync = true to improve test performance (only reasonable in a test-only
|
||||
// single-member server we never intend to restart or keep data from)
|
||||
// * uses free ports for client and peer listeners
|
||||
// * cleans up the data directory on test termination
|
||||
// * silences server logs other than errors
|
||||
// - uses free ports for client and peer listeners
|
||||
// - cleans up the data directory on test termination
|
||||
// - silences server logs other than errors
|
||||
func NewTestConfig(t *testing.T) *embed.Config {
|
||||
cfg := embed.NewConfig()
|
||||
|
||||
|
|
|
|||
|
|
@ -95,6 +95,7 @@ func findStatusCondition(conditions []v1alpha1.StorageVersionCondition,
|
|||
// newCondition, LastTransitionTime is set to now if the new status differs from the old status
|
||||
// 2. if a condition of the specified type does not exist: LastTransitionTime is set to now() if unset,
|
||||
// and newCondition is appended
|
||||
//
|
||||
// NOTE: forceTransition allows overwriting LastTransitionTime even when the status doesn't change.
|
||||
func setStatusCondition(conditions *[]v1alpha1.StorageVersionCondition, newCondition v1alpha1.StorageVersionCondition,
|
||||
forceTransition bool) {
|
||||
|
|
|
|||
|
|
@ -116,5 +116,4 @@ limitations under the License.
|
|||
// queue’s virtual start time is advanced by G. When a request
|
||||
// finishes being served, and the actual service time was S, the
|
||||
// queue’s virtual start time is decremented by G - S.
|
||||
//
|
||||
package queueset
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ type waitGroupCounter struct {
|
|||
}
|
||||
|
||||
// compile time assertion that waitGroupCounter meets requirements
|
||||
//
|
||||
// of GoRoutineCounter
|
||||
var _ counter.GoRoutineCounter = (*waitGroupCounter)(nil)
|
||||
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ func Test_configController_generatePatchBytes(t *testing.T) {
|
|||
Type: flowcontrol.FlowSchemaConditionDangling,
|
||||
Status: flowcontrol.ConditionTrue,
|
||||
Reason: "test reason",
|
||||
Message: `test none`,
|
||||
Message: "test \u0009\u0009none",
|
||||
LastTransitionTime: metav1.NewTime(now),
|
||||
},
|
||||
want: []byte(fmt.Sprintf(`{"status":{"conditions":[{"type":"Dangling","status":"True","lastTransitionTime":"%s","reason":"test reason","message":"test \t\tnone"}]}}`, now.Format(time.RFC3339))),
|
||||
|
|
|
|||
|
|
@ -134,6 +134,7 @@ func key(requestInfo *apirequest.RequestInfo) string {
|
|||
}
|
||||
|
||||
// NOTICE: Keep in sync with shouldDelegateList function in
|
||||
//
|
||||
// staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher.go
|
||||
func shouldListFromStorage(query url.Values, opts *metav1.ListOptions) bool {
|
||||
resourceVersion := opts.ResourceVersion
|
||||
|
|
|
|||
|
|
@ -195,6 +195,7 @@ func (w *watchTracker) forgetWatch(identifier *watchIdentifier, index *indexValu
|
|||
// GetInterestedWatchCount implements WatchTracker interface.
|
||||
//
|
||||
// TODO(wojtek-t): As of now, requestInfo for object creation (POST) doesn't
|
||||
//
|
||||
// contain the Name field set. Figure out if we can somehow get it for the
|
||||
// more accurate cost estimation.
|
||||
//
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ func NewDefaultServiceResolver() ServiceResolver {
|
|||
// note that the name, namespace, and port are required and by default all
|
||||
// created addresses use HTTPS scheme.
|
||||
// for example:
|
||||
//
|
||||
// name=ross namespace=andromeda resolves to https://ross.andromeda.svc:443
|
||||
func (sr defaultServiceResolver) ResolveEndpoint(namespace, name string, port int32) (*url.URL, error) {
|
||||
if len(name) == 0 || len(namespace) == 0 || port == 0 {
|
||||
|
|
|
|||
|
|
@ -44,7 +44,6 @@ import (
|
|||
// WRITE []byte{0, 102, 111, 111, 10} # send "foo\n" on channel 0 (STDIN)
|
||||
// READ []byte{1, 10} # receive "\n" on channel 1 (STDOUT)
|
||||
// CLOSE
|
||||
//
|
||||
const ChannelWebSocketProtocol = "channel.k8s.io"
|
||||
|
||||
// The Websocket subprotocol "base64.channel.k8s.io" base64 encodes each message with a character
|
||||
|
|
@ -60,7 +59,6 @@ const ChannelWebSocketProtocol = "channel.k8s.io"
|
|||
// WRITE []byte{48, 90, 109, 57, 118, 67, 103, 111, 61} # send "foo\n" (base64: "Zm9vCgo=") on channel '0' (STDIN)
|
||||
// READ []byte{49, 67, 103, 61, 61} # receive "\n" (base64: "Cg==") on channel '1' (STDOUT)
|
||||
// CLOSE
|
||||
//
|
||||
const Base64ChannelWebSocketProtocol = "base64.channel.k8s.io"
|
||||
|
||||
type codecType int
|
||||
|
|
|
|||
|
|
@ -190,10 +190,10 @@ func (b *bufferedBackend) processIncomingEvents(stopCh <-chan struct{}) {
|
|||
// The following things can cause collectEvents to stop and return the list
|
||||
// of events:
|
||||
//
|
||||
// * Maximum number of events for a batch.
|
||||
// * Timer has passed.
|
||||
// * Buffer channel is closed and empty.
|
||||
// * stopCh is closed.
|
||||
// - Maximum number of events for a batch.
|
||||
// - Timer has passed.
|
||||
// - Buffer channel is closed and empty.
|
||||
// - stopCh is closed.
|
||||
func (b *bufferedBackend) collectEvents(timer <-chan time.Time, stopCh <-chan struct{}) []*auditinternal.Event {
|
||||
var events []*auditinternal.Event
|
||||
|
||||
|
|
|
|||
|
|
@ -246,7 +246,7 @@ func (w *WebhookAuthorizer) Authorize(ctx context.Context, attr authorizer.Attri
|
|||
|
||||
}
|
||||
|
||||
//TODO: need to finish the method to get the rules when using webhook mode
|
||||
// TODO: need to finish the method to get the rules when using webhook mode
|
||||
func (w *WebhookAuthorizer) RulesFor(user user.Info, namespace string) ([]authorizer.ResourceRuleInfo, []authorizer.NonResourceRuleInfo, bool, error) {
|
||||
var (
|
||||
resourceRules []authorizer.ResourceRuleInfo
|
||||
|
|
|
|||
Loading…
Reference in New Issue