Merge pull request #100684 from Jefftree/atomic

Tag structs as atomic
This commit is contained in:
Kubernetes Prow Robot 2021-04-09 05:20:12 -07:00 committed by GitHub
commit 081ac6b5a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 130 additions and 23 deletions

View File

@ -256,14 +256,12 @@ API rule violation: list_type_missing,k8s.io/api/rbac/v1beta1,Role,Rules
API rule violation: list_type_missing,k8s.io/api/rbac/v1beta1,RoleBinding,Subjects API rule violation: list_type_missing,k8s.io/api/rbac/v1beta1,RoleBinding,Subjects
API rule violation: list_type_missing,k8s.io/api/storage/v1,CSINodeDriver,TopologyKeys API rule violation: list_type_missing,k8s.io/api/storage/v1,CSINodeDriver,TopologyKeys
API rule violation: list_type_missing,k8s.io/api/storage/v1,CSINodeSpec,Drivers API rule violation: list_type_missing,k8s.io/api/storage/v1,CSINodeSpec,Drivers
API rule violation: list_type_missing,k8s.io/api/storage/v1,StorageClass,AllowedTopologies
API rule violation: list_type_missing,k8s.io/api/storage/v1,StorageClass,MountOptions API rule violation: list_type_missing,k8s.io/api/storage/v1,StorageClass,MountOptions
API rule violation: list_type_missing,k8s.io/api/storage/v1alpha1,CSIStorageCapacityList,Items API rule violation: list_type_missing,k8s.io/api/storage/v1alpha1,CSIStorageCapacityList,Items
API rule violation: list_type_missing,k8s.io/api/storage/v1beta1,CSIDriverSpec,VolumeLifecycleModes API rule violation: list_type_missing,k8s.io/api/storage/v1beta1,CSIDriverSpec,VolumeLifecycleModes
API rule violation: list_type_missing,k8s.io/api/storage/v1beta1,CSINodeDriver,TopologyKeys API rule violation: list_type_missing,k8s.io/api/storage/v1beta1,CSINodeDriver,TopologyKeys
API rule violation: list_type_missing,k8s.io/api/storage/v1beta1,CSINodeSpec,Drivers API rule violation: list_type_missing,k8s.io/api/storage/v1beta1,CSINodeSpec,Drivers
API rule violation: list_type_missing,k8s.io/api/storage/v1beta1,CSIStorageCapacityList,Items API rule violation: list_type_missing,k8s.io/api/storage/v1beta1,CSIStorageCapacityList,Items
API rule violation: list_type_missing,k8s.io/api/storage/v1beta1,StorageClass,AllowedTopologies
API rule violation: list_type_missing,k8s.io/api/storage/v1beta1,StorageClass,MountOptions API rule violation: list_type_missing,k8s.io/api/storage/v1beta1,StorageClass,MountOptions
API rule violation: list_type_missing,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1,ConversionRequest,Objects API rule violation: list_type_missing,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1,ConversionRequest,Objects
API rule violation: list_type_missing,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1,ConversionResponse,ConvertedObjects API rule violation: list_type_missing,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1,ConversionResponse,ConvertedObjects

View File

