Merge pull request #42288 from chupman/comment-fix

Automatic merge from submit-queue (batch tested with PRs 42288, 44055)

Fixed inaccurate comments for Secret and ConfigMap

**What this PR does / why we need it**:
Updates the comments for ConfigMap and Secret in types.go to correspond to the regex used in validation.go
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
Fixes #42203
**Special notes for your reviewer**:

**Release note**:

```release-note 
None
```
pull/6/head
Kubernetes Submit Queue 2017-04-04 17:39:18 -07:00 committed by GitHub
commit d6cde8c4ce
13 changed files with 44 additions and 48 deletions

View File

@ -37674,7 +37674,7 @@
"type": "string" "type": "string"
}, },
"data": { "data": {
"description": "Data contains the configuration data. Each key must be a valid DNS_SUBDOMAIN with an optional leading dot.", "description": "Data contains the configuration data. Each key must consist of alphanumeric characters, '-', '_' or '.'.",
"type": "object", "type": "object",
"additionalProperties": { "additionalProperties": {
"type": "string" "type": "string"
@ -40759,7 +40759,7 @@
"type": "string" "type": "string"
}, },
"data": { "data": {
"description": "Data contains the secret data. Each key must be a valid DNS_SUBDOMAIN or leading dot followed by valid DNS_SUBDOMAIN. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4", "description": "Data contains the secret data. Each key must consist of alphanumeric characters, '-', '_' or '.'. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4",
"type": "object", "type": "object",
"additionalProperties": { "additionalProperties": {
"type": "string", "type": "string",

View File

@ -16804,7 +16804,7 @@
}, },
"data": { "data": {
"type": "object", "type": "object",
"description": "Data contains the configuration data. Each key must be a valid DNS_SUBDOMAIN with an optional leading dot." "description": "Data contains the configuration data. Each key must consist of alphanumeric characters, '-', '_' or '.'."
} }
} }
}, },
@ -20586,7 +20586,7 @@
}, },
"data": { "data": {
"type": "object", "type": "object",
"description": "Data contains the secret data. Each key must be a valid DNS_SUBDOMAIN or leading dot followed by valid DNS_SUBDOMAIN. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4" "description": "Data contains the secret data. Each key must consist of alphanumeric characters, '-', '_' or '.'. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4"
}, },
"stringData": { "stringData": {
"type": "object", "type": "object",

View File

@ -1922,7 +1922,7 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
</tr> </tr>
<tr> <tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">data</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">data</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Data contains the configuration data. Each key must be a valid DNS_SUBDOMAIN with an optional leading dot.</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">Data contains the configuration data. Each key must consist of alphanumeric characters, <em>-</em>, <em>_</em> or <em>.</em>.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">object</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">object</p></td>
<td class="tableblock halign-left valign-top"></td> <td class="tableblock halign-left valign-top"></td>
@ -8468,7 +8468,7 @@ Examples:<br>
</tr> </tr>
<tr> <tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">data</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">data</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Data contains the secret data. Each key must be a valid DNS_SUBDOMAIN or leading dot followed by valid DNS_SUBDOMAIN. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in <a href="https://tools.ietf.org/html/rfc4648#section-4">https://tools.ietf.org/html/rfc4648#section-4</a></p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">Data contains the secret data. Each key must consist of alphanumeric characters, <em>-</em>, <em>_</em> or <em>.</em>. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in <a href="https://tools.ietf.org/html/rfc4648#section-4">https://tools.ietf.org/html/rfc4648#section-4</a></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">object</p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">object</p></td>
<td class="tableblock halign-left valign-top"></td> <td class="tableblock halign-left valign-top"></td>

View File

@ -9472,7 +9472,7 @@
"type": "string" "type": "string"
}, },
"data": { "data": {
"description": "Data contains the configuration data. Each key must be a valid DNS_SUBDOMAIN with an optional leading dot.", "description": "Data contains the configuration data. Each key must consist of alphanumeric characters, '-', '_' or '.'.",
"type": "object", "type": "object",
"additionalProperties": { "additionalProperties": {
"type": "string" "type": "string"
@ -11079,7 +11079,7 @@
"type": "string" "type": "string"
}, },
"data": { "data": {
"description": "Data contains the secret data. Each key must be a valid DNS_SUBDOMAIN or leading dot followed by valid DNS_SUBDOMAIN. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4", "description": "Data contains the secret data. Each key must consist of alphanumeric characters, '-', '_' or '.'. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4",
"type": "object", "type": "object",
"additionalProperties": { "additionalProperties": {
"type": "string", "type": "string",

View File

@ -3525,10 +3525,10 @@ type Secret struct {
// +optional // +optional
metav1.ObjectMeta metav1.ObjectMeta
// Data contains the secret data. Each key must be a valid DNS_SUBDOMAIN // Data contains the secret data. Each key must consist of alphanumeric
// or leading dot followed by valid DNS_SUBDOMAIN. // characters, '-', '_' or '.'. The serialized form of the secret data is a
// The serialized form of the secret data is a base64 encoded string, // base64 encoded string, representing the arbitrary (possibly non-string)
// representing the arbitrary (possibly non-string) data value here. // data value here.
// +optional // +optional
Data map[string][]byte Data map[string][]byte
@ -3638,7 +3638,7 @@ type ConfigMap struct {
metav1.ObjectMeta metav1.ObjectMeta
// Data contains the configuration data. // Data contains the configuration data.
// Each key must be a valid DNS_SUBDOMAIN with an optional leading dot. // Each key must consist of alphanumeric characters, '-', '_' or '.'.
// +optional // +optional
Data map[string]string Data map[string]string
} }

View File

@ -267,7 +267,7 @@ message ConfigMap {
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
// Data contains the configuration data. // Data contains the configuration data.
// Each key must be a valid DNS_SUBDOMAIN with an optional leading dot. // Each key must consist of alphanumeric characters, '-', '_' or '.'.
// +optional // +optional
map<string, string> data = 2; map<string, string> data = 2;
} }
@ -3265,11 +3265,10 @@ message Secret {
// +optional // +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
// Data contains the secret data. Each key must be a valid DNS_SUBDOMAIN // Data contains the secret data. Each key must consist of alphanumeric
// or leading dot followed by valid DNS_SUBDOMAIN. // characters, '-', '_' or '.'. The serialized form of the secret data is a
// The serialized form of the secret data is a base64 encoded string, // base64 encoded string, representing the arbitrary (possibly non-string)
// representing the arbitrary (possibly non-string) data value here. // data value here. Described in https://tools.ietf.org/html/rfc4648#section-4
// Described in https://tools.ietf.org/html/rfc4648#section-4
// +optional // +optional
map<string, bytes> data = 2; map<string, bytes> data = 2;

View File

@ -4052,11 +4052,10 @@ type Secret struct {
// +optional // +optional
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// Data contains the secret data. Each key must be a valid DNS_SUBDOMAIN // Data contains the secret data. Each key must consist of alphanumeric
// or leading dot followed by valid DNS_SUBDOMAIN. // characters, '-', '_' or '.'. The serialized form of the secret data is a
// The serialized form of the secret data is a base64 encoded string, // base64 encoded string, representing the arbitrary (possibly non-string)
// representing the arbitrary (possibly non-string) data value here. // data value here. Described in https://tools.ietf.org/html/rfc4648#section-4
// Described in https://tools.ietf.org/html/rfc4648#section-4
// +optional // +optional
Data map[string][]byte `json:"data,omitempty" protobuf:"bytes,2,rep,name=data"` Data map[string][]byte `json:"data,omitempty" protobuf:"bytes,2,rep,name=data"`
@ -4180,7 +4179,7 @@ type ConfigMap struct {
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// Data contains the configuration data. // Data contains the configuration data.
// Each key must be a valid DNS_SUBDOMAIN with an optional leading dot. // Each key must consist of alphanumeric characters, '-', '_' or '.'.
// +optional // +optional
Data map[string]string `json:"data,omitempty" protobuf:"bytes,2,rep,name=data"` Data map[string]string `json:"data,omitempty" protobuf:"bytes,2,rep,name=data"`
} }

View File

@ -173,7 +173,7 @@ func (ComponentStatusList) SwaggerDoc() map[string]string {
var map_ConfigMap = map[string]string{ var map_ConfigMap = map[string]string{
"": "ConfigMap holds configuration data for pods to consume.", "": "ConfigMap holds configuration data for pods to consume.",
"metadata": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", "metadata": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
"data": "Data contains the configuration data. Each key must be a valid DNS_SUBDOMAIN with an optional leading dot.", "data": "Data contains the configuration data. Each key must consist of alphanumeric characters, '-', '_' or '.'.",
} }
func (ConfigMap) SwaggerDoc() map[string]string { func (ConfigMap) SwaggerDoc() map[string]string {
@ -1662,7 +1662,7 @@ func (ScaleIOVolumeSource) SwaggerDoc() map[string]string {
var map_Secret = map[string]string{ var map_Secret = map[string]string{
"": "Secret holds secret data of a certain type. The total bytes of the values in the Data field must be less than MaxSecretSize bytes.", "": "Secret holds secret data of a certain type. The total bytes of the values in the Data field must be less than MaxSecretSize bytes.",
"metadata": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", "metadata": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
"data": "Data contains the secret data. Each key must be a valid DNS_SUBDOMAIN or leading dot followed by valid DNS_SUBDOMAIN. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4", "data": "Data contains the secret data. Each key must consist of alphanumeric characters, '-', '_' or '.'. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4",
"stringData": "stringData allows specifying non-binary secret data in string form. It is provided as a write-only convenience method. All keys and values are merged into the data field on write, overwriting any existing values. It is never output when reading from the API.", "stringData": "stringData allows specifying non-binary secret data in string form. It is provided as a write-only convenience method. All keys and values are merged into the data field on write, overwriting any existing values. It is never output when reading from the API.",
"type": "Used to facilitate programmatic handling of secret data.", "type": "Used to facilitate programmatic handling of secret data.",
} }

View File

@ -2287,7 +2287,7 @@ func GetOpenAPIDefinitions(ref openapi.ReferenceCallback) map[string]openapi.Ope
}, },
"data": { "data": {
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Description: "Data contains the configuration data. Each key must be a valid DNS_SUBDOMAIN with an optional leading dot.", Description: "Data contains the configuration data. Each key must consist of alphanumeric characters, '-', '_' or '.'.",
Type: []string{"object"}, Type: []string{"object"},
AdditionalProperties: &spec.SchemaOrBool{ AdditionalProperties: &spec.SchemaOrBool{
Schema: &spec.Schema{ Schema: &spec.Schema{
@ -7857,7 +7857,7 @@ func GetOpenAPIDefinitions(ref openapi.ReferenceCallback) map[string]openapi.Ope
}, },
"data": { "data": {
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Description: "Data contains the secret data. Each key must be a valid DNS_SUBDOMAIN or leading dot followed by valid DNS_SUBDOMAIN. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4", Description: "Data contains the secret data. Each key must consist of alphanumeric characters, '-', '_' or '.'. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4",
Type: []string{"object"}, Type: []string{"object"},
AdditionalProperties: &spec.SchemaOrBool{ AdditionalProperties: &spec.SchemaOrBool{
Schema: &spec.Schema{ Schema: &spec.Schema{

View File

@ -3525,10 +3525,10 @@ type Secret struct {
// +optional // +optional
metav1.ObjectMeta metav1.ObjectMeta
// Data contains the secret data. Each key must be a valid DNS_SUBDOMAIN // Data contains the secret data. Each key must consist of alphanumeric
// or leading dot followed by valid DNS_SUBDOMAIN. // characters, '-', '_' or '.'. The serialized form of the secret data is a
// The serialized form of the secret data is a base64 encoded string, // base64 encoded string, representing the arbitrary (possibly non-string)
// representing the arbitrary (possibly non-string) data value here. // data value here.
// +optional // +optional
Data map[string][]byte Data map[string][]byte
@ -3638,7 +3638,7 @@ type ConfigMap struct {
metav1.ObjectMeta metav1.ObjectMeta
// Data contains the configuration data. // Data contains the configuration data.
// Each key must be a valid DNS_SUBDOMAIN with an optional leading dot. // Each key must consist of alphanumeric characters, '-', '_' or '.'.
// +optional // +optional
Data map[string]string Data map[string]string
} }

View File

@ -267,7 +267,7 @@ message ConfigMap {
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
// Data contains the configuration data. // Data contains the configuration data.
// Each key must be a valid DNS_SUBDOMAIN with an optional leading dot. // Each key must consist of alphanumeric characters, '-', '_' or '.'.
// +optional // +optional
map<string, string> data = 2; map<string, string> data = 2;
} }
@ -3265,11 +3265,10 @@ message Secret {
// +optional // +optional
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
// Data contains the secret data. Each key must be a valid DNS_SUBDOMAIN // Data contains the secret data. Each key must consist of alphanumeric
// or leading dot followed by valid DNS_SUBDOMAIN. // characters, '-', '_' or '.'. The serialized form of the secret data is a
// The serialized form of the secret data is a base64 encoded string, // base64 encoded string, representing the arbitrary (possibly non-string)
// representing the arbitrary (possibly non-string) data value here. // data value here. Described in https://tools.ietf.org/html/rfc4648#section-4
// Described in https://tools.ietf.org/html/rfc4648#section-4
// +optional // +optional
map<string, bytes> data = 2; map<string, bytes> data = 2;

View File

@ -4052,11 +4052,10 @@ type Secret struct {
// +optional // +optional
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// Data contains the secret data. Each key must be a valid DNS_SUBDOMAIN // Data contains the secret data. Each key must consist of alphanumeric
// or leading dot followed by valid DNS_SUBDOMAIN. // characters, '-', '_' or '.'. The serialized form of the secret data is a
// The serialized form of the secret data is a base64 encoded string, // base64 encoded string, representing the arbitrary (possibly non-string)
// representing the arbitrary (possibly non-string) data value here. // data value here. Described in https://tools.ietf.org/html/rfc4648#section-4
// Described in https://tools.ietf.org/html/rfc4648#section-4
// +optional // +optional
Data map[string][]byte `json:"data,omitempty" protobuf:"bytes,2,rep,name=data"` Data map[string][]byte `json:"data,omitempty" protobuf:"bytes,2,rep,name=data"`
@ -4180,7 +4179,7 @@ type ConfigMap struct {
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// Data contains the configuration data. // Data contains the configuration data.
// Each key must be a valid DNS_SUBDOMAIN with an optional leading dot. // Each key must consist of alphanumeric characters, '-', '_' or '.'.
// +optional // +optional
Data map[string]string `json:"data,omitempty" protobuf:"bytes,2,rep,name=data"` Data map[string]string `json:"data,omitempty" protobuf:"bytes,2,rep,name=data"`
} }

View File

@ -173,7 +173,7 @@ func (ComponentStatusList) SwaggerDoc() map[string]string {
var map_ConfigMap = map[string]string{ var map_ConfigMap = map[string]string{
"": "ConfigMap holds configuration data for pods to consume.", "": "ConfigMap holds configuration data for pods to consume.",
"metadata": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", "metadata": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
"data": "Data contains the configuration data. Each key must be a valid DNS_SUBDOMAIN with an optional leading dot.", "data": "Data contains the configuration data. Each key must consist of alphanumeric characters, '-', '_' or '.'.",
} }
func (ConfigMap) SwaggerDoc() map[string]string { func (ConfigMap) SwaggerDoc() map[string]string {
@ -1662,7 +1662,7 @@ func (ScaleIOVolumeSource) SwaggerDoc() map[string]string {
var map_Secret = map[string]string{ var map_Secret = map[string]string{
"": "Secret holds secret data of a certain type. The total bytes of the values in the Data field must be less than MaxSecretSize bytes.", "": "Secret holds secret data of a certain type. The total bytes of the values in the Data field must be less than MaxSecretSize bytes.",
"metadata": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", "metadata": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
"data": "Data contains the secret data. Each key must be a valid DNS_SUBDOMAIN or leading dot followed by valid DNS_SUBDOMAIN. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4", "data": "Data contains the secret data. Each key must consist of alphanumeric characters, '-', '_' or '.'. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4",
"stringData": "stringData allows specifying non-binary secret data in string form. It is provided as a write-only convenience method. All keys and values are merged into the data field on write, overwriting any existing values. It is never output when reading from the API.", "stringData": "stringData allows specifying non-binary secret data in string form. It is provided as a write-only convenience method. All keys and values are merged into the data field on write, overwriting any existing values. It is never output when reading from the API.",
"type": "Used to facilitate programmatic handling of secret data.", "type": "Used to facilitate programmatic handling of secret data.",
} }