Fix omitempty/optional indicator on CABundle fields

This commit is contained in:
Jordan Liggitt 2018-10-23 13:29:34 -04:00
parent daf17e2aee
commit d00906f44e
7 changed files with 17 additions and 16 deletions

View File

@ -328,9 +328,9 @@ type WebhookClientConfig struct {
// +optional // +optional
Service *ServiceReference Service *ServiceReference
// `caBundle` is a PEM encoded CA bundle which will be used to validate // `caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate.
// the webhook's server certificate. // If unspecified, system trust roots on the apiserver are used.
// Required. // +optional
CABundle []byte CABundle []byte
} }

View File

@ -173,9 +173,8 @@ type WebhookClientConfig struct {
// +optional // +optional
Service *ServiceReference Service *ServiceReference
// `caBundle` is a PEM encoded CA bundle which will be used to validate // `caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate.
// the webhook's server certificate. // If unspecified, system trust roots on the apiserver are used.
// defaults to the apiservers CA bundle for the endpoint type
// +optional // +optional
CABundle []byte CABundle []byte
} }

View File

@ -282,12 +282,12 @@ type WebhookClientConfig struct {
// Port 443 will be used if it is open, otherwise it is an error. // Port 443 will be used if it is open, otherwise it is an error.
// //
// +optional // +optional
Service *ServiceReference `json:"service" protobuf:"bytes,1,opt,name=service"` Service *ServiceReference `json:"service,omitempty" protobuf:"bytes,1,opt,name=service"`
// `caBundle` is a PEM encoded CA bundle which will be used to validate // `caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate.
// the webhook's server certificate. // If unspecified, system trust roots on the apiserver are used.
// Required. // +optional
CABundle []byte `json:"caBundle" protobuf:"bytes,2,opt,name=caBundle"` CABundle []byte `json:"caBundle,omitempty" protobuf:"bytes,2,opt,name=caBundle"`
} }
// ServiceReference holds a reference to Service.legacy.k8s.io // ServiceReference holds a reference to Service.legacy.k8s.io

View File

@ -169,13 +169,12 @@ type WebhookClientConfig struct {
// Port 443 will be used if it is open, otherwise it is an error. // Port 443 will be used if it is open, otherwise it is an error.
// //
// +optional // +optional
Service *ServiceReference `json:"service" protobuf:"bytes,2,opt,name=service"` Service *ServiceReference `json:"service,omitempty" protobuf:"bytes,2,opt,name=service"`
// `caBundle` is a PEM encoded CA bundle which will be used to validate // `caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate.
// the webhook's server certificate. // If unspecified, system trust roots on the apiserver are used.
// defaults to the apiservers CA bundle for the endpoint type
// +optional // +optional
CABundle []byte `json:"caBundle" protobuf:"bytes,3,opt,name=caBundle"` CABundle []byte `json:"caBundle,omitempty" protobuf:"bytes,3,opt,name=caBundle"`
} }
// ServiceReference holds a reference to Service.legacy.k8s.io // ServiceReference holds a reference to Service.legacy.k8s.io

View File

@ -53,6 +53,7 @@ type APIServiceSpec struct {
// This is strongly discouraged. You should use the CABundle instead. // This is strongly discouraged. You should use the CABundle instead.
InsecureSkipTLSVerify bool InsecureSkipTLSVerify bool
// CABundle is a PEM encoded CA bundle which will be used to validate an API server's serving certificate. // CABundle is a PEM encoded CA bundle which will be used to validate an API server's serving certificate.
// If unspecified, system trust roots on the apiserver are used.
// +optional // +optional
CABundle []byte CABundle []byte

View File

@ -53,6 +53,7 @@ type APIServiceSpec struct {
// This is strongly discouraged. You should use the CABundle instead. // This is strongly discouraged. You should use the CABundle instead.
InsecureSkipTLSVerify bool `json:"insecureSkipTLSVerify,omitempty" protobuf:"varint,4,opt,name=insecureSkipTLSVerify"` InsecureSkipTLSVerify bool `json:"insecureSkipTLSVerify,omitempty" protobuf:"varint,4,opt,name=insecureSkipTLSVerify"`
// CABundle is a PEM encoded CA bundle which will be used to validate an API server's serving certificate. // CABundle is a PEM encoded CA bundle which will be used to validate an API server's serving certificate.
// If unspecified, system trust roots on the apiserver are used.
// +optional // +optional
CABundle []byte `json:"caBundle,omitempty" protobuf:"bytes,5,opt,name=caBundle"` CABundle []byte `json:"caBundle,omitempty" protobuf:"bytes,5,opt,name=caBundle"`

View File

@ -53,6 +53,7 @@ type APIServiceSpec struct {
// This is strongly discouraged. You should use the CABundle instead. // This is strongly discouraged. You should use the CABundle instead.
InsecureSkipTLSVerify bool `json:"insecureSkipTLSVerify,omitempty" protobuf:"varint,4,opt,name=insecureSkipTLSVerify"` InsecureSkipTLSVerify bool `json:"insecureSkipTLSVerify,omitempty" protobuf:"varint,4,opt,name=insecureSkipTLSVerify"`
// CABundle is a PEM encoded CA bundle which will be used to validate an API server's serving certificate. // CABundle is a PEM encoded CA bundle which will be used to validate an API server's serving certificate.
// If unspecified, system trust roots on the apiserver are used.
// +optional // +optional
CABundle []byte `json:"caBundle,omitempty" protobuf:"bytes,5,opt,name=caBundle"` CABundle []byte `json:"caBundle,omitempty" protobuf:"bytes,5,opt,name=caBundle"`