@ -2833,7 +2833,8 @@
"kind", "kind",
"name" "name"
], ],
"type": "object" "type": "object",
"x-kubernetes-map-type": "atomic"
}, },
"io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler": { "io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler": {
"description": "configuration of a horizontal pod autoscaler.", "description": "configuration of a horizontal pod autoscaler.",
@ -5738,7 +5739,8 @@
"required": [ "required": [
"key" "key"
], ],
"type": "object" "type": "object",
"x-kubernetes-map-type": "atomic"
}, },
"io.k8s.api.core.v1.ConfigMapList": { "io.k8s.api.core.v1.ConfigMapList": {
"description": "ConfigMapList is a resource containing a list of ConfigMap objects.", "description": "ConfigMapList is a resource containing a list of ConfigMap objects.",
@ -6275,7 +6277,8 @@
"required": [ "required": [
"ip" "ip"
], ],
"type": "object" "type": "object",
"x-kubernetes-map-type": "atomic"
}, },
"io.k8s.api.core.v1.EndpointPort": { "io.k8s.api.core.v1.EndpointPort": {
"description": "EndpointPort is a tuple that describes a single port.", "description": "EndpointPort is a tuple that describes a single port.",
@ -6301,7 +6304,8 @@
"required": [ "required": [
"port" "port"
], ],
"type": "object" "type": "object",
"x-kubernetes-map-type": "atomic"
}, },
"io.k8s.api.core.v1.EndpointSubset": { "io.k8s.api.core.v1.EndpointSubset": {
"description": "EndpointSubset is a group of addresses with a common set of ports. The expanded set of endpoints is the Cartesian product of Addresses x Ports. For example, given:\n {\n Addresses: [{\"ip\": \"10.10.1.1\"}, {\"ip\": \"10.10.2.2\"}],\n Ports: [{\"name\": \"a\", \"port\": 8675}, {\"name\": \"b\", \"port\": 309}]\n }\nThe resulting set of endpoints can be viewed as:\n a: [ 10.10.1.1:8675, 10.10.2.2:8675 ],\n b: [ 10.10.1.1:309, 10.10.2.2:309 ]", "description": "EndpointSubset is a group of addresses with a common set of ports. The expanded set of endpoints is the Cartesian product of Addresses x Ports. For example, given:\n {\n Addresses: [{\"ip\": \"10.10.1.1\"}, {\"ip\": \"10.10.2.2\"}],\n Ports: [{\"name\": \"a\", \"port\": 8675}, {\"name\": \"b\", \"port\": 309}]\n }\nThe resulting set of endpoints can be viewed as:\n a: [ 10.10.1.1:8675, 10.10.2.2:8675 ],\n b: [ 10.10.1.1:309, 10.10.2.2:309 ]",
@ -7429,7 +7433,8 @@
"type": "string" "type": "string"
} }
}, },
"type": "object" "type": "object",
"x-kubernetes-map-type": "atomic"
}, },
"io.k8s.api.core.v1.LocalVolumeSource": { "io.k8s.api.core.v1.LocalVolumeSource": {
"description": "Local represents directly-attached storage with node affinity (Beta feature)", "description": "Local represents directly-attached storage with node affinity (Beta feature)",
@ -7790,7 +7795,8 @@
"required": [ "required": [
"nodeSelectorTerms" "nodeSelectorTerms"
], ],
"type": "object" "type": "object",
"x-kubernetes-map-type": "atomic"
}, },
"io.k8s.api.core.v1.NodeSelectorRequirement": { "io.k8s.api.core.v1.NodeSelectorRequirement": {
"description": "A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.", "description": "A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.",
@ -7835,7 +7841,8 @@
"type": "array" "type": "array"
} }
}, },
"type": "object" "type": "object",
"x-kubernetes-map-type": "atomic"
}, },
"io.k8s.api.core.v1.NodeSpec": { "io.k8s.api.core.v1.NodeSpec": {
"description": "NodeSpec describes the attributes that a node is created with.", "description": "NodeSpec describes the attributes that a node is created with.",
@ -8026,7 +8033,8 @@
"required": [ "required": [
"fieldPath" "fieldPath"
], ],
"type": "object" "type": "object",
"x-kubernetes-map-type": "atomic"
}, },
"io.k8s.api.core.v1.ObjectReference": { "io.k8s.api.core.v1.ObjectReference": {
"description": "ObjectReference contains enough information to let you inspect or modify the referred object.", "description": "ObjectReference contains enough information to let you inspect or modify the referred object.",
@ -8060,7 +8068,8 @@
"type": "string" "type": "string"
} }
}, },
"type": "object" "type": "object",
"x-kubernetes-map-type": "atomic"
}, },
"io.k8s.api.core.v1.PersistentVolume": { "io.k8s.api.core.v1.PersistentVolume": {
"description": "PersistentVolume (PV) is a storage resource provisioned by an administrator. It is analogous to a node. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes", "description": "PersistentVolume (PV) is a storage resource provisioned by an administrator. It is analogous to a node. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes",
@ -9593,7 +9602,8 @@
"required": [ "required": [
"resource" "resource"
], ],
"type": "object" "type": "object",
"x-kubernetes-map-type": "atomic"
}, },
"io.k8s.api.core.v1.ResourceQuota": { "io.k8s.api.core.v1.ResourceQuota": {
"description": "ResourceQuota sets aggregate quota restrictions enforced per namespace", "description": "ResourceQuota sets aggregate quota restrictions enforced per namespace",
@ -9862,7 +9872,8 @@
"type": "array" "type": "array"
} }
}, },
"type": "object" "type": "object",
"x-kubernetes-map-type": "atomic"
}, },
"io.k8s.api.core.v1.ScopedResourceSelectorRequirement": { "io.k8s.api.core.v1.ScopedResourceSelectorRequirement": {
"description": "A scoped-resource selector requirement is a selector that contains values, a scope name, and an operator that relates the scope name and values.", "description": "A scoped-resource selector requirement is a selector that contains values, a scope name, and an operator that relates the scope name and values.",
@ -9995,7 +10006,8 @@
"required": [ "required": [
"key" "key"
], ],
"type": "object" "type": "object",
"x-kubernetes-map-type": "atomic"
}, },
"io.k8s.api.core.v1.SecretList": { "io.k8s.api.core.v1.SecretList": {
"description": "SecretList is a list of Secret.", "description": "SecretList is a list of Secret.",
@ -10065,7 +10077,8 @@
"type": "string" "type": "string"
} }
}, },
"type": "object" "type": "object",
"x-kubernetes-map-type": "atomic"
}, },
"io.k8s.api.core.v1.SecretVolumeSource": { "io.k8s.api.core.v1.SecretVolumeSource": {
"description": "Adapts a Secret into a volume.\n\nThe contents of the target Secret's Data field will be presented in a volume as files using the keys in the Data field as the file names. Secret volumes support ownership management and SELinux relabeling.", "description": "Adapts a Secret into a volume.\n\nThe contents of the target Secret's Data field will be presented in a volume as files using the keys in the Data field as the file names. Secret volumes support ownership management and SELinux relabeling.",
@ -10673,7 +10686,8 @@
"type": "array" "type": "array"
} }
}, },
"type": "object" "type": "object",
"x-kubernetes-map-type": "atomic"
}, },
"io.k8s.api.core.v1.TopologySpreadConstraint": { "io.k8s.api.core.v1.TopologySpreadConstraint": {
"description": "TopologySpreadConstraint specifies how to spread matching pods among the given topology.", "description": "TopologySpreadConstraint specifies how to spread matching pods among the given topology.",
@ -10723,7 +10737,8 @@
"kind", "kind",
"name" "name"
], ],
"type": "object" "type": "object",
"x-kubernetes-map-type": "atomic"
}, },
"io.k8s.api.core.v1.Volume": { "io.k8s.api.core.v1.Volume": {
"description": "Volume represents a named volume in a pod that may be accessed by any container in the pod.", "description": "Volume represents a named volume in a pod that may be accessed by any container in the pod.",
@ -11101,7 +11116,8 @@
"type": "string" "type": "string"
} }
}, },
"type": "object" "type": "object",
"x-kubernetes-map-type": "atomic"
}, },
"io.k8s.api.discovery.v1.EndpointSlice": { "io.k8s.api.discovery.v1.EndpointSlice": {
"description": "EndpointSlice represents a subset of the endpoints that implement a service. For a given service there may be multiple EndpointSlice objects, selected by labels, which must be joined to produce the full set of endpoints.", "description": "EndpointSlice represents a subset of the endpoints that implement a service. For a given service there may be multiple EndpointSlice objects, selected by labels, which must be joined to produce the full set of endpoints.",
@ -14653,7 +14669,8 @@
"kind", "kind",
"name" "name"
], ],
"type": "object" "type": "object",
"x-kubernetes-map-type": "atomic"
}, },
"io.k8s.api.rbac.v1.Subject": { "io.k8s.api.rbac.v1.Subject": {
"description": "Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.", "description": "Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.",
@ -14679,7 +14696,8 @@
"kind", "kind",
"name" "name"
], ],
"type": "object" "type": "object",
"x-kubernetes-map-type": "atomic"
}, },
"io.k8s.api.rbac.v1alpha1.AggregationRule": { "io.k8s.api.rbac.v1alpha1.AggregationRule": {
"description": "AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole", "description": "AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole",
@ -15940,7 +15958,8 @@
"items": { "items": {
"$ref": "#/definitions/io.k8s.api.core.v1.TopologySelectorTerm" "$ref": "#/definitions/io.k8s.api.core.v1.TopologySelectorTerm"
}, },
"type": "array" "type": "array",
"x-kubernetes-list-type": "atomic"
}, },
"apiVersion": { "apiVersion": {
"description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
@ -16757,7 +16776,8 @@
"items": { "items": {
"$ref": "#/definitions/io.k8s.api.core.v1.TopologySelectorTerm" "$ref": "#/definitions/io.k8s.api.core.v1.TopologySelectorTerm"
}, },
"type": "array" "type": "array",
"x-kubernetes-list-type": "atomic"
}, },
"apiVersion": { "apiVersion": {
"description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
@ -19082,7 +19102,8 @@
"name", "name",
"uid" "uid"
], ],
"type": "object" "type": "object",
"x-kubernetes-map-type": "atomic"
}, },
"io.k8s.apimachinery.pkg.apis.meta.v1.Patch": { "io.k8s.apimachinery.pkg.apis.meta.v1.Patch": {
"description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.",

View File

@ -85,6 +85,7 @@ message ContainerResourceMetricStatus {
} }
// CrossVersionObjectReference contains enough information to let you identify the referred resource. // CrossVersionObjectReference contains enough information to let you identify the referred resource.
// +structType=atomic
message CrossVersionObjectReference { message CrossVersionObjectReference {
// Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" // Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"
optional string kind = 1; optional string kind = 1;

View File

@ -23,6 +23,7 @@ import (
) )
// CrossVersionObjectReference contains enough information to let you identify the referred resource. // CrossVersionObjectReference contains enough information to let you identify the referred resource.
// +structType=atomic
type CrossVersionObjectReference struct { type CrossVersionObjectReference struct {
// Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" // Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"
Kind string `json:"kind" protobuf:"bytes,1,opt,name=kind"` Kind string `json:"kind" protobuf:"bytes,1,opt,name=kind"`

View File

@ -498,6 +498,7 @@ message ConfigMapEnvSource {
} }
// Selects a key from a ConfigMap. // Selects a key from a ConfigMap.
// +structType=atomic
message ConfigMapKeySelector { message ConfigMapKeySelector {
// The ConfigMap to select from. // The ConfigMap to select from.
optional LocalObjectReference localObjectReference = 1; optional LocalObjectReference localObjectReference = 1;
@ -1010,6 +1011,7 @@ message EmptyDirVolumeSource {
} }
// EndpointAddress is a tuple that describes single IP address. // EndpointAddress is a tuple that describes single IP address.
// +structType=atomic
message EndpointAddress { message EndpointAddress {
// The IP of this endpoint. // The IP of this endpoint.
// May not be loopback (127.0.0.0/8), link-local (169.254.0.0/16), // May not be loopback (127.0.0.0/8), link-local (169.254.0.0/16),
@ -1033,6 +1035,7 @@ message EndpointAddress {
} }
// EndpointPort is a tuple that describes a single port. // EndpointPort is a tuple that describes a single port.
// +structType=atomic
message EndpointPort { message EndpointPort {
// The name of this port. This must match the 'name' field in the // The name of this port. This must match the 'name' field in the
// corresponding ServicePort. // corresponding ServicePort.
@ -2049,6 +2052,7 @@ message LoadBalancerStatus {
// LocalObjectReference contains enough information to let you locate the // LocalObjectReference contains enough information to let you locate the
// referenced object inside the same namespace. // referenced object inside the same namespace.
// +structType=atomic
message LocalObjectReference { message LocalObjectReference {
// Name of the referent. // Name of the referent.
// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
@ -2330,6 +2334,7 @@ message NodeResources {
// A node selector represents the union of the results of one or more label queries // A node selector represents the union of the results of one or more label queries
// over a set of nodes; that is, it represents the OR of the selectors represented // over a set of nodes; that is, it represents the OR of the selectors represented
// by the node selector terms. // by the node selector terms.
// +structType=atomic
message NodeSelector { message NodeSelector {
// Required. A list of node selector terms. The terms are ORed. // Required. A list of node selector terms. The terms are ORed.
repeated NodeSelectorTerm nodeSelectorTerms = 1; repeated NodeSelectorTerm nodeSelectorTerms = 1;
@ -2357,6 +2362,7 @@ message NodeSelectorRequirement {
// A null or empty node selector term matches no objects. The requirements of // A null or empty node selector term matches no objects. The requirements of
// them are ANDed. // them are ANDed.
// The TopologySelectorTerm type implements a subset of the NodeSelectorTerm. // The TopologySelectorTerm type implements a subset of the NodeSelectorTerm.
// +structType=atomic
message NodeSelectorTerm { message NodeSelectorTerm {
// A list of node selector requirements by node's labels. // A list of node selector requirements by node's labels.
// +optional // +optional
@ -2504,6 +2510,7 @@ message NodeSystemInfo {
} }
// ObjectFieldSelector selects an APIVersioned field of an object. // ObjectFieldSelector selects an APIVersioned field of an object.
// +structType=atomic
message ObjectFieldSelector { message ObjectFieldSelector {
// Version of the schema the FieldPath is written in terms of, defaults to "v1". // Version of the schema the FieldPath is written in terms of, defaults to "v1".
// +optional // +optional
@ -2529,6 +2536,7 @@ message ObjectFieldSelector {
// Instead of using this type, create a locally provided and used type that is well-focused on your reference. // Instead of using this type, create a locally provided and used type that is well-focused on your reference.
// For example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 . // For example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 .
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +structType=atomic
message ObjectReference { message ObjectReference {
// Kind of the referent. // Kind of the referent.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
@ -4180,6 +4188,7 @@ message ReplicationControllerStatus {
} }
// ResourceFieldSelector represents container resources (cpu, memory) and their output format // ResourceFieldSelector represents container resources (cpu, memory) and their output format
// +structType=atomic
message ResourceFieldSelector { message ResourceFieldSelector {
// Container name: required for volumes, optional for env vars // Container name: required for volumes, optional for env vars
// +optional // +optional
@ -4382,6 +4391,7 @@ message ScaleIOVolumeSource {
// A scope selector represents the AND of the selectors represented // A scope selector represents the AND of the selectors represented
// by the scoped-resource selector requirements. // by the scoped-resource selector requirements.
// +structType=atomic
message ScopeSelector { message ScopeSelector {
// A list of scope selector requirements by scope of the resources. // A list of scope selector requirements by scope of the resources.
// +optional // +optional
@ -4477,6 +4487,7 @@ message SecretEnvSource {
} }
// SecretKeySelector selects a key of a Secret. // SecretKeySelector selects a key of a Secret.
// +structType=atomic
message SecretKeySelector { message SecretKeySelector {
// The name of the secret in the pod's namespace to select from. // The name of the secret in the pod's namespace to select from.
optional LocalObjectReference localObjectReference = 1; optional LocalObjectReference localObjectReference = 1;
@ -4527,6 +4538,7 @@ message SecretProjection {
// SecretReference represents a Secret Reference. It has enough information to retrieve secret // SecretReference represents a Secret Reference. It has enough information to retrieve secret
// in any namespace // in any namespace
// +structType=atomic
message SecretReference { message SecretReference {
// Name is unique within a namespace to reference a secret resource. // Name is unique within a namespace to reference a secret resource.
// +optional // +optional
@ -5249,6 +5261,7 @@ message TopologySelectorLabelRequirement {
// The requirements of them are ANDed. // The requirements of them are ANDed.
// It provides a subset of functionality as NodeSelectorTerm. // It provides a subset of functionality as NodeSelectorTerm.
// This is an alpha feature and may change in the future. // This is an alpha feature and may change in the future.
// +structType=atomic
message TopologySelectorTerm { message TopologySelectorTerm {
// A list of topology selector requirements by labels. // A list of topology selector requirements by labels.
// +optional // +optional
@ -5315,6 +5328,7 @@ message TopologySpreadConstraint {
// TypedLocalObjectReference contains enough information to let you locate the // TypedLocalObjectReference contains enough information to let you locate the
// typed referenced object inside the same namespace. // typed referenced object inside the same namespace.
// +structType=atomic
message TypedLocalObjectReference { message TypedLocalObjectReference {
// APIGroup is the group for the resource being referenced. // APIGroup is the group for the resource being referenced.
// If APIGroup is not specified, the specified Kind must be in the core API group. // If APIGroup is not specified, the specified Kind must be in the core API group.

View File

@ -861,6 +861,7 @@ type CephFSVolumeSource struct {
// SecretReference represents a Secret Reference. It has enough information to retrieve secret // SecretReference represents a Secret Reference. It has enough information to retrieve secret
// in any namespace // in any namespace
// +structType=atomic
type SecretReference struct { type SecretReference struct {
// Name is unique within a namespace to reference a secret resource. // Name is unique within a namespace to reference a secret resource.
// +optional // +optional
@ -1948,6 +1949,7 @@ type EnvVarSource struct {
} }
// ObjectFieldSelector selects an APIVersioned field of an object. // ObjectFieldSelector selects an APIVersioned field of an object.
// +structType=atomic
type ObjectFieldSelector struct { type ObjectFieldSelector struct {
// Version of the schema the FieldPath is written in terms of, defaults to "v1". // Version of the schema the FieldPath is written in terms of, defaults to "v1".
// +optional // +optional
@ -1957,6 +1959,7 @@ type ObjectFieldSelector struct {
} }
// ResourceFieldSelector represents container resources (cpu, memory) and their output format // ResourceFieldSelector represents container resources (cpu, memory) and their output format
// +structType=atomic
type ResourceFieldSelector struct { type ResourceFieldSelector struct {
// Container name: required for volumes, optional for env vars // Container name: required for volumes, optional for env vars
// +optional // +optional
@ -1969,6 +1972,7 @@ type ResourceFieldSelector struct {
} }
// Selects a key from a ConfigMap. // Selects a key from a ConfigMap.
// +structType=atomic
type ConfigMapKeySelector struct { type ConfigMapKeySelector struct {
// The ConfigMap to select from. // The ConfigMap to select from.
LocalObjectReference `json:",inline" protobuf:"bytes,1,opt,name=localObjectReference"` LocalObjectReference `json:",inline" protobuf:"bytes,1,opt,name=localObjectReference"`
@ -1980,6 +1984,7 @@ type ConfigMapKeySelector struct {
} }
// SecretKeySelector selects a key of a Secret. // SecretKeySelector selects a key of a Secret.
// +structType=atomic
type SecretKeySelector struct { type SecretKeySelector struct {
// The name of the secret in the pod's namespace to select from. // The name of the secret in the pod's namespace to select from.
LocalObjectReference `json:",inline" protobuf:"bytes,1,opt,name=localObjectReference"` LocalObjectReference `json:",inline" protobuf:"bytes,1,opt,name=localObjectReference"`
@ -2616,6 +2621,7 @@ const (
// A node selector represents the union of the results of one or more label queries // A node selector represents the union of the results of one or more label queries
// over a set of nodes; that is, it represents the OR of the selectors represented // over a set of nodes; that is, it represents the OR of the selectors represented
// by the node selector terms. // by the node selector terms.
// +structType=atomic
type NodeSelector struct { type NodeSelector struct {
//Required. A list of node selector terms. The terms are ORed. //Required. A list of node selector terms. The terms are ORed.
NodeSelectorTerms []NodeSelectorTerm `json:"nodeSelectorTerms" protobuf:"bytes,1,rep,name=nodeSelectorTerms"` NodeSelectorTerms []NodeSelectorTerm `json:"nodeSelectorTerms" protobuf:"bytes,1,rep,name=nodeSelectorTerms"`
@ -2624,6 +2630,7 @@ type NodeSelector struct {
// A null or empty node selector term matches no objects. The requirements of // A null or empty node selector term matches no objects. The requirements of
// them are ANDed. // them are ANDed.
// The TopologySelectorTerm type implements a subset of the NodeSelectorTerm. // The TopologySelectorTerm type implements a subset of the NodeSelectorTerm.
// +structType=atomic
type NodeSelectorTerm struct { type NodeSelectorTerm struct {
// A list of node selector requirements by node's labels. // A list of node selector requirements by node's labels.
// +optional // +optional
@ -2668,7 +2675,10 @@ const (
// The requirements of them are ANDed. // The requirements of them are ANDed.
// It provides a subset of functionality as NodeSelectorTerm. // It provides a subset of functionality as NodeSelectorTerm.
// This is an alpha feature and may change in the future. // This is an alpha feature and may change in the future.
// +structType=atomic
type TopologySelectorTerm struct { type TopologySelectorTerm struct {
// Usage: Fields of type []TopologySelectorTerm must be listType=atomic.
// A list of topology selector requirements by labels. // A list of topology selector requirements by labels.
// +optional // +optional
MatchLabelExpressions []TopologySelectorLabelRequirement `json:"matchLabelExpressions,omitempty" protobuf:"bytes,1,rep,name=matchLabelExpressions"` MatchLabelExpressions []TopologySelectorLabelRequirement `json:"matchLabelExpressions,omitempty" protobuf:"bytes,1,rep,name=matchLabelExpressions"`
@ -4526,6 +4536,7 @@ type EndpointSubset struct {
} }
// EndpointAddress is a tuple that describes single IP address. // EndpointAddress is a tuple that describes single IP address.
// +structType=atomic
type EndpointAddress struct { type EndpointAddress struct {
// The IP of this endpoint. // The IP of this endpoint.
// May not be loopback (127.0.0.0/8), link-local (169.254.0.0/16), // May not be loopback (127.0.0.0/8), link-local (169.254.0.0/16),
@ -4546,6 +4557,7 @@ type EndpointAddress struct {
} }
// EndpointPort is a tuple that describes a single port. // EndpointPort is a tuple that describes a single port.
// +structType=atomic
type EndpointPort struct { type EndpointPort struct {
// The name of this port. This must match the 'name' field in the // The name of this port. This must match the 'name' field in the
// corresponding ServicePort. // corresponding ServicePort.
@ -5365,6 +5377,7 @@ type ServiceProxyOptions struct {
// Instead of using this type, create a locally provided and used type that is well-focused on your reference. // Instead of using this type, create a locally provided and used type that is well-focused on your reference.
// For example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 . // For example, ServiceReferences for admission registration: https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 .
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +structType=atomic
type ObjectReference struct { type ObjectReference struct {
// Kind of the referent. // Kind of the referent.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
@ -5404,6 +5417,7 @@ type ObjectReference struct {
// LocalObjectReference contains enough information to let you locate the // LocalObjectReference contains enough information to let you locate the
// referenced object inside the same namespace. // referenced object inside the same namespace.
// +structType=atomic
type LocalObjectReference struct { type LocalObjectReference struct {
// Name of the referent. // Name of the referent.
// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
@ -5414,6 +5428,7 @@ type LocalObjectReference struct {
// TypedLocalObjectReference contains enough information to let you locate the // TypedLocalObjectReference contains enough information to let you locate the
// typed referenced object inside the same namespace. // typed referenced object inside the same namespace.
// +structType=atomic
type TypedLocalObjectReference struct { type TypedLocalObjectReference struct {
// APIGroup is the group for the resource being referenced. // APIGroup is the group for the resource being referenced.
// If APIGroup is not specified, the specified Kind must be in the core API group. // If APIGroup is not specified, the specified Kind must be in the core API group.
@ -5712,6 +5727,7 @@ type ResourceQuotaSpec struct {
// A scope selector represents the AND of the selectors represented // A scope selector represents the AND of the selectors represented
// by the scoped-resource selector requirements. // by the scoped-resource selector requirements.
// +structType=atomic
type ScopeSelector struct { type ScopeSelector struct {
// A list of scope selector requirements by scope of the resources. // A list of scope selector requirements by scope of the resources.
// +optional // +optional

View File

@ -115,6 +115,7 @@ message EndpointHints {
} }
// EndpointPort represents a Port used by an EndpointSlice // EndpointPort represents a Port used by an EndpointSlice
// +structType=atomic
message EndpointPort { message EndpointPort {
// The name of this port. All ports in an EndpointSlice must have a unique // The name of this port. All ports in an EndpointSlice must have a unique
// name. If the EndpointSlice is dervied from a Kubernetes service, this // name. If the EndpointSlice is dervied from a Kubernetes service, this

View File

@ -153,6 +153,7 @@ type ForZone struct {
} }
// EndpointPort represents a Port used by an EndpointSlice // EndpointPort represents a Port used by an EndpointSlice
// +structType=atomic
type EndpointPort struct { type EndpointPort struct {
// The name of this port. All ports in an EndpointSlice must have a unique // The name of this port. All ports in an EndpointSlice must have a unique
// name. If the EndpointSlice is dervied from a Kubernetes service, this // name. If the EndpointSlice is dervied from a Kubernetes service, this

View File

@ -164,6 +164,7 @@ message RoleList {
} }
// RoleRef contains information that points to the role being used // RoleRef contains information that points to the role being used
// +structType=atomic
message RoleRef { message RoleRef {
// APIGroup is the group for the resource being referenced // APIGroup is the group for the resource being referenced
optional string apiGroup = 1; optional string apiGroup = 1;
@ -177,6 +178,7 @@ message RoleRef {
// Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, // Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference,
// or a value for non-objects such as user and group names. // or a value for non-objects such as user and group names.
// +structType=atomic
message Subject { message Subject {
// Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount". // Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount".
// If the Authorizer does not recognized the kind value, the Authorizer should report an error. // If the Authorizer does not recognized the kind value, the Authorizer should report an error.

View File

@ -70,6 +70,7 @@ type PolicyRule struct {
// Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, // Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference,
// or a value for non-objects such as user and group names. // or a value for non-objects such as user and group names.
// +structType=atomic
type Subject struct { type Subject struct {
// Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount". // Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount".
// If the Authorizer does not recognized the kind value, the Authorizer should report an error. // If the Authorizer does not recognized the kind value, the Authorizer should report an error.
@ -88,6 +89,7 @@ type Subject struct {
} }
// RoleRef contains information that points to the role being used // RoleRef contains information that points to the role being used
// +structType=atomic
type RoleRef struct { type RoleRef struct {
// APIGroup is the group for the resource being referenced // APIGroup is the group for the resource being referenced
APIGroup string `json:"apiGroup" protobuf:"bytes,1,opt,name=apiGroup"` APIGroup string `json:"apiGroup" protobuf:"bytes,1,opt,name=apiGroup"`

View File

@ -323,6 +323,7 @@ message StorageClass {
// An empty TopologySelectorTerm list means there is no topology restriction. // An empty TopologySelectorTerm list means there is no topology restriction.
// This field is only honored by servers that enable the VolumeScheduling feature. // This field is only honored by servers that enable the VolumeScheduling feature.
// +optional // +optional
// +listType=atomic
repeated k8s.io.api.core.v1.TopologySelectorTerm allowedTopologies = 8; repeated k8s.io.api.core.v1.TopologySelectorTerm allowedTopologies = 8;
} }

View File

@ -71,6 +71,7 @@ type StorageClass struct {
// An empty TopologySelectorTerm list means there is no topology restriction. // An empty TopologySelectorTerm list means there is no topology restriction.
// This field is only honored by servers that enable the VolumeScheduling feature. // This field is only honored by servers that enable the VolumeScheduling feature.
// +optional // +optional
// +listType=atomic
AllowedTopologies []v1.TopologySelectorTerm `json:"allowedTopologies,omitempty" protobuf:"bytes,8,rep,name=allowedTopologies"` AllowedTopologies []v1.TopologySelectorTerm `json:"allowedTopologies,omitempty" protobuf:"bytes,8,rep,name=allowedTopologies"`
} }

View File

@ -416,6 +416,7 @@ message StorageClass {
// An empty TopologySelectorTerm list means there is no topology restriction. // An empty TopologySelectorTerm list means there is no topology restriction.
// This field is only honored by servers that enable the VolumeScheduling feature. // This field is only honored by servers that enable the VolumeScheduling feature.
// +optional // +optional
// +listType=atomic
repeated k8s.io.api.core.v1.TopologySelectorTerm allowedTopologies = 8; repeated k8s.io.api.core.v1.TopologySelectorTerm allowedTopologies = 8;
} }

View File

@ -75,6 +75,7 @@ type StorageClass struct {
// An empty TopologySelectorTerm list means there is no topology restriction. // An empty TopologySelectorTerm list means there is no topology restriction.
// This field is only honored by servers that enable the VolumeScheduling feature. // This field is only honored by servers that enable the VolumeScheduling feature.
// +optional // +optional
// +listType=atomic
AllowedTopologies []v1.TopologySelectorTerm `json:"allowedTopologies,omitempty" protobuf:"bytes,8,rep,name=allowedTopologies"` AllowedTopologies []v1.TopologySelectorTerm `json:"allowedTopologies,omitempty" protobuf:"bytes,8,rep,name=allowedTopologies"`
} }

View File

@ -230,6 +230,11 @@ func schema_k8sio_api_autoscaling_v1_CrossVersionObjectReference(ref common.Refe
}, },
Required: []string{"kind", "name"}, Required: []string{"kind", "name"},
}, },
VendorExtensible: spec.VendorExtensible{
Extensions: spec.Extensions{
"x-kubernetes-map-type": "atomic",
},
},
}, },
} }
} }
@ -2460,6 +2465,11 @@ func schema_pkg_apis_meta_v1_OwnerReference(ref common.ReferenceCallback) common
}, },
Required: []string{"apiVersion", "kind", "name", "uid"}, Required: []string{"apiVersion", "kind", "name", "uid"},
}, },
VendorExtensible: spec.VendorExtensible{
Extensions: spec.Extensions{
"x-kubernetes-map-type": "atomic",
},
},
}, },
} }
} }

View File

@ -788,6 +788,7 @@ message ObjectMeta {
// OwnerReference contains enough information to let you identify an owning // OwnerReference contains enough information to let you identify an owning
// object. An owning object must be in the same namespace as the dependent, or // object. An owning object must be in the same namespace as the dependent, or
// be cluster-scoped, so there is no namespace field. // be cluster-scoped, so there is no namespace field.
// +structType=atomic
message OwnerReference { message OwnerReference {
// API version of the referent. // API version of the referent.
optional string apiVersion = 5; optional string apiVersion = 5;

View File

@ -303,6 +303,7 @@ const (
// OwnerReference contains enough information to let you identify an owning // OwnerReference contains enough information to let you identify an owning
// object. An owning object must be in the same namespace as the dependent, or // object. An owning object must be in the same namespace as the dependent, or
// be cluster-scoped, so there is no namespace field. // be cluster-scoped, so there is no namespace field.
// +structType=atomic
type OwnerReference struct { type OwnerReference struct {
// API version of the referent. // API version of the referent.
APIVersion string `json:"apiVersion" protobuf:"bytes,5,opt,name=apiVersion"` APIVersion string `json:"apiVersion" protobuf:"bytes,5,opt,name=apiVersion"`

View File

@ -1759,6 +1759,7 @@ var schemaYAML = typed.YAMLObject(`types:
type: type:
scalar: string scalar: string
default: "" default: ""
elementRelationship: atomic
- name: io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler - name: io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler
map: map:
fields: fields:
@ -3335,6 +3336,7 @@ var schemaYAML = typed.YAMLObject(`types:
- name: optional - name: optional
type: type:
scalar: boolean scalar: boolean
elementRelationship: atomic
- name: io.k8s.api.core.v1.ConfigMapNodeConfigSource - name: io.k8s.api.core.v1.ConfigMapNodeConfigSource
map: map:
fields: fields:
@ -3683,6 +3685,7 @@ var schemaYAML = typed.YAMLObject(`types:
- name: targetRef - name: targetRef
type: type:
namedType: io.k8s.api.core.v1.ObjectReference namedType: io.k8s.api.core.v1.ObjectReference
elementRelationship: atomic
- name: io.k8s.api.core.v1.EndpointPort - name: io.k8s.api.core.v1.EndpointPort
map: map:
fields: fields:
@ -3699,6 +3702,7 @@ var schemaYAML = typed.YAMLObject(`types:
- name: protocol - name: protocol
type: type:
scalar: string scalar: string
elementRelationship: atomic
- name: io.k8s.api.core.v1.EndpointSubset - name: io.k8s.api.core.v1.EndpointSubset
map: map:
fields: fields:
@ -4373,6 +4377,7 @@ var schemaYAML = typed.YAMLObject(`types:
- name: name - name: name
type: type:
scalar: string scalar: string
elementRelationship: atomic
- name: io.k8s.api.core.v1.LocalVolumeSource - name: io.k8s.api.core.v1.LocalVolumeSource
map: map:
fields: fields:
@ -4568,6 +4573,7 @@ var schemaYAML = typed.YAMLObject(`types:
elementType: elementType:
namedType: io.k8s.api.core.v1.NodeSelectorTerm namedType: io.k8s.api.core.v1.NodeSelectorTerm
elementRelationship: atomic elementRelationship: atomic
elementRelationship: atomic
- name: io.k8s.api.core.v1.NodeSelectorRequirement - name: io.k8s.api.core.v1.NodeSelectorRequirement
map: map:
fields: fields:
@ -4600,6 +4606,7 @@ var schemaYAML = typed.YAMLObject(`types:
elementType: elementType:
namedType: io.k8s.api.core.v1.NodeSelectorRequirement namedType: io.k8s.api.core.v1.NodeSelectorRequirement
elementRelationship: atomic elementRelationship: atomic
elementRelationship: atomic
- name: io.k8s.api.core.v1.NodeSpec - name: io.k8s.api.core.v1.NodeSpec
map: map:
fields: fields:
@ -4744,6 +4751,7 @@ var schemaYAML = typed.YAMLObject(`types:
type: type:
scalar: string scalar: string
default: "" default: ""
elementRelationship: atomic
- name: io.k8s.api.core.v1.ObjectReference - name: io.k8s.api.core.v1.ObjectReference
map: map:
fields: fields:
@ -4768,6 +4776,7 @@ var schemaYAML = typed.YAMLObject(`types:
- name: uid - name: uid
type: type:
scalar: string scalar: string
elementRelationship: atomic
- name: io.k8s.api.core.v1.PersistentVolume - name: io.k8s.api.core.v1.PersistentVolume
map: map:
fields: fields:
@ -5719,6 +5728,7 @@ var schemaYAML = typed.YAMLObject(`types:
type: type:
scalar: string scalar: string
default: "" default: ""
elementRelationship: atomic
- name: io.k8s.api.core.v1.ResourceQuota - name: io.k8s.api.core.v1.ResourceQuota
map: map:
fields: fields:
@ -5877,6 +5887,7 @@ var schemaYAML = typed.YAMLObject(`types:
elementType: elementType:
namedType: io.k8s.api.core.v1.ScopedResourceSelectorRequirement namedType: io.k8s.api.core.v1.ScopedResourceSelectorRequirement
elementRelationship: atomic elementRelationship: atomic
elementRelationship: atomic
- name: io.k8s.api.core.v1.ScopedResourceSelectorRequirement - name: io.k8s.api.core.v1.ScopedResourceSelectorRequirement
map: map:
fields: fields:
@ -5960,6 +5971,7 @@ var schemaYAML = typed.YAMLObject(`types:
- name: optional - name: optional
type: type:
scalar: boolean scalar: boolean
elementRelationship: atomic
- name: io.k8s.api.core.v1.SecretProjection - name: io.k8s.api.core.v1.SecretProjection
map: map:
fields: fields:
@ -5984,6 +5996,7 @@ var schemaYAML = typed.YAMLObject(`types:
- name: namespace - name: namespace
type: type:
scalar: string scalar: string
elementRelationship: atomic
- name: io.k8s.api.core.v1.SecretVolumeSource - name: io.k8s.api.core.v1.SecretVolumeSource
map: map:
fields: fields:
@ -6348,6 +6361,7 @@ var schemaYAML = typed.YAMLObject(`types:
elementType: elementType:
namedType: io.k8s.api.core.v1.TopologySelectorLabelRequirement namedType: io.k8s.api.core.v1.TopologySelectorLabelRequirement
elementRelationship: atomic elementRelationship: atomic
elementRelationship: atomic
- name: io.k8s.api.core.v1.TopologySpreadConstraint - name: io.k8s.api.core.v1.TopologySpreadConstraint
map: map:
fields: fields:
@ -6380,6 +6394,7 @@ var schemaYAML = typed.YAMLObject(`types:
type: type:
scalar: string scalar: string
default: "" default: ""
elementRelationship: atomic
- name: io.k8s.api.core.v1.Volume - name: io.k8s.api.core.v1.Volume
map: map:
fields: fields:
@ -6637,6 +6652,7 @@ var schemaYAML = typed.YAMLObject(`types:
- name: protocol - name: protocol
type: type:
scalar: string scalar: string
elementRelationship: atomic
- name: io.k8s.api.discovery.v1.EndpointSlice - name: io.k8s.api.discovery.v1.EndpointSlice
map: map:
fields: fields:
@ -9510,6 +9526,7 @@ var schemaYAML = typed.YAMLObject(`types:
type: type:
scalar: string scalar: string
default: "" default: ""
elementRelationship: atomic
- name: io.k8s.api.rbac.v1.Subject - name: io.k8s.api.rbac.v1.Subject
map: map:
fields: fields:
@ -9527,6 +9544,7 @@ var schemaYAML = typed.YAMLObject(`types:
- name: namespace - name: namespace
type: type:
scalar: string scalar: string
elementRelationship: atomic
- name: io.k8s.api.rbac.v1alpha1.AggregationRule - name: io.k8s.api.rbac.v1alpha1.AggregationRule
map: map:
fields: fields:
@ -10720,6 +10738,7 @@ var schemaYAML = typed.YAMLObject(`types:
type: type:
scalar: string scalar: string
default: "" default: ""
elementRelationship: atomic
- name: io.k8s.apimachinery.pkg.apis.meta.v1.Preconditions - name: io.k8s.apimachinery.pkg.apis.meta.v1.Preconditions
map: map:
fields: fields:

View File

@ -1528,6 +1528,11 @@ func schema_pkg_apis_meta_v1_OwnerReference(ref common.ReferenceCallback) common
}, },
Required: []string{"apiVersion", "kind", "name", "uid"}, Required: []string{"apiVersion", "kind", "name", "uid"},
}, },
VendorExtensible: spec.VendorExtensible{
Extensions: spec.Extensions{
"x-kubernetes-map-type": "atomic",
},
},
}, },
} }
} }

View File

@ -1531,6 +1531,11 @@ func schema_pkg_apis_meta_v1_OwnerReference(ref common.ReferenceCallback) common
}, },
Required: []string{"apiVersion", "kind", "name", "uid"}, Required: []string{"apiVersion", "kind", "name", "uid"},
}, },
VendorExtensible: spec.VendorExtensible{
Extensions: spec.Extensions{
"x-kubernetes-map-type": "atomic",
},
},
}, },
} }
} }

View File

@ -1529,6 +1529,11 @@ func schema_pkg_apis_meta_v1_OwnerReference(ref common.ReferenceCallback) common
}, },
Required: []string{"apiVersion", "kind", "name", "uid"}, Required: []string{"apiVersion", "kind", "name", "uid"},
}, },
VendorExtensible: spec.VendorExtensible{
Extensions: spec.Extensions{
"x-kubernetes-map-type": "atomic",
},
},
}, },
} }
} }