Skip to content

Commit 177193e

Browse files
committed
Mark RC.Spec.MinReadySeconds as k8s:optional
+k8s:optional should be used everywhere +optional is. This does not change the vailidation of the field, but it is a good practice, and code generator recognizes the fields tags and outputs this comment above the field validation as a result: "optional value-type fields with zero-value defaults are purely documentation".
1 parent 1e33616 commit 177193e

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

pkg/apis/core/v1/zz_generated.validations.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/core/v1/generated.proto

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/core/v1/types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5116,6 +5116,7 @@ type ReplicationControllerSpec struct {
51165116
// without any of its container crashing, for it to be considered available.
51175117
// Defaults to 0 (pod will be considered available as soon as it is ready)
51185118
// +optional
5119+
// +k8s:optional
51195120
// +default=0
51205121
// +k8s:minimum=0
51215122
MinReadySeconds int32 `json:"minReadySeconds,omitempty" protobuf:"varint,4,opt,name=minReadySeconds"`

0 commit comments

Comments
 (0)