Skip to content

Commit 4c5e615

Browse files
author
Kubernetes Submit Queue
authored
Merge pull request kubernetes#67386 from CaoShuFeng/audit_annotation_object
Automatic merge from submit-queue (batch tested with PRs 55600, 67386). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. update Annotations description about audit.Event ref: kubernetes#58679 (comment) **What this PR does / why we need it**: **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes # **Special notes for your reviewer**: /assign @liggitt **Release note**: ```release-note NONE ```
2 parents 83db13a + 2c19a5d commit 4c5e615

File tree

7 files changed

+28
-21
lines changed

7 files changed

+28
-21
lines changed

staging/src/k8s.io/apiserver/pkg/apis/audit/types.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,10 @@ type Event struct {
132132

133133
// Annotations is an unstructured key value map stored with an audit event that may be set by
134134
// plugins invoked in the request serving chain, including authentication, authorization and
135-
// admission plugins. Keys should uniquely identify the informing component to avoid name
136-
// collisions (e.g. podsecuritypolicy.admission.k8s.io/policy). Values should be short. Annotations
137-
// are included in the Metadata level.
135+
// admission plugins. Note that these annotations are for the audit event, and do not correspond
136+
// to the metadata.annotations of the submitted object. Keys should uniquely identify the informing
137+
// component to avoid name collisions (e.g. podsecuritypolicy.admission.k8s.io/policy). Values
138+
// should be short. Annotations are included in the Metadata level.
138139
// +optional
139140
Annotations map[string]string
140141
}

staging/src/k8s.io/apiserver/pkg/apis/audit/v1/generated.proto

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

staging/src/k8s.io/apiserver/pkg/apis/audit/v1/types.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,10 @@ type Event struct {
127127

128128
// Annotations is an unstructured key value map stored with an audit event that may be set by
129129
// plugins invoked in the request serving chain, including authentication, authorization and
130-
// admission plugins. Keys should uniquely identify the informing component to avoid name
131-
// collisions (e.g. podsecuritypolicy.admission.k8s.io/policy). Values should be short. Annotations
132-
// are included in the Metadata level.
130+
// admission plugins. Note that these annotations are for the audit event, and do not correspond
131+
// to the metadata.annotations of the submitted object. Keys should uniquely identify the informing
132+
// component to avoid name collisions (e.g. podsecuritypolicy.admission.k8s.io/policy). Values
133+
// should be short. Annotations are included in the Metadata level.
133134
// +optional
134135
Annotations map[string]string `json:"annotations,omitempty" protobuf:"bytes,15,rep,name=annotations"`
135136
}

staging/src/k8s.io/apiserver/pkg/apis/audit/v1alpha1/generated.proto

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

staging/src/k8s.io/apiserver/pkg/apis/audit/v1alpha1/types.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,10 @@ type Event struct {
139139

140140
// Annotations is an unstructured key value map stored with an audit event that may be set by
141141
// plugins invoked in the request serving chain, including authentication, authorization and
142-
// admission plugins. Keys should uniquely identify the informing component to avoid name
143-
// collisions (e.g. podsecuritypolicy.admission.k8s.io/policy). Values should be short. Annotations
144-
// are included in the Metadata level.
142+
// admission plugins. Note that these annotations are for the audit event, and do not correspond
143+
// to the metadata.annotations of the submitted object. Keys should uniquely identify the informing
144+
// component to avoid name collisions (e.g. podsecuritypolicy.admission.k8s.io/policy). Values
145+
// should be short. Annotations are included in the Metadata level.
145146
// +optional
146147
Annotations map[string]string `json:"annotations,omitempty" protobuf:"bytes,17,rep,name=annotations"`
147148
}

staging/src/k8s.io/apiserver/pkg/apis/audit/v1beta1/generated.proto

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

staging/src/k8s.io/apiserver/pkg/apis/audit/v1beta1/types.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,10 @@ type Event struct {
135135

136136
// Annotations is an unstructured key value map stored with an audit event that may be set by
137137
// plugins invoked in the request serving chain, including authentication, authorization and
138-
// admission plugins. Keys should uniquely identify the informing component to avoid name
139-
// collisions (e.g. podsecuritypolicy.admission.k8s.io/policy). Values should be short. Annotations
140-
// are included in the Metadata level.
138+
// admission plugins. Note that these annotations are for the audit event, and do not correspond
139+
// to the metadata.annotations of the submitted object. Keys should uniquely identify the informing
140+
// component to avoid name collisions (e.g. podsecuritypolicy.admission.k8s.io/policy). Values
141+
// should be short. Annotations are included in the Metadata level.
141142
// +optional
142143
Annotations map[string]string `json:"annotations,omitempty" protobuf:"bytes,17,rep,name=annotations"`
143144
}

0 commit comments

Comments
 (0)