mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-06 18:54:06 +00:00
Mark StatefulSet's .spec.serviceName optional
The API reference doc (https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/stateful-set-v1/#StatefulSetSpec) mentions .spec.serviceName field is required, because it doesn't have optional tag, nor omitempty. In practice this field is optional, and can be empty. This change explicitly marks the field optional. Signed-off-by: Maciej Szulik <soltysh@gmail.com>
This commit is contained in:
parent
b82260f003
commit
42abc2a73b
@ -198,6 +198,7 @@ type StatefulSetSpec struct {
|
||||
// the network identity of the set. Pods get DNS/hostnames that follow the
|
||||
// pattern: pod-specific-string.serviceName.default.svc.cluster.local
|
||||
// where "pod-specific-string" is managed by the StatefulSet controller.
|
||||
// +optional
|
||||
ServiceName string
|
||||
|
||||
// PodManagementPolicy controls how pods are created during initial scale up,
|
||||
|
@ -220,6 +220,7 @@ type StatefulSetSpec struct {
|
||||
// the network identity of the set. Pods get DNS/hostnames that follow the
|
||||
// pattern: pod-specific-string.serviceName.default.svc.cluster.local
|
||||
// where "pod-specific-string" is managed by the StatefulSet controller.
|
||||
// +optional
|
||||
ServiceName string `json:"serviceName" protobuf:"bytes,5,opt,name=serviceName"`
|
||||
|
||||
// podManagementPolicy controls how pods are created during initial scale up,
|
||||
|
@ -259,6 +259,7 @@ type StatefulSetSpec struct {
|
||||
// the network identity of the set. Pods get DNS/hostnames that follow the
|
||||
// pattern: pod-specific-string.serviceName.default.svc.cluster.local
|
||||
// where "pod-specific-string" is managed by the StatefulSet controller.
|
||||
// +optional
|
||||
ServiceName string `json:"serviceName" protobuf:"bytes,5,opt,name=serviceName"`
|
||||
|
||||
// podManagementPolicy controls how pods are created during initial scale up,
|
||||
|
@ -269,6 +269,7 @@ type StatefulSetSpec struct {
|
||||
// the network identity of the set. Pods get DNS/hostnames that follow the
|
||||
// pattern: pod-specific-string.serviceName.default.svc.cluster.local
|
||||
// where "pod-specific-string" is managed by the StatefulSet controller.
|
||||
// +optional
|
||||
ServiceName string `json:"serviceName" protobuf:"bytes,5,opt,name=serviceName"`
|
||||
|
||||
// podManagementPolicy controls how pods are created during initial scale up,
|
||||
|
Loading…
Reference in New Issue
Block a user