From 0a8c207a59d34a811e792364c1077f896ae8b9a8 Mon Sep 17 00:00:00 2001 From: Cao Shufeng Date: Fri, 17 Aug 2018 11:15:49 +0800 Subject: [PATCH] update Annotations description about audit.Event --- staging/src/k8s.io/apiserver/pkg/apis/audit/types.go | 7 ++++--- staging/src/k8s.io/apiserver/pkg/apis/audit/v1/types.go | 7 ++++--- .../src/k8s.io/apiserver/pkg/apis/audit/v1alpha1/types.go | 7 ++++--- .../src/k8s.io/apiserver/pkg/apis/audit/v1beta1/types.go | 7 ++++--- 4 files changed, 16 insertions(+), 12 deletions(-) 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 7785b11814d..271274d44f5 100644 --- a/staging/src/k8s.io/apiserver/pkg/apis/audit/types.go +++ b/staging/src/k8s.io/apiserver/pkg/apis/audit/types.go @@ -132,9 +132,10 @@ type Event struct { // Annotations is an unstructured key value map stored with an audit event that may be set by // plugins invoked in the request serving chain, including authentication, authorization and - // admission plugins. Keys should uniquely identify the informing component to avoid name - // collisions (e.g. podsecuritypolicy.admission.k8s.io/policy). Values should be short. Annotations - // are included in the Metadata level. + // admission plugins. Note that these annotations are for the audit event, and do not correspond + // to the metadata.annotations of the submitted object. Keys should uniquely identify the informing + // component to avoid name collisions (e.g. podsecuritypolicy.admission.k8s.io/policy). Values + // should be short. Annotations are included in the Metadata level. // +optional Annotations map[string]string } 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 4b14129c9cd..cf6bb1a0195 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 @@ -127,9 +127,10 @@ type Event struct { // Annotations is an unstructured key value map stored with an audit event that may be set by // plugins invoked in the request serving chain, including authentication, authorization and - // admission plugins. Keys should uniquely identify the informing component to avoid name - // collisions (e.g. podsecuritypolicy.admission.k8s.io/policy). Values should be short. Annotations - // are included in the Metadata level. + // admission plugins. Note that these annotations are for the audit event, and do not correspond + // to the metadata.annotations of the submitted object. Keys should uniquely identify the informing + // component to avoid name collisions (e.g. podsecuritypolicy.admission.k8s.io/policy). Values + // should be short. Annotations are included in the Metadata level. // +optional Annotations map[string]string `json:"annotations,omitempty" protobuf:"bytes,15,rep,name=annotations"` } 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 3fc46376204..4b4b7f25c6c 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 @@ -139,9 +139,10 @@ type Event struct { // Annotations is an unstructured key value map stored with an audit event that may be set by // plugins invoked in the request serving chain, including authentication, authorization and - // admission plugins. Keys should uniquely identify the informing component to avoid name - // collisions (e.g. podsecuritypolicy.admission.k8s.io/policy). Values should be short. Annotations - // are included in the Metadata level. + // admission plugins. Note that these annotations are for the audit event, and do not correspond + // to the metadata.annotations of the submitted object. Keys should uniquely identify the informing + // component to avoid name collisions (e.g. podsecuritypolicy.admission.k8s.io/policy). Values + // should be short. Annotations are included in the Metadata level. // +optional Annotations map[string]string `json:"annotations,omitempty" protobuf:"bytes,17,rep,name=annotations"` } 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 42b99009642..0317cf6ec5b 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 @@ -135,9 +135,10 @@ type Event struct { // Annotations is an unstructured key value map stored with an audit event that may be set by // plugins invoked in the request serving chain, including authentication, authorization and - // admission plugins. Keys should uniquely identify the informing component to avoid name - // collisions (e.g. podsecuritypolicy.admission.k8s.io/policy). Values should be short. Annotations - // are included in the Metadata level. + // admission plugins. Note that these annotations are for the audit event, and do not correspond + // to the metadata.annotations of the submitted object. Keys should uniquely identify the informing + // component to avoid name collisions (e.g. podsecuritypolicy.admission.k8s.io/policy). Values + // should be short. Annotations are included in the Metadata level. // +optional Annotations map[string]string `json:"annotations,omitempty" protobuf:"bytes,17,rep,name=annotations"` }