Merge pull request #134675 from JoelSpeed/enable-kal-optionalorrequired-apiserver-internal

Enforce either optional or required tag on apiserverinternal API group
This commit is contained in:
Kubernetes Prow Robot 2026-02-13 06:10:00 +05:30 committed by GitHub
commit 9571e19da9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
62 changed files with 173 additions and 33 deletions

View file

@ -465,6 +465,9 @@
"description": "spec defines the desired behavior of the ValidatingAdmissionPolicyBinding."
}
},
"required": [
"spec"
],
"type": "object",
"x-kubernetes-group-version-kind": [
{
@ -1694,6 +1697,11 @@
"x-kubernetes-list-type": "set"
}
},
"required": [
"apiServerID",
"encodingVersion",
"decodableVersions"
],
"type": "object"
},
"io.k8s.api.apiserverinternal.v1alpha1.StorageVersion": {
@ -1721,8 +1729,7 @@
}
},
"required": [
"spec",
"status"
"metadata"
],
"type": "object",
"x-kubernetes-group-version-kind": [
@ -3558,6 +3565,9 @@
"description": "status is the current information about the autoscaler."
}
},
"required": [
"spec"
],
"type": "object",
"x-kubernetes-group-version-kind": [
{
@ -3907,6 +3917,9 @@
"description": "status is the current information about the autoscaler."
}
},
"required": [
"spec"
],
"type": "object",
"x-kubernetes-group-version-kind": [
{
@ -4350,6 +4363,9 @@
"description": "Current status of a cron job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status"
}
},
"required": [
"spec"
],
"type": "object",
"x-kubernetes-group-version-kind": [
{
@ -5506,6 +5522,9 @@
"description": "spec contains the specification of the Lease. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status"
}
},
"required": [
"spec"
],
"type": "object",
"x-kubernetes-group-version-kind": [
{
@ -5605,6 +5624,9 @@
"description": "spec contains the specification of the Lease. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status"
}
},
"required": [
"spec"
],
"type": "object",
"x-kubernetes-group-version-kind": [
{
@ -13666,6 +13688,9 @@
"description": "spec is the desired state of the IPAddress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status"
}
},
"required": [
"spec"
],
"type": "object",
"x-kubernetes-group-version-kind": [
{
@ -14423,6 +14448,9 @@
"description": "spec is the desired state of the IPAddress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status"
}
},
"required": [
"spec"
],
"type": "object",
"x-kubernetes-group-version-kind": [
{

View file

@ -580,6 +580,9 @@
"description": "spec defines the desired behavior of the ValidatingAdmissionPolicyBinding."
}
},
"required": [
"spec"
],
"type": "object",
"x-kubernetes-group-version-kind": [
{

View file

@ -65,6 +65,9 @@
"description": "status is the current information about the autoscaler."
}
},
"required": [
"spec"
],
"type": "object",
"x-kubernetes-group-version-kind": [
{

View file

@ -244,6 +244,9 @@
"description": "status is the current information about the autoscaler."
}
},
"required": [
"spec"
],
"type": "object",
"x-kubernetes-group-version-kind": [
{

View file

@ -40,6 +40,9 @@
"description": "Current status of a cron job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status"
}
},
"required": [
"spec"
],
"type": "object",
"x-kubernetes-group-version-kind": [
{

View file

@ -31,6 +31,9 @@
"description": "spec contains the specification of the Lease. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status"
}
},
"required": [
"spec"
],
"type": "object",
"x-kubernetes-group-version-kind": [
{

View file

@ -31,6 +31,9 @@
"description": "spec contains the specification of the Lease. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status"
}
},
"required": [
"spec"
],
"type": "object",
"x-kubernetes-group-version-kind": [
{

View file

@ -31,6 +31,11 @@
"x-kubernetes-list-type": "set"
}
},
"required": [
"apiServerID",
"encodingVersion",
"decodableVersions"
],
"type": "object"
},
"io.k8s.api.apiserverinternal.v1alpha1.StorageVersion": {
@ -73,8 +78,7 @@
}
},
"required": [
"spec",
"status"
"metadata"
],
"type": "object",
"x-kubernetes-group-version-kind": [

View file

@ -105,6 +105,9 @@
"description": "spec is the desired state of the IPAddress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status"
}
},
"required": [
"spec"
],
"type": "object",
"x-kubernetes-group-version-kind": [
{

View file

@ -31,6 +31,9 @@
"description": "spec is the desired state of the IPAddress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status"
}
},
"required": [
"spec"
],
"type": "object",
"x-kubernetes-group-version-kind": [
{

View file

@ -213,8 +213,9 @@ linters:
path: "staging/src/k8s.io/api/resource/(v1|v1beta1|v1beta2)/types.go"
# OptionalOrRequired is being enabled over time. For now, each API group should be added to this list until we comb through each group and fix the missing tags.
- text: "must be marked as optional or required"
path: "staging/src/k8s.io/api/(admission|apidiscovery|apiserverinternal|apps|authentication|authorization|autoscaling|batch|certificates|coordination|core|discovery|events|extensions|flowcontrol|networking|rbac|resource|storage|storagemigration)"
# The nonpointerstructs linter is included here as well as these two should be enabled hand-in-hand on each API group.
- text: "must be marked as optional or required|is a non-pointer struct with no required fields."
path: "staging/src/k8s.io/api/(admission|apidiscovery|apps|authentication|authorization|autoscaling|batch|certificates|core|discovery|events|extensions|flowcontrol|networking|rbac|resource|storage)"
# OptionalOrRequired - Existing fields that are marked as both optional and required (based on standard optional vs kubebuilder:validation:Required) and should not be fixed.
- text: "field (PortStatus|IngressPortStatus)\\.Error must not be marked as both optional and required"
@ -223,6 +224,13 @@ linters:
# jsontags: 'Port' must be capitalized for backward compatibility
- text: 'jsontags: field DaemonEndpoint.Port json tag does not match'
path: "staging/src/k8s.io/api/core/v1/types.go"
# NonPointerStructs - Existing fields that are non-pointer structs but where the current rules are incorrect.
# The PodGroup.Policy field is a union type, but is not marked up as a union, nor does nonpointerstructs understand unions today.
# Validation makes this require at least one of the fields within to be set.
- text: "nonpointerstructs: field PodGroup.Policy is a non-pointer struct with no required fields."
path: "staging/src/k8s.io/api/scheduling/v1alpha1/types.go"
- linters:
- forbidigo
@ -405,6 +413,7 @@ linters:
# - "nobools" # Bools do not evolve over time, should use enums instead.
# - "nofloats" # Ensure floats are not used.
- "nomaps" # Ensure maps are not used, unless they are `map[string]string` (for labels/annotations/etc).
- "nonpointerstructs" # Ensure non-pointer structs are correctly tagged as optional or required.
- "nonullable" # Ensure fields are not marked as nullable.
# - "nophase" # Ensure field names do not have the word "phase" in them.
- "notimestamp" # Ensure fields are not named "timestamp", prefer "time".
@ -444,7 +453,6 @@ linters:
# nomaps:
# policy: AllowStringToStringMaps # Determines how the linter should handle maps of basic types. Maps of objects are always disallowed.
# optionalFields:
# policy: AllowOptionalFields # Determines how the linter should handle optional fields.optionalfields:
# pointers:
# preference: Always | WhenRequired # Whether to always require pointers, or only when required. Defaults to `Always`.
# policy: SuggestFix | Warn # The policy for pointers in optional fields. Defaults to `SuggestFix`.
@ -455,7 +463,6 @@ linters:
# optionalOrRequired:
# preferredOptionalMarker: optional # The preferred optional marker to use, fixes will suggest to use this marker. Defaults to `optional`.
# preferredRequiredMarker: required # The preferred required marker to use, fixes will suggest to use this marker. Defaults to `required`.
# policy: AllowOptionalFields # Determines how the linter should handle optional fields.
# requiredFields:
# pointers:
# policy: SuggestFix | Warn # The policy for pointers in required fields. Defaults to `SuggestFix`.

View file

@ -224,8 +224,9 @@ linters:
path: "staging/src/k8s.io/api/resource/(v1|v1beta1|v1beta2)/types.go"
# OptionalOrRequired is being enabled over time. For now, each API group should be added to this list until we comb through each group and fix the missing tags.
- text: "must be marked as optional or required"
path: "staging/src/k8s.io/api/(admission|apidiscovery|apiserverinternal|apps|authentication|authorization|autoscaling|batch|certificates|coordination|core|discovery|events|extensions|flowcontrol|networking|rbac|resource|storage|storagemigration)"
# The nonpointerstructs linter is included here as well as these two should be enabled hand-in-hand on each API group.
- text: "must be marked as optional or required|is a non-pointer struct with no required fields."
path: "staging/src/k8s.io/api/(admission|apidiscovery|apps|authentication|authorization|autoscaling|batch|certificates|core|discovery|events|extensions|flowcontrol|networking|rbac|resource|storage)"
# OptionalOrRequired - Existing fields that are marked as both optional and required (based on standard optional vs kubebuilder:validation:Required) and should not be fixed.
- text: "field (PortStatus|IngressPortStatus)\\.Error must not be marked as both optional and required"
@ -234,6 +235,13 @@ linters:
# jsontags: 'Port' must be capitalized for backward compatibility
- text: 'jsontags: field DaemonEndpoint.Port json tag does not match'
path: "staging/src/k8s.io/api/core/v1/types.go"
# NonPointerStructs - Existing fields that are non-pointer structs but where the current rules are incorrect.
# The PodGroup.Policy field is a union type, but is not marked up as a union, nor does nonpointerstructs understand unions today.
# Validation makes this require at least one of the fields within to be set.
- text: "nonpointerstructs: field PodGroup.Policy is a non-pointer struct with no required fields."
path: "staging/src/k8s.io/api/scheduling/v1alpha1/types.go"
- linters:
- forbidigo
@ -414,6 +422,7 @@ linters:
# - "nobools" # Bools do not evolve over time, should use enums instead.
# - "nofloats" # Ensure floats are not used.
- "nomaps" # Ensure maps are not used, unless they are `map[string]string` (for labels/annotations/etc).
- "nonpointerstructs" # Ensure non-pointer structs are correctly tagged as optional or required.
- "nonullable" # Ensure fields are not marked as nullable.
# - "nophase" # Ensure field names do not have the word "phase" in them.
- "notimestamp" # Ensure fields are not named "timestamp", prefer "time".
@ -453,7 +462,6 @@ linters:
# nomaps:
# policy: AllowStringToStringMaps # Determines how the linter should handle maps of basic types. Maps of objects are always disallowed.
# optionalFields:
# policy: AllowOptionalFields # Determines how the linter should handle optional fields.optionalfields:
# pointers:
# preference: Always | WhenRequired # Whether to always require pointers, or only when required. Defaults to `Always`.
# policy: SuggestFix | Warn # The policy for pointers in optional fields. Defaults to `SuggestFix`.
@ -464,7 +472,6 @@ linters:
# optionalOrRequired:
# preferredOptionalMarker: optional # The preferred optional marker to use, fixes will suggest to use this marker. Defaults to `optional`.
# preferredRequiredMarker: required # The preferred required marker to use, fixes will suggest to use this marker. Defaults to `required`.
# policy: AllowOptionalFields # Determines how the linter should handle optional fields.
# requiredFields:
# pointers:
# policy: SuggestFix | Warn # The policy for pointers in required fields. Defaults to `SuggestFix`.

View file

@ -89,8 +89,9 @@
path: "staging/src/k8s.io/api/resource/(v1|v1beta1|v1beta2)/types.go"
# OptionalOrRequired is being enabled over time. For now, each API group should be added to this list until we comb through each group and fix the missing tags.
- text: "must be marked as optional or required"
path: "staging/src/k8s.io/api/(admission|apidiscovery|apiserverinternal|apps|authentication|authorization|autoscaling|batch|certificates|coordination|core|discovery|events|extensions|flowcontrol|networking|rbac|resource|storage|storagemigration)"
# The nonpointerstructs linter is included here as well as these two should be enabled hand-in-hand on each API group.
- text: "must be marked as optional or required|is a non-pointer struct with no required fields."
path: "staging/src/k8s.io/api/(admission|apidiscovery|apps|authentication|authorization|autoscaling|batch|certificates|core|discovery|events|extensions|flowcontrol|networking|rbac|resource|storage)"
# OptionalOrRequired - Existing fields that are marked as both optional and required (based on standard optional vs kubebuilder:validation:Required) and should not be fixed.
- text: "field (PortStatus|IngressPortStatus)\\.Error must not be marked as both optional and required"
@ -99,3 +100,10 @@
# jsontags: 'Port' must be capitalized for backward compatibility
- text: 'jsontags: field DaemonEndpoint.Port json tag does not match'
path: "staging/src/k8s.io/api/core/v1/types.go"
# NonPointerStructs - Existing fields that are non-pointer structs but where the current rules are incorrect.
# The PodGroup.Policy field is a union type, but is not marked up as a union, nor does nonpointerstructs understand unions today.
# Validation makes this require at least one of the fields within to be set.
- text: "nonpointerstructs: field PodGroup.Policy is a non-pointer struct with no required fields."
path: "staging/src/k8s.io/api/scheduling/v1alpha1/types.go"

View file

@ -12,6 +12,7 @@ linters:
# - "nobools" # Bools do not evolve over time, should use enums instead.
# - "nofloats" # Ensure floats are not used.
- "nomaps" # Ensure maps are not used, unless they are `map[string]string` (for labels/annotations/etc).
- "nonpointerstructs" # Ensure non-pointer structs are correctly tagged as optional or required.
- "nonullable" # Ensure fields are not marked as nullable.
# - "nophase" # Ensure field names do not have the word "phase" in them.
- "notimestamp" # Ensure fields are not named "timestamp", prefer "time".
@ -51,7 +52,6 @@ lintersConfig:
# nomaps:
# policy: AllowStringToStringMaps # Determines how the linter should handle maps of basic types. Maps of objects are always disallowed.
# optionalFields:
# policy: AllowOptionalFields # Determines how the linter should handle optional fields.optionalfields:
# pointers:
# preference: Always | WhenRequired # Whether to always require pointers, or only when required. Defaults to `Always`.
# policy: SuggestFix | Warn # The policy for pointers in optional fields. Defaults to `SuggestFix`.
@ -62,7 +62,6 @@ lintersConfig:
# optionalOrRequired:
# preferredOptionalMarker: optional # The preferred optional marker to use, fixes will suggest to use this marker. Defaults to `optional`.
# preferredRequiredMarker: required # The preferred required marker to use, fixes will suggest to use this marker. Defaults to `required`.
# policy: AllowOptionalFields # Determines how the linter should handle optional fields.
# requiredFields:
# pointers:
# policy: SuggestFix | Warn # The policy for pointers in required fields. Defaults to `SuggestFix`.

View file

@ -2448,6 +2448,7 @@ func schema_k8sio_api_admissionregistration_v1_ValidatingAdmissionPolicyBinding(
},
},
},
Required: []string{"spec"},
},
},
Dependencies: []string{
@ -4043,6 +4044,7 @@ func schema_k8sio_api_admissionregistration_v1alpha1_ValidatingAdmissionPolicyBi
},
},
},
Required: []string{"spec"},
},
},
Dependencies: []string{
@ -5645,6 +5647,7 @@ func schema_k8sio_api_admissionregistration_v1beta1_ValidatingAdmissionPolicyBin
},
},
},
Required: []string{"spec"},
},
},
Dependencies: []string{
@ -7133,6 +7136,7 @@ func schema_k8sio_api_apiserverinternal_v1alpha1_ServerStorageVersion(ref common
},
},
},
Required: []string{"apiServerID", "encodingVersion", "decodableVersions"},
},
},
}
@ -7181,7 +7185,7 @@ func schema_k8sio_api_apiserverinternal_v1alpha1_StorageVersion(ref common.Refer
},
},
},
Required: []string{"spec", "status"},
Required: []string{"metadata"},
},
},
Dependencies: []string{
@ -14380,6 +14384,7 @@ func schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscaler(ref common.Referenc
},
},
},
Required: []string{"spec"},
},
},
Dependencies: []string{
@ -15351,6 +15356,7 @@ func schema_k8sio_api_autoscaling_v2_HorizontalPodAutoscaler(ref common.Referenc
},
},
},
Required: []string{"spec"},
},
},
Dependencies: []string{
@ -16092,6 +16098,7 @@ func schema_k8sio_api_batch_v1_CronJob(ref common.ReferenceCallback) common.Open
},
},
},
Required: []string{"spec"},
},
},
Dependencies: []string{
@ -17011,6 +17018,7 @@ func schema_k8sio_api_batch_v1beta1_CronJob(ref common.ReferenceCallback) common
},
},
},
Required: []string{"spec"},
},
},
Dependencies: []string{
@ -18564,6 +18572,7 @@ func schema_k8sio_api_coordination_v1alpha2_LeaseCandidate(ref common.ReferenceC
},
},
},
Required: []string{"spec"},
},
},
Dependencies: []string{
@ -18759,6 +18768,7 @@ func schema_k8sio_api_coordination_v1beta1_LeaseCandidate(ref common.ReferenceCa
},
},
},
Required: []string{"spec"},
},
},
Dependencies: []string{
@ -40734,6 +40744,7 @@ func schema_k8sio_api_networking_v1_IPAddress(ref common.ReferenceCallback) comm
},
},
},
Required: []string{"spec"},
},
},
Dependencies: []string{
@ -42188,6 +42199,7 @@ func schema_k8sio_api_networking_v1beta1_IPAddress(ref common.ReferenceCallback)
},
},
},
Required: []string{"spec"},
},
},
Dependencies: []string{

View file

@ -604,6 +604,7 @@ message ValidatingAdmissionPolicyBinding {
optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
// spec defines the desired behavior of the ValidatingAdmissionPolicyBinding.
// +required
optional ValidatingAdmissionPolicyBindingSpec spec = 2;
}

View file

@ -452,6 +452,7 @@ type ValidatingAdmissionPolicyBinding struct {
// +optional
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// spec defines the desired behavior of the ValidatingAdmissionPolicyBinding.
// +required
Spec ValidatingAdmissionPolicyBindingSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
}

View file

@ -627,6 +627,7 @@ message ValidatingAdmissionPolicyBinding {
optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
// spec defines the desired behavior of the ValidatingAdmissionPolicyBinding.
// +required
optional ValidatingAdmissionPolicyBindingSpec spec = 2;
}

View file

@ -392,6 +392,7 @@ type ValidatingAdmissionPolicyBinding struct {
// +optional
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// spec defines the desired behavior of the ValidatingAdmissionPolicyBinding.
// +required
Spec ValidatingAdmissionPolicyBindingSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
}

View file

@ -853,6 +853,7 @@ message ValidatingAdmissionPolicyBinding {
optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
// spec defines the desired behavior of the ValidatingAdmissionPolicyBinding.
// +required
optional ValidatingAdmissionPolicyBindingSpec spec = 2;
}

View file

@ -405,6 +405,7 @@ type ValidatingAdmissionPolicyBinding struct {
// +optional
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// spec defines the desired behavior of the ValidatingAdmissionPolicyBinding.
// +required
Spec ValidatingAdmissionPolicyBindingSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
}

View file

@ -32,33 +32,40 @@ option go_package = "k8s.io/api/apiserverinternal/v1alpha1";
// encodes objects to when persisting objects in the backend.
message ServerStorageVersion {
// The ID of the reporting API server.
// +required
optional string apiServerID = 1;
// The API server encodes the object to this version when persisting it in
// the backend (e.g., etcd).
// +required
optional string encodingVersion = 2;
// The API server can decode objects encoded in these versions.
// The encodingVersion must be included in the decodableVersions.
// +listType=set
// +required
repeated string decodableVersions = 3;
// The API server can serve these versions.
// DecodableVersions must include all ServedVersions.
// +listType=set
// +optional
repeated string servedVersions = 4;
}
// Storage version of a specific resource.
message StorageVersion {
// The name is <group>.<resource>.
// +required
optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
// Spec is an empty spec. It is here to comply with Kubernetes API style.
// +optional
optional StorageVersionSpec spec = 2;
// API server instances report the version they can decode and the version they
// encode objects to when persisting objects in the backend.
// +optional
optional StorageVersionStatus status = 3;
}
@ -77,6 +84,7 @@ message StorageVersionCondition {
optional int64 observedGeneration = 3;
// Last time the condition transitioned from one status to another.
// +optional
optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 4;
// The reason for the condition's last transition.

View file

@ -28,13 +28,16 @@ import (
type StorageVersion struct {
metav1.TypeMeta `json:",inline"`
// The name is <group>.<resource>.
// +required
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// Spec is an empty spec. It is here to comply with Kubernetes API style.
// +optional
Spec StorageVersionSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
// API server instances report the version they can decode and the version they
// encode objects to when persisting objects in the backend.
// +optional
Status StorageVersionStatus `json:"status" protobuf:"bytes,3,opt,name=status"`
}
@ -67,20 +70,24 @@ type StorageVersionStatus struct {
// encodes objects to when persisting objects in the backend.
type ServerStorageVersion struct {
// The ID of the reporting API server.
// +required
APIServerID string `json:"apiServerID,omitempty" protobuf:"bytes,1,opt,name=apiServerID"`
// The API server encodes the object to this version when persisting it in
// the backend (e.g., etcd).
// +required
EncodingVersion string `json:"encodingVersion,omitempty" protobuf:"bytes,2,opt,name=encodingVersion"`
// The API server can decode objects encoded in these versions.
// The encodingVersion must be included in the decodableVersions.
// +listType=set
// +required
DecodableVersions []string `json:"decodableVersions,omitempty" protobuf:"bytes,3,opt,name=decodableVersions"`
// The API server can serve these versions.
// DecodableVersions must include all ServedVersions.
// +listType=set
// +optional
ServedVersions []string `json:"servedVersions,omitempty" protobuf:"bytes,4,opt,name=servedVersions"`
}
@ -111,6 +118,7 @@ type StorageVersionCondition struct {
// +optional
ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,3,opt,name=observedGeneration"`
// Last time the condition transitioned from one status to another.
// +optional
LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"`
// The reason for the condition's last transition.
// +required

View file

@ -148,7 +148,7 @@ message HorizontalPodAutoscaler {
optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
// spec defines the behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
// +optional
// +required
optional HorizontalPodAutoscalerSpec spec = 2;
// status is the current information about the autoscaler.

View file

@ -97,7 +97,7 @@ type HorizontalPodAutoscaler struct {
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// spec defines the behaviour of autoscaler. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
// +optional
// +required
Spec HorizontalPodAutoscalerSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
// status is the current information about the autoscaler.

View file

@ -175,7 +175,7 @@ message HorizontalPodAutoscaler {
// spec is the specification for the behaviour of the autoscaler.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
// +optional
// +required
optional HorizontalPodAutoscalerSpec spec = 2;
// status is the current information about the autoscaler.

View file

@ -40,7 +40,7 @@ type HorizontalPodAutoscaler struct {
// spec is the specification for the behaviour of the autoscaler.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
// +optional
// +required
Spec HorizontalPodAutoscalerSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
// status is the current information about the autoscaler.

View file

@ -38,7 +38,7 @@ message CronJob {
// Specification of the desired behavior of a cron job, including the schedule.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
// +optional
// +required
optional CronJobSpec spec = 2;
// Current status of a cron job.

View file

@ -686,7 +686,7 @@ type CronJob struct {
// Specification of the desired behavior of a cron job, including the schedule.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
// +optional
// +required
Spec CronJobSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
// Current status of a cron job.

View file

@ -39,7 +39,7 @@ message CronJob {
// Specification of the desired behavior of a cron job, including the schedule.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
// +optional
// +required
optional CronJobSpec spec = 2;
// Current status of a cron job.

View file

@ -52,7 +52,7 @@ type CronJob struct {
// Specification of the desired behavior of a cron job, including the schedule.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
// +optional
// +required
Spec CronJobSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
// Current status of a cron job.

View file

@ -289,6 +289,7 @@ message PodCertificateRequest {
optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
// spec contains the details about the certificate being requested.
// +required
optional PodCertificateRequestSpec spec = 2;
// status contains the issued certificate, and a standard set of conditions.

View file

@ -374,6 +374,7 @@ type PodCertificateRequest struct {
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// spec contains the details about the certificate being requested.
// +required
Spec PodCertificateRequestSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
// status contains the issued certificate, and a standard set of conditions.

View file

@ -38,7 +38,7 @@ message LeaseCandidate {
// spec contains the specification of the Lease.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
// +optional
// +required
optional LeaseCandidateSpec spec = 2;
}

View file

@ -35,7 +35,7 @@ type LeaseCandidate struct {
// spec contains the specification of the Lease.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
// +optional
// +required
Spec LeaseCandidateSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
}

View file

@ -50,7 +50,7 @@ message LeaseCandidate {
// spec contains the specification of the Lease.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
// +optional
// +required
optional LeaseCandidateSpec spec = 2;
}

View file

@ -106,7 +106,7 @@ type LeaseCandidate struct {
// spec contains the specification of the Lease.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
// +optional
// +required
Spec LeaseCandidateSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
}

View file

@ -87,7 +87,7 @@ message IPAddress {
// spec is the desired state of the IPAddress.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
// +optional
// +required
optional IPAddressSpec spec = 2;
}

View file

@ -662,7 +662,7 @@ type IPAddress struct {
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// spec is the desired state of the IPAddress.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
// +optional
// +required
Spec IPAddressSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
}

View file

@ -88,7 +88,7 @@ message IPAddress {
// spec is the desired state of the IPAddress.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
// +optional
// +required
optional IPAddressSpec spec = 2;
}

View file

@ -447,7 +447,7 @@ type IPAddress struct {
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
// spec is the desired state of the IPAddress.
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
// +optional
// +required
Spec IPAddressSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
}

View file

@ -70,6 +70,7 @@ message ClusterRoleBinding {
// RoleRef can only reference a ClusterRole in the global namespace.
// If the RoleRef cannot be resolved, the Authorizer must return an error.
// This field is immutable.
// +required
optional RoleRef roleRef = 3;
}
@ -152,6 +153,7 @@ message RoleBinding {
// RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace.
// If the RoleRef cannot be resolved, the Authorizer must return an error.
// This field is immutable.
// +required
optional RoleRef roleRef = 3;
}

View file

@ -146,6 +146,7 @@ type RoleBinding struct {
// RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace.
// If the RoleRef cannot be resolved, the Authorizer must return an error.
// This field is immutable.
// +required
RoleRef RoleRef `json:"roleRef" protobuf:"bytes,3,opt,name=roleRef"`
}
@ -231,6 +232,7 @@ type ClusterRoleBinding struct {
// RoleRef can only reference a ClusterRole in the global namespace.
// If the RoleRef cannot be resolved, the Authorizer must return an error.
// This field is immutable.
// +required
RoleRef RoleRef `json:"roleRef" protobuf:"bytes,3,opt,name=roleRef"`
}

View file

@ -71,6 +71,7 @@ message ClusterRoleBinding {
// RoleRef can only reference a ClusterRole in the global namespace.
// If the RoleRef cannot be resolved, the Authorizer must return an error.
// +required
optional RoleRef roleRef = 3;
}
@ -156,6 +157,7 @@ message RoleBinding {
// RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace.
// If the RoleRef cannot be resolved, the Authorizer must return an error.
// +required
optional RoleRef roleRef = 3;
}

View file

@ -144,6 +144,7 @@ type RoleBinding struct {
// RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace.
// If the RoleRef cannot be resolved, the Authorizer must return an error.
// +required
RoleRef RoleRef `json:"roleRef" protobuf:"bytes,3,opt,name=roleRef"`
}
@ -228,6 +229,7 @@ type ClusterRoleBinding struct {
// RoleRef can only reference a ClusterRole in the global namespace.
// If the RoleRef cannot be resolved, the Authorizer must return an error.
// +required
RoleRef RoleRef `json:"roleRef" protobuf:"bytes,3,opt,name=roleRef"`
}

View file

@ -71,6 +71,7 @@ message ClusterRoleBinding {
// RoleRef can only reference a ClusterRole in the global namespace.
// If the RoleRef cannot be resolved, the Authorizer must return an error.
// +required
optional RoleRef roleRef = 3;
}
@ -157,6 +158,7 @@ message RoleBinding {
// RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace.
// If the RoleRef cannot be resolved, the Authorizer must return an error.
// +required
optional RoleRef roleRef = 3;
}

View file

@ -152,6 +152,7 @@ type RoleBinding struct {
// RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace.
// If the RoleRef cannot be resolved, the Authorizer must return an error.
// +required
RoleRef RoleRef `json:"roleRef" protobuf:"bytes,3,opt,name=roleRef"`
}
@ -251,6 +252,7 @@ type ClusterRoleBinding struct {
// RoleRef can only reference a ClusterRole in the global namespace.
// If the RoleRef cannot be resolved, the Authorizer must return an error.
// +required
RoleRef RoleRef `json:"roleRef" protobuf:"bytes,3,opt,name=roleRef"`
}

View file

@ -1586,6 +1586,7 @@ message ResourceSlice {
// Contains the information published by the driver.
//
// Changing the spec automatically increments the metadata.generation number.
// +required
optional ResourceSliceSpec spec = 2;
}

View file

@ -79,6 +79,7 @@ type ResourceSlice struct {
// Contains the information published by the driver.
//
// Changing the spec automatically increments the metadata.generation number.
// +required
Spec ResourceSliceSpec `json:"spec" protobuf:"bytes,2,name=spec"`
}

View file

@ -140,6 +140,7 @@ message DeviceTaintRule {
// Spec specifies the selector and one taint.
//
// Changing the spec automatically increments the metadata.generation number.
// +required
optional DeviceTaintRuleSpec spec = 2;
// Status provides information about what was requested in the spec.

View file

@ -201,6 +201,7 @@ type DeviceTaintRule struct {
// Spec specifies the selector and one taint.
//
// Changing the spec automatically increments the metadata.generation number.
// +required
Spec DeviceTaintRuleSpec `json:"spec" protobuf:"bytes,2,name=spec"`
// Status provides information about what was requested in the spec.

View file

@ -1613,6 +1613,7 @@ message ResourceSlice {
// Contains the information published by the driver.
//
// Changing the spec automatically increments the metadata.generation number.
// +required
optional ResourceSliceSpec spec = 2;
}

View file

@ -82,6 +82,7 @@ type ResourceSlice struct {
// Contains the information published by the driver.
//
// Changing the spec automatically increments the metadata.generation number.
// +required
Spec ResourceSliceSpec `json:"spec" protobuf:"bytes,2,name=spec"`
}

View file

@ -1598,6 +1598,7 @@ message ResourceSlice {
// Contains the information published by the driver.
//
// Changing the spec automatically increments the metadata.generation number.
// +required
optional ResourceSliceSpec spec = 2;
}

View file

@ -82,6 +82,7 @@ type ResourceSlice struct {
// Contains the information published by the driver.
//
// Changing the spec automatically increments the metadata.generation number.
// +required
Spec ResourceSliceSpec `json:"spec" protobuf:"bytes,2,name=spec"`
}

View file

@ -510,6 +510,7 @@ message VolumeAttachment {
// spec represents specification of the desired attach/detach volume behavior.
// Populated by the Kubernetes system.
// +k8s:immutable
// +required
optional VolumeAttachmentSpec spec = 2;
// status represents status of the VolumeAttachment request.

View file

@ -134,6 +134,7 @@ type VolumeAttachment struct {
// spec represents specification of the desired attach/detach volume behavior.
// Populated by the Kubernetes system.
// +k8s:immutable
// +required
Spec VolumeAttachmentSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
// status represents status of the VolumeAttachment request.

View file

@ -135,6 +135,7 @@ message VolumeAttachment {
// spec represents specification of the desired attach/detach volume behavior.
// Populated by the Kubernetes system.
// +k8s:immutable
// +required
optional VolumeAttachmentSpec spec = 2;
// status represents status of the VolumeAttachment request.

View file

@ -45,6 +45,7 @@ type VolumeAttachment struct {
// spec represents specification of the desired attach/detach volume behavior.
// Populated by the Kubernetes system.
// +k8s:immutable
// +required
Spec VolumeAttachmentSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
// status represents status of the VolumeAttachment request.

View file

@ -512,6 +512,7 @@ message VolumeAttachment {
// spec represents specification of the desired attach/detach volume behavior.
// Populated by the Kubernetes system.
// +k8s:immutable
// +required
optional VolumeAttachmentSpec spec = 2;
// status represents status of the VolumeAttachment request.

View file

@ -139,6 +139,7 @@ type VolumeAttachment struct {
// spec represents specification of the desired attach/detach volume behavior.
// Populated by the Kubernetes system.
// +k8s:immutable
// +required
Spec VolumeAttachmentSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
// status represents status of the VolumeAttachment request.

View file

@ -425,6 +425,7 @@ func schema_k8sio_api_autoscaling_v1_HorizontalPodAutoscaler(ref common.Referenc
},
},
},
Required: []string{"spec"},
},
},
Dependencies: []string{