Skip to content

Commit f7a13de

Browse files
authored
Merge pull request kubernetes#92667 from liggitt/admission-warnings
Admission webhook warnings
2 parents 94e1c54 + 03d3220 commit f7a13de

29 files changed

+447
-127
lines changed

pkg/apis/admission/types.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,12 @@ type AdmissionResponse struct {
138138
// the admission webhook to add additional context to the audit log for this request.
139139
// +optional
140140
AuditAnnotations map[string]string
141+
// warnings is a list of warning messages to return to the requesting API client.
142+
// Warning messages describe a problem the client making the API request should correct or be aware of.
143+
// Limit warnings to 120 characters if possible.
144+
// Warnings over 256 characters and large numbers of warnings may be truncated.
145+
// +optional
146+
Warnings []string
141147
}
142148

143149
// PatchType is the type of patch being used to represent the mutated object

pkg/apis/admission/v1/zz_generated.conversion.go

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

pkg/apis/admission/v1beta1/zz_generated.conversion.go

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

pkg/apis/admission/zz_generated.deepcopy.go

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

staging/src/k8s.io/api/admission/v1/generated.pb.go

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

staging/src/k8s.io/api/admission/v1/generated.proto

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

staging/src/k8s.io/api/admission/v1/types.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,13 @@ type AdmissionResponse struct {
140140
// the admission webhook to add additional context to the audit log for this request.
141141
// +optional
142142
AuditAnnotations map[string]string `json:"auditAnnotations,omitempty" protobuf:"bytes,6,opt,name=auditAnnotations"`
143+
144+
// warnings is a list of warning messages to return to the requesting API client.
145+
// Warning messages describe a problem the client making the API request should correct or be aware of.
146+
// Limit warnings to 120 characters if possible.
147+
// Warnings over 256 characters and large numbers of warnings may be truncated.
148+
// +optional
149+
Warnings []string `json:"warnings,omitempty" protobuf:"bytes,7,rep,name=warnings"`
143150
}
144151

145152
// PatchType is the type of patch being used to represent the mutated object

staging/src/k8s.io/api/admission/v1/types_swagger_doc_generated.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

staging/src/k8s.io/api/admission/v1/zz_generated.deepcopy.go

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

0 commit comments

Comments
 (0)