diff --git a/staging/src/k8s.io/apiserver/pkg/apis/audit/types.go b/staging/src/k8s.io/apiserver/pkg/apis/audit/types.go index b497be6df27..e94a60093fd 100644 --- a/staging/src/k8s.io/apiserver/pkg/apis/audit/types.go +++ b/staging/src/k8s.io/apiserver/pkg/apis/audit/types.go @@ -62,15 +62,15 @@ type Stage string const ( // The stage for events generated as soon as the audit handler receives the request, and before it // is delegated down the handler chain. - StageRequestReceived = "RequestReceived" + StageRequestReceived Stage = "RequestReceived" // The stage for events generated once the response headers are sent, but before the response body // is sent. This stage is only generated for long-running requests (e.g. watch). - StageResponseStarted = "ResponseStarted" + StageResponseStarted Stage = "ResponseStarted" // The stage for events generated once the response body has been completed, and no more bytes // will be sent. - StageResponseComplete = "ResponseComplete" + StageResponseComplete Stage = "ResponseComplete" // The stage for events generated when a panic occurred. - StagePanic = "Panic" + StagePanic Stage = "Panic" ) // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object diff --git a/staging/src/k8s.io/apiserver/pkg/apis/audit/v1/types.go b/staging/src/k8s.io/apiserver/pkg/apis/audit/v1/types.go index cf6bb1a0195..dace73ed951 100644 --- a/staging/src/k8s.io/apiserver/pkg/apis/audit/v1/types.go +++ b/staging/src/k8s.io/apiserver/pkg/apis/audit/v1/types.go @@ -55,15 +55,15 @@ type Stage string const ( // The stage for events generated as soon as the audit handler receives the request, and before it // is delegated down the handler chain. - StageRequestReceived = "RequestReceived" + StageRequestReceived Stage = "RequestReceived" // The stage for events generated once the response headers are sent, but before the response body // is sent. This stage is only generated for long-running requests (e.g. watch). - StageResponseStarted = "ResponseStarted" + StageResponseStarted Stage = "ResponseStarted" // The stage for events generated once the response body has been completed, and no more bytes // will be sent. - StageResponseComplete = "ResponseComplete" + StageResponseComplete Stage = "ResponseComplete" // The stage for events generated when a panic occurred. - StagePanic = "Panic" + StagePanic Stage = "Panic" ) // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object diff --git a/staging/src/k8s.io/apiserver/pkg/apis/audit/v1alpha1/types.go b/staging/src/k8s.io/apiserver/pkg/apis/audit/v1alpha1/types.go index 3e4eca4821a..2616f5fe709 100644 --- a/staging/src/k8s.io/apiserver/pkg/apis/audit/v1alpha1/types.go +++ b/staging/src/k8s.io/apiserver/pkg/apis/audit/v1alpha1/types.go @@ -62,15 +62,15 @@ type Stage string const ( // The stage for events generated as soon as the audit handler receives the request, and before it // is delegated down the handler chain. - StageRequestReceived = "RequestReceived" + StageRequestReceived Stage = "RequestReceived" // The stage for events generated once the response headers are sent, but before the response body // is sent. This stage is only generated for long-running requests (e.g. watch). - StageResponseStarted = "ResponseStarted" + StageResponseStarted Stage = "ResponseStarted" // The stage for events generated once the response body has been completed, and no more bytes // will be sent. - StageResponseComplete = "ResponseComplete" + StageResponseComplete Stage = "ResponseComplete" // The stage for events generated when a panic occurred. - StagePanic = "Panic" + StagePanic Stage = "Panic" ) // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object diff --git a/staging/src/k8s.io/apiserver/pkg/apis/audit/v1beta1/types.go b/staging/src/k8s.io/apiserver/pkg/apis/audit/v1beta1/types.go index 0bf6bfcb98d..eb538bc176d 100644 --- a/staging/src/k8s.io/apiserver/pkg/apis/audit/v1beta1/types.go +++ b/staging/src/k8s.io/apiserver/pkg/apis/audit/v1beta1/types.go @@ -55,15 +55,15 @@ type Stage string const ( // The stage for events generated as soon as the audit handler receives the request, and before it // is delegated down the handler chain. - StageRequestReceived = "RequestReceived" + StageRequestReceived Stage = "RequestReceived" // The stage for events generated once the response headers are sent, but before the response body // is sent. This stage is only generated for long-running requests (e.g. watch). - StageResponseStarted = "ResponseStarted" + StageResponseStarted Stage = "ResponseStarted" // The stage for events generated once the response body has been completed, and no more bytes // will be sent. - StageResponseComplete = "ResponseComplete" + StageResponseComplete Stage = "ResponseComplete" // The stage for events generated when a panic occurred. - StagePanic = "Panic" + StagePanic Stage = "Panic" ) // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object diff --git a/staging/src/k8s.io/apiserver/pkg/audit/policy/util.go b/staging/src/k8s.io/apiserver/pkg/audit/policy/util.go index 29be912303c..555386756dd 100644 --- a/staging/src/k8s.io/apiserver/pkg/audit/policy/util.go +++ b/staging/src/k8s.io/apiserver/pkg/audit/policy/util.go @@ -24,10 +24,10 @@ import ( // AllStages returns all possible stages func AllStages() sets.String { return sets.NewString( - audit.StageRequestReceived, - audit.StageResponseStarted, - audit.StageResponseComplete, - audit.StagePanic, + string(audit.StageRequestReceived), + string(audit.StageResponseStarted), + string(audit.StageResponseComplete), + string(audit.StagePanic), ) }