Tag certain non-selector structs as atomic

This commit is contained in:
Jefftree 2021-04-05 13:46:37 -07:00
parent 1f2a82f530
commit 2e18314918
6 changed files with 12 additions and 2 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/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,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/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,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,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/apiextensions-apiserver/pkg/apis/apiextensions/v1,ConversionRequest,Objects
API rule violation: list_type_missing,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1,ConversionResponse,ConvertedObjects

View File

@ -23,6 +23,7 @@ import (
)
// CrossVersionObjectReference contains enough information to let you identify the referred resource.
// +structType=atomic
type CrossVersionObjectReference struct {
// 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"`

View File

@ -861,6 +861,7 @@ type CephFSVolumeSource struct {
// SecretReference represents a Secret Reference. It has enough information to retrieve secret
// in any namespace
// +structType=atomic
type SecretReference struct {
// Name is unique within a namespace to reference a secret resource.
// +optional
@ -2629,6 +2630,7 @@ type NodeSelector struct {
// A null or empty node selector term matches no objects. The requirements of
// them are ANDed.
// The TopologySelectorTerm type implements a subset of the NodeSelectorTerm.
// +structType=atomic
type NodeSelectorTerm struct {
// A list of node selector requirements by node's labels.
// +optional
@ -4531,6 +4533,7 @@ type EndpointSubset struct {
}
// EndpointAddress is a tuple that describes single IP address.
// +structType=atomic
type EndpointAddress struct {
// The IP of this endpoint.
// May not be loopback (127.0.0.0/8), link-local (169.254.0.0/16),
@ -4551,6 +4554,7 @@ type EndpointAddress struct {
}
// EndpointPort is a tuple that describes a single port.
// +structType=atomic
type EndpointPort struct {
// The name of this port. This must match the 'name' field in the
// corresponding ServicePort.
@ -5370,6 +5374,7 @@ type ServiceProxyOptions struct {
// 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 .
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +structType=atomic
type ObjectReference struct {
// Kind of the referent.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
@ -5409,6 +5414,7 @@ type ObjectReference struct {
// LocalObjectReference contains enough information to let you locate the
// referenced object inside the same namespace.
// +structType=atomic
type LocalObjectReference struct {
// Name of the referent.
// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
@ -5419,6 +5425,7 @@ type LocalObjectReference struct {
// TypedLocalObjectReference contains enough information to let you locate the
// typed referenced object inside the same namespace.
// +structType=atomic
type TypedLocalObjectReference struct {
// APIGroup is the group for the resource being referenced.
// If APIGroup is not specified, the specified Kind must be in the core API group.

View File

@ -153,6 +153,7 @@ type ForZone struct {
}
// EndpointPort represents a Port used by an EndpointSlice
// +structType=atomic
type EndpointPort struct {
// 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

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,
// or a value for non-objects such as user and group names.
// +structType=atomic
type Subject struct {
// 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.
@ -88,6 +89,7 @@ type Subject struct {
}
// RoleRef contains information that points to the role being used
// +structType=atomic
type RoleRef struct {
// APIGroup is the group for the resource being referenced
APIGroup string `json:"apiGroup" protobuf:"bytes,1,opt,name=apiGroup"`

View File

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