repo
stringlengths
6
47
file_url
stringlengths
77
269
file_path
stringlengths
5
186
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-07 08:35:43
2026-01-07 08:55:24
truncated
bool
2 classes
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/core/v1/generated.pb.go
vendor/k8s.io/api/core/v1/generated.pb.go
/* Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: k8s.io/api/core/v1/generated.proto package v1 import ( fmt "fmt" io "io" proto "github.com/gogo/protobuf/proto" github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" resource "k8s.io/apimachinery/pkg/api/resource" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" math "math" math_bits "math/bits" reflect "reflect" strings "strings" k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *AWSElasticBlockStoreVolumeSource) Reset() { *m = AWSElasticBlockStoreVolumeSource{} } func (*AWSElasticBlockStoreVolumeSource) ProtoMessage() {} func (*AWSElasticBlockStoreVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptor_6c07b07c062484ab, []int{0} } func (m *AWSElasticBlockStoreVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *AWSElasticBlockStoreVolumeSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *AWSElasticBlockStoreVolumeSource) XXX_Merge(src proto.Message) { xxx_messageInfo_AWSElasticBlockStoreVolumeSource.Merge(m, src) } func (m *AWSElasticBlockStoreVolumeSource) XXX_Size() int { return m.Size() } func (m *AWSElasticBlockStoreVolumeSource) XXX_DiscardUnknown() { xxx_messageInfo_AWSElasticBlockStoreVolumeSource.DiscardUnknown(m) } var xxx_messageInfo_AWSElasticBlockStoreVolumeSource proto.InternalMessageInfo func (m *Affinity) Reset() { *m = Affinity{} } func (*Affinity) ProtoMessage() {} func (*Affinity) Descriptor() ([]byte, []int) { return fileDescriptor_6c07b07c062484ab, []int{1} } func (m *Affinity) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *Affinity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *Affinity) XXX_Merge(src proto.Message) { xxx_messageInfo_Affinity.Merge(m, src) } func (m *Affinity) XXX_Size() int { return m.Size() } func (m *Affinity) XXX_DiscardUnknown() { xxx_messageInfo_Affinity.DiscardUnknown(m) } var xxx_messageInfo_Affinity proto.InternalMessageInfo func (m *AppArmorProfile) Reset() { *m = AppArmorProfile{} } func (*AppArmorProfile) ProtoMessage() {} func (*AppArmorProfile) Descriptor() ([]byte, []int) { return fileDescriptor_6c07b07c062484ab, []int{2} } func (m *AppArmorProfile) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *AppArmorProfile) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *AppArmorProfile) XXX_Merge(src proto.Message) { xxx_messageInfo_AppArmorProfile.Merge(m, src) } func (m *AppArmorProfile) XXX_Size() int { return m.Size() } func (m *AppArmorProfile) XXX_DiscardUnknown() { xxx_messageInfo_AppArmorProfile.DiscardUnknown(m) } var xxx_messageInfo_AppArmorProfile proto.InternalMessageInfo func (m *AttachedVolume) Reset() { *m = AttachedVolume{} } func (*AttachedVolume) ProtoMessage() {} func (*AttachedVolume) Descriptor() ([]byte, []int) { return fileDescriptor_6c07b07c062484ab, []int{3} } func (m *AttachedVolume) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *AttachedVolume) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *AttachedVolume) XXX_Merge(src proto.Message) { xxx_messageInfo_AttachedVolume.Merge(m, src) } func (m *AttachedVolume) XXX_Size() int { return m.Size() } func (m *AttachedVolume) XXX_DiscardUnknown() { xxx_messageInfo_AttachedVolume.DiscardUnknown(m) } var xxx_messageInfo_AttachedVolume proto.InternalMessageInfo func (m *AvoidPods) Reset() { *m = AvoidPods{} } func (*AvoidPods) ProtoMessage() {} func (*AvoidPods) Descriptor() ([]byte, []int) { return fileDescriptor_6c07b07c062484ab, []int{4} } func (m *AvoidPods) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *AvoidPods) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *AvoidPods) XXX_Merge(src proto.Message) { xxx_messageInfo_AvoidPods.Merge(m, src) } func (m *AvoidPods) XXX_Size() int { return m.Size() } func (m *AvoidPods) XXX_DiscardUnknown() { xxx_messageInfo_AvoidPods.DiscardUnknown(m) } var xxx_messageInfo_AvoidPods proto.InternalMessageInfo func (m *AzureDiskVolumeSource) Reset() { *m = AzureDiskVolumeSource{} } func (*AzureDiskVolumeSource) ProtoMessage() {} func (*AzureDiskVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptor_6c07b07c062484ab, []int{5} } func (m *AzureDiskVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *AzureDiskVolumeSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *AzureDiskVolumeSource) XXX_Merge(src proto.Message) { xxx_messageInfo_AzureDiskVolumeSource.Merge(m, src) } func (m *AzureDiskVolumeSource) XXX_Size() int { return m.Size() } func (m *AzureDiskVolumeSource) XXX_DiscardUnknown() { xxx_messageInfo_AzureDiskVolumeSource.DiscardUnknown(m) } var xxx_messageInfo_AzureDiskVolumeSource proto.InternalMessageInfo func (m *AzureFilePersistentVolumeSource) Reset() { *m = AzureFilePersistentVolumeSource{} } func (*AzureFilePersistentVolumeSource) ProtoMessage() {} func (*AzureFilePersistentVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptor_6c07b07c062484ab, []int{6} } func (m *AzureFilePersistentVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *AzureFilePersistentVolumeSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *AzureFilePersistentVolumeSource) XXX_Merge(src proto.Message) { xxx_messageInfo_AzureFilePersistentVolumeSource.Merge(m, src) } func (m *AzureFilePersistentVolumeSource) XXX_Size() int { return m.Size() } func (m *AzureFilePersistentVolumeSource) XXX_DiscardUnknown() { xxx_messageInfo_AzureFilePersistentVolumeSource.DiscardUnknown(m) } var xxx_messageInfo_AzureFilePersistentVolumeSource proto.InternalMessageInfo func (m *AzureFileVolumeSource) Reset() { *m = AzureFileVolumeSource{} } func (*AzureFileVolumeSource) ProtoMessage() {} func (*AzureFileVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptor_6c07b07c062484ab, []int{7} } func (m *AzureFileVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *AzureFileVolumeSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *AzureFileVolumeSource) XXX_Merge(src proto.Message) { xxx_messageInfo_AzureFileVolumeSource.Merge(m, src) } func (m *AzureFileVolumeSource) XXX_Size() int { return m.Size() } func (m *AzureFileVolumeSource) XXX_DiscardUnknown() { xxx_messageInfo_AzureFileVolumeSource.DiscardUnknown(m) } var xxx_messageInfo_AzureFileVolumeSource proto.InternalMessageInfo func (m *Binding) Reset() { *m = Binding{} } func (*Binding) ProtoMessage() {} func (*Binding) Descriptor() ([]byte, []int) { return fileDescriptor_6c07b07c062484ab, []int{8} } func (m *Binding) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *Binding) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *Binding) XXX_Merge(src proto.Message) { xxx_messageInfo_Binding.Merge(m, src) } func (m *Binding) XXX_Size() int { return m.Size() } func (m *Binding) XXX_DiscardUnknown() { xxx_messageInfo_Binding.DiscardUnknown(m) } var xxx_messageInfo_Binding proto.InternalMessageInfo func (m *CSIPersistentVolumeSource) Reset() { *m = CSIPersistentVolumeSource{} } func (*CSIPersistentVolumeSource) ProtoMessage() {} func (*CSIPersistentVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptor_6c07b07c062484ab, []int{9} } func (m *CSIPersistentVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *CSIPersistentVolumeSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *CSIPersistentVolumeSource) XXX_Merge(src proto.Message) { xxx_messageInfo_CSIPersistentVolumeSource.Merge(m, src) } func (m *CSIPersistentVolumeSource) XXX_Size() int { return m.Size() } func (m *CSIPersistentVolumeSource) XXX_DiscardUnknown() { xxx_messageInfo_CSIPersistentVolumeSource.DiscardUnknown(m) } var xxx_messageInfo_CSIPersistentVolumeSource proto.InternalMessageInfo func (m *CSIVolumeSource) Reset() { *m = CSIVolumeSource{} } func (*CSIVolumeSource) ProtoMessage() {} func (*CSIVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptor_6c07b07c062484ab, []int{10} } func (m *CSIVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *CSIVolumeSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *CSIVolumeSource) XXX_Merge(src proto.Message) { xxx_messageInfo_CSIVolumeSource.Merge(m, src) } func (m *CSIVolumeSource) XXX_Size() int { return m.Size() } func (m *CSIVolumeSource) XXX_DiscardUnknown() { xxx_messageInfo_CSIVolumeSource.DiscardUnknown(m) } var xxx_messageInfo_CSIVolumeSource proto.InternalMessageInfo func (m *Capabilities) Reset() { *m = Capabilities{} } func (*Capabilities) ProtoMessage() {} func (*Capabilities) Descriptor() ([]byte, []int) { return fileDescriptor_6c07b07c062484ab, []int{11} } func (m *Capabilities) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *Capabilities) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *Capabilities) XXX_Merge(src proto.Message) { xxx_messageInfo_Capabilities.Merge(m, src) } func (m *Capabilities) XXX_Size() int { return m.Size() } func (m *Capabilities) XXX_DiscardUnknown() { xxx_messageInfo_Capabilities.DiscardUnknown(m) } var xxx_messageInfo_Capabilities proto.InternalMessageInfo func (m *CephFSPersistentVolumeSource) Reset() { *m = CephFSPersistentVolumeSource{} } func (*CephFSPersistentVolumeSource) ProtoMessage() {} func (*CephFSPersistentVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptor_6c07b07c062484ab, []int{12} } func (m *CephFSPersistentVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *CephFSPersistentVolumeSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *CephFSPersistentVolumeSource) XXX_Merge(src proto.Message) { xxx_messageInfo_CephFSPersistentVolumeSource.Merge(m, src) } func (m *CephFSPersistentVolumeSource) XXX_Size() int { return m.Size() } func (m *CephFSPersistentVolumeSource) XXX_DiscardUnknown() { xxx_messageInfo_CephFSPersistentVolumeSource.DiscardUnknown(m) } var xxx_messageInfo_CephFSPersistentVolumeSource proto.InternalMessageInfo func (m *CephFSVolumeSource) Reset() { *m = CephFSVolumeSource{} } func (*CephFSVolumeSource) ProtoMessage() {} func (*CephFSVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptor_6c07b07c062484ab, []int{13} } func (m *CephFSVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *CephFSVolumeSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *CephFSVolumeSource) XXX_Merge(src proto.Message) { xxx_messageInfo_CephFSVolumeSource.Merge(m, src) } func (m *CephFSVolumeSource) XXX_Size() int { return m.Size() } func (m *CephFSVolumeSource) XXX_DiscardUnknown() { xxx_messageInfo_CephFSVolumeSource.DiscardUnknown(m) } var xxx_messageInfo_CephFSVolumeSource proto.InternalMessageInfo func (m *CinderPersistentVolumeSource) Reset() { *m = CinderPersistentVolumeSource{} } func (*CinderPersistentVolumeSource) ProtoMessage() {} func (*CinderPersistentVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptor_6c07b07c062484ab, []int{14} } func (m *CinderPersistentVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *CinderPersistentVolumeSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *CinderPersistentVolumeSource) XXX_Merge(src proto.Message) { xxx_messageInfo_CinderPersistentVolumeSource.Merge(m, src) } func (m *CinderPersistentVolumeSource) XXX_Size() int { return m.Size() } func (m *CinderPersistentVolumeSource) XXX_DiscardUnknown() { xxx_messageInfo_CinderPersistentVolumeSource.DiscardUnknown(m) } var xxx_messageInfo_CinderPersistentVolumeSource proto.InternalMessageInfo func (m *CinderVolumeSource) Reset() { *m = CinderVolumeSource{} } func (*CinderVolumeSource) ProtoMessage() {} func (*CinderVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptor_6c07b07c062484ab, []int{15} } func (m *CinderVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *CinderVolumeSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *CinderVolumeSource) XXX_Merge(src proto.Message) { xxx_messageInfo_CinderVolumeSource.Merge(m, src) } func (m *CinderVolumeSource) XXX_Size() int { return m.Size() } func (m *CinderVolumeSource) XXX_DiscardUnknown() { xxx_messageInfo_CinderVolumeSource.DiscardUnknown(m) } var xxx_messageInfo_CinderVolumeSource proto.InternalMessageInfo func (m *ClientIPConfig) Reset() { *m = ClientIPConfig{} } func (*ClientIPConfig) ProtoMessage() {} func (*ClientIPConfig) Descriptor() ([]byte, []int) { return fileDescriptor_6c07b07c062484ab, []int{16} } func (m *ClientIPConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ClientIPConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ClientIPConfig) XXX_Merge(src proto.Message) { xxx_messageInfo_ClientIPConfig.Merge(m, src) } func (m *ClientIPConfig) XXX_Size() int { return m.Size() } func (m *ClientIPConfig) XXX_DiscardUnknown() { xxx_messageInfo_ClientIPConfig.DiscardUnknown(m) } var xxx_messageInfo_ClientIPConfig proto.InternalMessageInfo func (m *ClusterTrustBundleProjection) Reset() { *m = ClusterTrustBundleProjection{} } func (*ClusterTrustBundleProjection) ProtoMessage() {} func (*ClusterTrustBundleProjection) Descriptor() ([]byte, []int) { return fileDescriptor_6c07b07c062484ab, []int{17} } func (m *ClusterTrustBundleProjection) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ClusterTrustBundleProjection) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ClusterTrustBundleProjection) XXX_Merge(src proto.Message) { xxx_messageInfo_ClusterTrustBundleProjection.Merge(m, src) } func (m *ClusterTrustBundleProjection) XXX_Size() int { return m.Size() } func (m *ClusterTrustBundleProjection) XXX_DiscardUnknown() { xxx_messageInfo_ClusterTrustBundleProjection.DiscardUnknown(m) } var xxx_messageInfo_ClusterTrustBundleProjection proto.InternalMessageInfo func (m *ComponentCondition) Reset() { *m = ComponentCondition{} } func (*ComponentCondition) ProtoMessage() {} func (*ComponentCondition) Descriptor() ([]byte, []int) { return fileDescriptor_6c07b07c062484ab, []int{18} } func (m *ComponentCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ComponentCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ComponentCondition) XXX_Merge(src proto.Message) { xxx_messageInfo_ComponentCondition.Merge(m, src) } func (m *ComponentCondition) XXX_Size() int { return m.Size() } func (m *ComponentCondition) XXX_DiscardUnknown() { xxx_messageInfo_ComponentCondition.DiscardUnknown(m) } var xxx_messageInfo_ComponentCondition proto.InternalMessageInfo func (m *ComponentStatus) Reset() { *m = ComponentStatus{} } func (*ComponentStatus) ProtoMessage() {} func (*ComponentStatus) Descriptor() ([]byte, []int) { return fileDescriptor_6c07b07c062484ab, []int{19} } func (m *ComponentStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ComponentStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ComponentStatus) XXX_Merge(src proto.Message) { xxx_messageInfo_ComponentStatus.Merge(m, src) } func (m *ComponentStatus) XXX_Size() int { return m.Size() } func (m *ComponentStatus) XXX_DiscardUnknown() { xxx_messageInfo_ComponentStatus.DiscardUnknown(m) } var xxx_messageInfo_ComponentStatus proto.InternalMessageInfo func (m *ComponentStatusList) Reset() { *m = ComponentStatusList{} } func (*ComponentStatusList) ProtoMessage() {} func (*ComponentStatusList) Descriptor() ([]byte, []int) { return fileDescriptor_6c07b07c062484ab, []int{20} } func (m *ComponentStatusList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ComponentStatusList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ComponentStatusList) XXX_Merge(src proto.Message) { xxx_messageInfo_ComponentStatusList.Merge(m, src) } func (m *ComponentStatusList) XXX_Size() int { return m.Size() } func (m *ComponentStatusList) XXX_DiscardUnknown() { xxx_messageInfo_ComponentStatusList.DiscardUnknown(m) } var xxx_messageInfo_ComponentStatusList proto.InternalMessageInfo func (m *ConfigMap) Reset() { *m = ConfigMap{} } func (*ConfigMap) ProtoMessage() {} func (*ConfigMap) Descriptor() ([]byte, []int) { return fileDescriptor_6c07b07c062484ab, []int{21} } func (m *ConfigMap) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ConfigMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ConfigMap) XXX_Merge(src proto.Message) { xxx_messageInfo_ConfigMap.Merge(m, src) } func (m *ConfigMap) XXX_Size() int { return m.Size() } func (m *ConfigMap) XXX_DiscardUnknown() { xxx_messageInfo_ConfigMap.DiscardUnknown(m) } var xxx_messageInfo_ConfigMap proto.InternalMessageInfo func (m *ConfigMapEnvSource) Reset() { *m = ConfigMapEnvSource{} } func (*ConfigMapEnvSource) ProtoMessage() {} func (*ConfigMapEnvSource) Descriptor() ([]byte, []int) { return fileDescriptor_6c07b07c062484ab, []int{22} } func (m *ConfigMapEnvSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ConfigMapEnvSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ConfigMapEnvSource) XXX_Merge(src proto.Message) { xxx_messageInfo_ConfigMapEnvSource.Merge(m, src) } func (m *ConfigMapEnvSource) XXX_Size() int { return m.Size() } func (m *ConfigMapEnvSource) XXX_DiscardUnknown() { xxx_messageInfo_ConfigMapEnvSource.DiscardUnknown(m) } var xxx_messageInfo_ConfigMapEnvSource proto.InternalMessageInfo func (m *ConfigMapKeySelector) Reset() { *m = ConfigMapKeySelector{} } func (*ConfigMapKeySelector) ProtoMessage() {} func (*ConfigMapKeySelector) Descriptor() ([]byte, []int) { return fileDescriptor_6c07b07c062484ab, []int{23} } func (m *ConfigMapKeySelector) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ConfigMapKeySelector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ConfigMapKeySelector) XXX_Merge(src proto.Message) { xxx_messageInfo_ConfigMapKeySelector.Merge(m, src) } func (m *ConfigMapKeySelector) XXX_Size() int { return m.Size() } func (m *ConfigMapKeySelector) XXX_DiscardUnknown() { xxx_messageInfo_ConfigMapKeySelector.DiscardUnknown(m) } var xxx_messageInfo_ConfigMapKeySelector proto.InternalMessageInfo func (m *ConfigMapList) Reset() { *m = ConfigMapList{} } func (*ConfigMapList) ProtoMessage() {} func (*ConfigMapList) Descriptor() ([]byte, []int) { return fileDescriptor_6c07b07c062484ab, []int{24} } func (m *ConfigMapList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ConfigMapList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ConfigMapList) XXX_Merge(src proto.Message) { xxx_messageInfo_ConfigMapList.Merge(m, src) } func (m *ConfigMapList) XXX_Size() int { return m.Size() } func (m *ConfigMapList) XXX_DiscardUnknown() { xxx_messageInfo_ConfigMapList.DiscardUnknown(m) } var xxx_messageInfo_ConfigMapList proto.InternalMessageInfo func (m *ConfigMapNodeConfigSource) Reset() { *m = ConfigMapNodeConfigSource{} } func (*ConfigMapNodeConfigSource) ProtoMessage() {} func (*ConfigMapNodeConfigSource) Descriptor() ([]byte, []int) { return fileDescriptor_6c07b07c062484ab, []int{25} } func (m *ConfigMapNodeConfigSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ConfigMapNodeConfigSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ConfigMapNodeConfigSource) XXX_Merge(src proto.Message) { xxx_messageInfo_ConfigMapNodeConfigSource.Merge(m, src) } func (m *ConfigMapNodeConfigSource) XXX_Size() int { return m.Size() } func (m *ConfigMapNodeConfigSource) XXX_DiscardUnknown() { xxx_messageInfo_ConfigMapNodeConfigSource.DiscardUnknown(m) } var xxx_messageInfo_ConfigMapNodeConfigSource proto.InternalMessageInfo func (m *ConfigMapProjection) Reset() { *m = ConfigMapProjection{} } func (*ConfigMapProjection) ProtoMessage() {} func (*ConfigMapProjection) Descriptor() ([]byte, []int) { return fileDescriptor_6c07b07c062484ab, []int{26} } func (m *ConfigMapProjection) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ConfigMapProjection) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ConfigMapProjection) XXX_Merge(src proto.Message) { xxx_messageInfo_ConfigMapProjection.Merge(m, src) } func (m *ConfigMapProjection) XXX_Size() int { return m.Size() } func (m *ConfigMapProjection) XXX_DiscardUnknown() { xxx_messageInfo_ConfigMapProjection.DiscardUnknown(m) } var xxx_messageInfo_ConfigMapProjection proto.InternalMessageInfo func (m *ConfigMapVolumeSource) Reset() { *m = ConfigMapVolumeSource{} } func (*ConfigMapVolumeSource) ProtoMessage() {} func (*ConfigMapVolumeSource) Descriptor() ([]byte, []int) { return fileDescriptor_6c07b07c062484ab, []int{27} } func (m *ConfigMapVolumeSource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ConfigMapVolumeSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ConfigMapVolumeSource) XXX_Merge(src proto.Message) { xxx_messageInfo_ConfigMapVolumeSource.Merge(m, src) } func (m *ConfigMapVolumeSource) XXX_Size() int { return m.Size() } func (m *ConfigMapVolumeSource) XXX_DiscardUnknown() { xxx_messageInfo_ConfigMapVolumeSource.DiscardUnknown(m) } var xxx_messageInfo_ConfigMapVolumeSource proto.InternalMessageInfo func (m *Container) Reset() { *m = Container{} } func (*Container) ProtoMessage() {} func (*Container) Descriptor() ([]byte, []int) { return fileDescriptor_6c07b07c062484ab, []int{28} } func (m *Container) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *Container) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *Container) XXX_Merge(src proto.Message) { xxx_messageInfo_Container.Merge(m, src) } func (m *Container) XXX_Size() int { return m.Size() } func (m *Container) XXX_DiscardUnknown() { xxx_messageInfo_Container.DiscardUnknown(m) } var xxx_messageInfo_Container proto.InternalMessageInfo func (m *ContainerImage) Reset() { *m = ContainerImage{} } func (*ContainerImage) ProtoMessage() {} func (*ContainerImage) Descriptor() ([]byte, []int) { return fileDescriptor_6c07b07c062484ab, []int{29} } func (m *ContainerImage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ContainerImage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ContainerImage) XXX_Merge(src proto.Message) { xxx_messageInfo_ContainerImage.Merge(m, src) } func (m *ContainerImage) XXX_Size() int { return m.Size() } func (m *ContainerImage) XXX_DiscardUnknown() { xxx_messageInfo_ContainerImage.DiscardUnknown(m) } var xxx_messageInfo_ContainerImage proto.InternalMessageInfo func (m *ContainerPort) Reset() { *m = ContainerPort{} } func (*ContainerPort) ProtoMessage() {} func (*ContainerPort) Descriptor() ([]byte, []int) { return fileDescriptor_6c07b07c062484ab, []int{30} } func (m *ContainerPort) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ContainerPort) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ContainerPort) XXX_Merge(src proto.Message) { xxx_messageInfo_ContainerPort.Merge(m, src) } func (m *ContainerPort) XXX_Size() int { return m.Size() } func (m *ContainerPort) XXX_DiscardUnknown() { xxx_messageInfo_ContainerPort.DiscardUnknown(m) } var xxx_messageInfo_ContainerPort proto.InternalMessageInfo func (m *ContainerResizePolicy) Reset() { *m = ContainerResizePolicy{} } func (*ContainerResizePolicy) ProtoMessage() {} func (*ContainerResizePolicy) Descriptor() ([]byte, []int) { return fileDescriptor_6c07b07c062484ab, []int{31} } func (m *ContainerResizePolicy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ContainerResizePolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ContainerResizePolicy) XXX_Merge(src proto.Message) { xxx_messageInfo_ContainerResizePolicy.Merge(m, src) } func (m *ContainerResizePolicy) XXX_Size() int { return m.Size() } func (m *ContainerResizePolicy) XXX_DiscardUnknown() { xxx_messageInfo_ContainerResizePolicy.DiscardUnknown(m) } var xxx_messageInfo_ContainerResizePolicy proto.InternalMessageInfo func (m *ContainerState) Reset() { *m = ContainerState{} } func (*ContainerState) ProtoMessage() {} func (*ContainerState) Descriptor() ([]byte, []int) { return fileDescriptor_6c07b07c062484ab, []int{32} } func (m *ContainerState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ContainerState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ContainerState) XXX_Merge(src proto.Message) { xxx_messageInfo_ContainerState.Merge(m, src) } func (m *ContainerState) XXX_Size() int { return m.Size() } func (m *ContainerState) XXX_DiscardUnknown() { xxx_messageInfo_ContainerState.DiscardUnknown(m) } var xxx_messageInfo_ContainerState proto.InternalMessageInfo func (m *ContainerStateRunning) Reset() { *m = ContainerStateRunning{} } func (*ContainerStateRunning) ProtoMessage() {} func (*ContainerStateRunning) Descriptor() ([]byte, []int) { return fileDescriptor_6c07b07c062484ab, []int{33} } func (m *ContainerStateRunning) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ContainerStateRunning) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ContainerStateRunning) XXX_Merge(src proto.Message) { xxx_messageInfo_ContainerStateRunning.Merge(m, src) } func (m *ContainerStateRunning) XXX_Size() int { return m.Size() } func (m *ContainerStateRunning) XXX_DiscardUnknown() { xxx_messageInfo_ContainerStateRunning.DiscardUnknown(m) } var xxx_messageInfo_ContainerStateRunning proto.InternalMessageInfo func (m *ContainerStateTerminated) Reset() { *m = ContainerStateTerminated{} } func (*ContainerStateTerminated) ProtoMessage() {} func (*ContainerStateTerminated) Descriptor() ([]byte, []int) { return fileDescriptor_6c07b07c062484ab, []int{34} } func (m *ContainerStateTerminated) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ContainerStateTerminated) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ContainerStateTerminated) XXX_Merge(src proto.Message) { xxx_messageInfo_ContainerStateTerminated.Merge(m, src) } func (m *ContainerStateTerminated) XXX_Size() int { return m.Size() } func (m *ContainerStateTerminated) XXX_DiscardUnknown() { xxx_messageInfo_ContainerStateTerminated.DiscardUnknown(m) } var xxx_messageInfo_ContainerStateTerminated proto.InternalMessageInfo func (m *ContainerStateWaiting) Reset() { *m = ContainerStateWaiting{} } func (*ContainerStateWaiting) ProtoMessage() {} func (*ContainerStateWaiting) Descriptor() ([]byte, []int) { return fileDescriptor_6c07b07c062484ab, []int{35} } func (m *ContainerStateWaiting) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ContainerStateWaiting) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ContainerStateWaiting) XXX_Merge(src proto.Message) { xxx_messageInfo_ContainerStateWaiting.Merge(m, src) } func (m *ContainerStateWaiting) XXX_Size() int { return m.Size() } func (m *ContainerStateWaiting) XXX_DiscardUnknown() {
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
true
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/core/v1/objectreference.go
vendor/k8s.io/api/core/v1/objectreference.go
/* Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package v1 import ( "k8s.io/apimachinery/pkg/runtime/schema" ) // SetGroupVersionKind allows clients to preemptively get a reference to an API object and pass it to places that // intend only to get a reference to that object. This simplifies the event recording interface. func (obj *ObjectReference) SetGroupVersionKind(gvk schema.GroupVersionKind) { obj.APIVersion, obj.Kind = gvk.ToAPIVersionAndKind() } func (obj *ObjectReference) GroupVersionKind() schema.GroupVersionKind { return schema.FromAPIVersionAndKind(obj.APIVersion, obj.Kind) } func (obj *ObjectReference) GetObjectKind() schema.ObjectKind { return obj }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/apiserverinternal/v1alpha1/types_swagger_doc_generated.go
vendor/k8s.io/api/apiserverinternal/v1alpha1/types_swagger_doc_generated.go
/* Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package v1alpha1 // This file contains a collection of methods that can be used from go-restful to // generate Swagger API documentation for its models. Please read this PR for more // information on the implementation: https://github.com/emicklei/go-restful/pull/215 // // TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if // they are on one line! For multiple line or blocks that you want to ignore use ---. // Any context after a --- is ignored. // // Those methods can be generated by using hack/update-codegen.sh // AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_ServerStorageVersion = map[string]string{ "": "An API server instance reports the version it can decode and the version it encodes objects to when persisting objects in the backend.", "apiServerID": "The ID of the reporting API server.", "encodingVersion": "The API server encodes the object to this version when persisting it in the backend (e.g., etcd).", "decodableVersions": "The API server can decode objects encoded in these versions. The encodingVersion must be included in the decodableVersions.", "servedVersions": "The API server can serve these versions. DecodableVersions must include all ServedVersions.", } func (ServerStorageVersion) SwaggerDoc() map[string]string { return map_ServerStorageVersion } var map_StorageVersion = map[string]string{ "": "Storage version of a specific resource.", "metadata": "The name is <group>.<resource>.", "spec": "Spec is an empty spec. It is here to comply with Kubernetes API style.", "status": "API server instances report the version they can decode and the version they encode objects to when persisting objects in the backend.", } func (StorageVersion) SwaggerDoc() map[string]string { return map_StorageVersion } var map_StorageVersionCondition = map[string]string{ "": "Describes the state of the storageVersion at a certain point.", "type": "Type of the condition.", "status": "Status of the condition, one of True, False, Unknown.", "observedGeneration": "If set, this represents the .metadata.generation that the condition was set based upon.", "lastTransitionTime": "Last time the condition transitioned from one status to another.", "reason": "The reason for the condition's last transition.", "message": "A human readable message indicating details about the transition.", } func (StorageVersionCondition) SwaggerDoc() map[string]string { return map_StorageVersionCondition } var map_StorageVersionList = map[string]string{ "": "A list of StorageVersions.", "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "items": "Items holds a list of StorageVersion", } func (StorageVersionList) SwaggerDoc() map[string]string { return map_StorageVersionList } var map_StorageVersionSpec = map[string]string{ "": "StorageVersionSpec is an empty spec.", } func (StorageVersionSpec) SwaggerDoc() map[string]string { return map_StorageVersionSpec } var map_StorageVersionStatus = map[string]string{ "": "API server instances report the versions they can decode and the version they encode objects to when persisting objects in the backend.", "storageVersions": "The reported versions per API server instance.", "commonEncodingVersion": "If all API server instances agree on the same encoding storage version, then this field is set to that version. Otherwise this field is left empty. API servers should finish updating its storageVersionStatus entry before serving write operations, so that this field will be in sync with the reality.", "conditions": "The latest available observations of the storageVersion's state.", } func (StorageVersionStatus) SwaggerDoc() map[string]string { return map_StorageVersionStatus } // AUTO-GENERATED FUNCTIONS END HERE
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/apiserverinternal/v1alpha1/zz_generated.deepcopy.go
vendor/k8s.io/api/apiserverinternal/v1alpha1/zz_generated.deepcopy.go
//go:build !ignore_autogenerated // +build !ignore_autogenerated /* Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Code generated by deepcopy-gen. DO NOT EDIT. package v1alpha1 import ( runtime "k8s.io/apimachinery/pkg/runtime" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ServerStorageVersion) DeepCopyInto(out *ServerStorageVersion) { *out = *in if in.DecodableVersions != nil { in, out := &in.DecodableVersions, &out.DecodableVersions *out = make([]string, len(*in)) copy(*out, *in) } if in.ServedVersions != nil { in, out := &in.ServedVersions, &out.ServedVersions *out = make([]string, len(*in)) copy(*out, *in) } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerStorageVersion. func (in *ServerStorageVersion) DeepCopy() *ServerStorageVersion { if in == nil { return nil } out := new(ServerStorageVersion) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *StorageVersion) DeepCopyInto(out *StorageVersion) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) out.Spec = in.Spec in.Status.DeepCopyInto(&out.Status) return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageVersion. func (in *StorageVersion) DeepCopy() *StorageVersion { if in == nil { return nil } out := new(StorageVersion) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. func (in *StorageVersion) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *StorageVersionCondition) DeepCopyInto(out *StorageVersionCondition) { *out = *in in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageVersionCondition. func (in *StorageVersionCondition) DeepCopy() *StorageVersionCondition { if in == nil { return nil } out := new(StorageVersionCondition) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *StorageVersionList) DeepCopyInto(out *StorageVersionList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]StorageVersion, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageVersionList. func (in *StorageVersionList) DeepCopy() *StorageVersionList { if in == nil { return nil } out := new(StorageVersionList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. func (in *StorageVersionList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *StorageVersionSpec) DeepCopyInto(out *StorageVersionSpec) { *out = *in return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageVersionSpec. func (in *StorageVersionSpec) DeepCopy() *StorageVersionSpec { if in == nil { return nil } out := new(StorageVersionSpec) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *StorageVersionStatus) DeepCopyInto(out *StorageVersionStatus) { *out = *in if in.StorageVersions != nil { in, out := &in.StorageVersions, &out.StorageVersions *out = make([]ServerStorageVersion, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.CommonEncodingVersion != nil { in, out := &in.CommonEncodingVersion, &out.CommonEncodingVersion *out = new(string) **out = **in } if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions *out = make([]StorageVersionCondition, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageVersionStatus. func (in *StorageVersionStatus) DeepCopy() *StorageVersionStatus { if in == nil { return nil } out := new(StorageVersionStatus) in.DeepCopyInto(out) return out }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/apiserverinternal/v1alpha1/types.go
vendor/k8s.io/api/apiserverinternal/v1alpha1/types.go
/* Copyright 2019 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package v1alpha1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // +genclient // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // Storage version of a specific resource. type StorageVersion struct { metav1.TypeMeta `json:",inline"` // The name is <group>.<resource>. 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. 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. Status StorageVersionStatus `json:"status" protobuf:"bytes,3,opt,name=status"` } // StorageVersionSpec is an empty spec. type StorageVersionSpec struct{} // API server instances report the versions they can decode and the version they // encode objects to when persisting objects in the backend. type StorageVersionStatus struct { // The reported versions per API server instance. // +optional // +listType=map // +listMapKey=apiServerID StorageVersions []ServerStorageVersion `json:"storageVersions,omitempty" protobuf:"bytes,1,opt,name=storageVersions"` // If all API server instances agree on the same encoding storage version, // then this field is set to that version. Otherwise this field is left empty. // API servers should finish updating its storageVersionStatus entry before // serving write operations, so that this field will be in sync with the reality. // +optional CommonEncodingVersion *string `json:"commonEncodingVersion,omitempty" protobuf:"bytes,2,opt,name=commonEncodingVersion"` // The latest available observations of the storageVersion's state. // +optional // +listType=map // +listMapKey=type Conditions []StorageVersionCondition `json:"conditions,omitempty" protobuf:"bytes,3,opt,name=conditions"` } // An API server instance reports the version it can decode and the version it // encodes objects to when persisting objects in the backend. type ServerStorageVersion struct { // The ID of the reporting API server. 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). 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 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 ServedVersions []string `json:"servedVersions,omitempty" protobuf:"bytes,4,opt,name=servedVersions"` } type StorageVersionConditionType string const ( // Indicates that encoding storage versions reported by all servers are equal. AllEncodingVersionsEqual StorageVersionConditionType = "AllEncodingVersionsEqual" ) type ConditionStatus string const ( ConditionTrue ConditionStatus = "True" ConditionFalse ConditionStatus = "False" ConditionUnknown ConditionStatus = "Unknown" ) // Describes the state of the storageVersion at a certain point. type StorageVersionCondition struct { // Type of the condition. // +required Type StorageVersionConditionType `json:"type" protobuf:"bytes,1,opt,name=type"` // Status of the condition, one of True, False, Unknown. // +required Status ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status"` // If set, this represents the .metadata.generation that the condition was set based upon. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,3,opt,name=observedGeneration"` // Last time the condition transitioned from one status to another. LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"` // The reason for the condition's last transition. // +required Reason string `json:"reason" protobuf:"bytes,5,opt,name=reason"` // A human readable message indicating details about the transition. // +required Message string `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // A list of StorageVersions. type StorageVersionList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Items holds a list of StorageVersion Items []StorageVersion `json:"items" protobuf:"bytes,2,rep,name=items"` }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/apiserverinternal/v1alpha1/register.go
vendor/k8s.io/api/apiserverinternal/v1alpha1/register.go
/* Copyright 2019 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package v1alpha1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" ) // GroupName is the group name use in this package const GroupName = "internal.apiserver.k8s.io" // SchemeGroupVersion is group version used to register these objects var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} // Resource takes an unqualified resource and returns a Group qualified GroupResource func Resource(resource string) schema.GroupResource { return SchemeGroupVersion.WithResource(resource).GroupResource() } var ( SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) AddToScheme = SchemeBuilder.AddToScheme ) func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &StorageVersion{}, &StorageVersionList{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/apiserverinternal/v1alpha1/doc.go
vendor/k8s.io/api/apiserverinternal/v1alpha1/doc.go
/* Copyright 2019 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // +k8s:deepcopy-gen=package // +k8s:protobuf-gen=package // +k8s:openapi-gen=true // +groupName=internal.apiserver.k8s.io // Package v1alpha1 contains the v1alpha1 version of the API used by the // apiservers themselves. package v1alpha1 // import "k8s.io/api/apiserverinternal/v1alpha1"
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/apiserverinternal/v1alpha1/generated.pb.go
vendor/k8s.io/api/apiserverinternal/v1alpha1/generated.pb.go
/* Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: k8s.io/api/apiserverinternal/v1alpha1/generated.proto package v1alpha1 import ( fmt "fmt" io "io" proto "github.com/gogo/protobuf/proto" math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *ServerStorageVersion) Reset() { *m = ServerStorageVersion{} } func (*ServerStorageVersion) ProtoMessage() {} func (*ServerStorageVersion) Descriptor() ([]byte, []int) { return fileDescriptor_126bcbf538b54729, []int{0} } func (m *ServerStorageVersion) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ServerStorageVersion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ServerStorageVersion) XXX_Merge(src proto.Message) { xxx_messageInfo_ServerStorageVersion.Merge(m, src) } func (m *ServerStorageVersion) XXX_Size() int { return m.Size() } func (m *ServerStorageVersion) XXX_DiscardUnknown() { xxx_messageInfo_ServerStorageVersion.DiscardUnknown(m) } var xxx_messageInfo_ServerStorageVersion proto.InternalMessageInfo func (m *StorageVersion) Reset() { *m = StorageVersion{} } func (*StorageVersion) ProtoMessage() {} func (*StorageVersion) Descriptor() ([]byte, []int) { return fileDescriptor_126bcbf538b54729, []int{1} } func (m *StorageVersion) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *StorageVersion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *StorageVersion) XXX_Merge(src proto.Message) { xxx_messageInfo_StorageVersion.Merge(m, src) } func (m *StorageVersion) XXX_Size() int { return m.Size() } func (m *StorageVersion) XXX_DiscardUnknown() { xxx_messageInfo_StorageVersion.DiscardUnknown(m) } var xxx_messageInfo_StorageVersion proto.InternalMessageInfo func (m *StorageVersionCondition) Reset() { *m = StorageVersionCondition{} } func (*StorageVersionCondition) ProtoMessage() {} func (*StorageVersionCondition) Descriptor() ([]byte, []int) { return fileDescriptor_126bcbf538b54729, []int{2} } func (m *StorageVersionCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *StorageVersionCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *StorageVersionCondition) XXX_Merge(src proto.Message) { xxx_messageInfo_StorageVersionCondition.Merge(m, src) } func (m *StorageVersionCondition) XXX_Size() int { return m.Size() } func (m *StorageVersionCondition) XXX_DiscardUnknown() { xxx_messageInfo_StorageVersionCondition.DiscardUnknown(m) } var xxx_messageInfo_StorageVersionCondition proto.InternalMessageInfo func (m *StorageVersionList) Reset() { *m = StorageVersionList{} } func (*StorageVersionList) ProtoMessage() {} func (*StorageVersionList) Descriptor() ([]byte, []int) { return fileDescriptor_126bcbf538b54729, []int{3} } func (m *StorageVersionList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *StorageVersionList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *StorageVersionList) XXX_Merge(src proto.Message) { xxx_messageInfo_StorageVersionList.Merge(m, src) } func (m *StorageVersionList) XXX_Size() int { return m.Size() } func (m *StorageVersionList) XXX_DiscardUnknown() { xxx_messageInfo_StorageVersionList.DiscardUnknown(m) } var xxx_messageInfo_StorageVersionList proto.InternalMessageInfo func (m *StorageVersionSpec) Reset() { *m = StorageVersionSpec{} } func (*StorageVersionSpec) ProtoMessage() {} func (*StorageVersionSpec) Descriptor() ([]byte, []int) { return fileDescriptor_126bcbf538b54729, []int{4} } func (m *StorageVersionSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *StorageVersionSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *StorageVersionSpec) XXX_Merge(src proto.Message) { xxx_messageInfo_StorageVersionSpec.Merge(m, src) } func (m *StorageVersionSpec) XXX_Size() int { return m.Size() } func (m *StorageVersionSpec) XXX_DiscardUnknown() { xxx_messageInfo_StorageVersionSpec.DiscardUnknown(m) } var xxx_messageInfo_StorageVersionSpec proto.InternalMessageInfo func (m *StorageVersionStatus) Reset() { *m = StorageVersionStatus{} } func (*StorageVersionStatus) ProtoMessage() {} func (*StorageVersionStatus) Descriptor() ([]byte, []int) { return fileDescriptor_126bcbf538b54729, []int{5} } func (m *StorageVersionStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *StorageVersionStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *StorageVersionStatus) XXX_Merge(src proto.Message) { xxx_messageInfo_StorageVersionStatus.Merge(m, src) } func (m *StorageVersionStatus) XXX_Size() int { return m.Size() } func (m *StorageVersionStatus) XXX_DiscardUnknown() { xxx_messageInfo_StorageVersionStatus.DiscardUnknown(m) } var xxx_messageInfo_StorageVersionStatus proto.InternalMessageInfo func init() { proto.RegisterType((*ServerStorageVersion)(nil), "k8s.io.api.apiserverinternal.v1alpha1.ServerStorageVersion") proto.RegisterType((*StorageVersion)(nil), "k8s.io.api.apiserverinternal.v1alpha1.StorageVersion") proto.RegisterType((*StorageVersionCondition)(nil), "k8s.io.api.apiserverinternal.v1alpha1.StorageVersionCondition") proto.RegisterType((*StorageVersionList)(nil), "k8s.io.api.apiserverinternal.v1alpha1.StorageVersionList") proto.RegisterType((*StorageVersionSpec)(nil), "k8s.io.api.apiserverinternal.v1alpha1.StorageVersionSpec") proto.RegisterType((*StorageVersionStatus)(nil), "k8s.io.api.apiserverinternal.v1alpha1.StorageVersionStatus") } func init() { proto.RegisterFile("k8s.io/api/apiserverinternal/v1alpha1/generated.proto", fileDescriptor_126bcbf538b54729) } var fileDescriptor_126bcbf538b54729 = []byte{ // 770 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0x41, 0x4f, 0x13, 0x41, 0x14, 0xee, 0xd2, 0x52, 0x60, 0xaa, 0xad, 0x8c, 0x10, 0x6a, 0x4d, 0xb6, 0xd8, 0x04, 0x83, 0x1a, 0x77, 0xa5, 0x11, 0x23, 0x9a, 0x68, 0x58, 0x20, 0x06, 0x85, 0x60, 0xa6, 0xc4, 0x03, 0x7a, 0x70, 0xba, 0x1d, 0xb7, 0x2b, 0xdd, 0x9d, 0xcd, 0xce, 0xb4, 0x09, 0x17, 0xe3, 0x4f, 0xd0, 0xff, 0xe1, 0xd1, 0x1f, 0xc1, 0xc9, 0x70, 0x24, 0x31, 0x69, 0x64, 0xfd, 0x17, 0x9c, 0xcc, 0xcc, 0x6e, 0xb7, 0x6c, 0x5b, 0x62, 0xc3, 0xa1, 0x49, 0xe7, 0xbd, 0xf7, 0x7d, 0xef, 0xcd, 0x37, 0xdf, 0xcc, 0x82, 0xd5, 0xc3, 0xa7, 0x4c, 0xb3, 0xa9, 0x8e, 0x3d, 0x5b, 0xfc, 0x18, 0xf1, 0x3b, 0xc4, 0xb7, 0x5d, 0x4e, 0x7c, 0x17, 0xb7, 0xf4, 0xce, 0x0a, 0x6e, 0x79, 0x4d, 0xbc, 0xa2, 0x5b, 0xc4, 0x25, 0x3e, 0xe6, 0xa4, 0xa1, 0x79, 0x3e, 0xe5, 0x14, 0x2e, 0x85, 0x30, 0x0d, 0x7b, 0xb6, 0x36, 0x04, 0xd3, 0x7a, 0xb0, 0xd2, 0x43, 0xcb, 0xe6, 0xcd, 0x76, 0x5d, 0x33, 0xa9, 0xa3, 0x5b, 0xd4, 0xa2, 0xba, 0x44, 0xd7, 0xdb, 0x9f, 0xe4, 0x4a, 0x2e, 0xe4, 0xbf, 0x90, 0xb5, 0xf4, 0xb8, 0x3f, 0x8c, 0x83, 0xcd, 0xa6, 0xed, 0x12, 0xff, 0x48, 0xf7, 0x0e, 0x2d, 0x39, 0x99, 0xee, 0x10, 0x8e, 0xf5, 0xce, 0xd0, 0x2c, 0x25, 0xfd, 0x32, 0x94, 0xdf, 0x76, 0xb9, 0xed, 0x90, 0x21, 0xc0, 0x93, 0xff, 0x01, 0x98, 0xd9, 0x24, 0x0e, 0x1e, 0xc4, 0x55, 0xbe, 0x4f, 0x80, 0xb9, 0x9a, 0xdc, 0x69, 0x8d, 0x53, 0x1f, 0x5b, 0xe4, 0x1d, 0xf1, 0x99, 0x4d, 0x5d, 0xb8, 0x0a, 0x72, 0xd8, 0xb3, 0xc3, 0xd4, 0xf6, 0x66, 0x51, 0x59, 0x54, 0x96, 0x67, 0x8c, 0x9b, 0xc7, 0xdd, 0x72, 0x2a, 0xe8, 0x96, 0x73, 0xeb, 0x6f, 0xb7, 0x7b, 0x29, 0x74, 0xb1, 0x0e, 0xae, 0x83, 0x02, 0x71, 0x4d, 0xda, 0xb0, 0x5d, 0x2b, 0x62, 0x2a, 0x4e, 0x48, 0xe8, 0x42, 0x04, 0x2d, 0x6c, 0x25, 0xd3, 0x68, 0xb0, 0x1e, 0x6e, 0x80, 0xd9, 0x06, 0x31, 0x69, 0x03, 0xd7, 0x5b, 0xbd, 0x69, 0x58, 0x31, 0xbd, 0x98, 0x5e, 0x9e, 0x31, 0xe6, 0x83, 0x6e, 0x79, 0x76, 0x73, 0x30, 0x89, 0x86, 0xeb, 0xe1, 0x33, 0x90, 0x97, 0x07, 0xd8, 0x88, 0x19, 0x32, 0x92, 0x01, 0x06, 0xdd, 0x72, 0xbe, 0x96, 0xc8, 0xa0, 0x81, 0xca, 0xca, 0xcf, 0x09, 0x90, 0x1f, 0x50, 0xe3, 0x23, 0x98, 0x16, 0x47, 0xd5, 0xc0, 0x1c, 0x4b, 0x29, 0x72, 0xd5, 0x47, 0x5a, 0xdf, 0x2e, 0xb1, 0xe2, 0x9a, 0x77, 0x68, 0x49, 0xef, 0x68, 0xa2, 0x5a, 0xeb, 0xac, 0x68, 0x7b, 0xf5, 0xcf, 0xc4, 0xe4, 0xbb, 0x84, 0x63, 0x03, 0x46, 0x0a, 0x80, 0x7e, 0x0c, 0xc5, 0xac, 0xf0, 0x3d, 0xc8, 0x30, 0x8f, 0x98, 0x52, 0xad, 0x5c, 0x75, 0x4d, 0x1b, 0xcb, 0x8c, 0x5a, 0x72, 0xcc, 0x9a, 0x47, 0x4c, 0xe3, 0x5a, 0xd4, 0x26, 0x23, 0x56, 0x48, 0x92, 0x42, 0x13, 0x64, 0x19, 0xc7, 0xbc, 0x2d, 0x74, 0x14, 0xf4, 0xcf, 0xaf, 0x46, 0x2f, 0x29, 0x8c, 0x7c, 0xd4, 0x20, 0x1b, 0xae, 0x51, 0x44, 0x5d, 0xf9, 0x91, 0x06, 0x0b, 0x49, 0xc0, 0x06, 0x75, 0x1b, 0x36, 0x17, 0xfa, 0xbd, 0x04, 0x19, 0x7e, 0xe4, 0x91, 0xc8, 0x46, 0x0f, 0x7a, 0x23, 0xee, 0x1f, 0x79, 0xe4, 0xbc, 0x5b, 0xbe, 0x7d, 0x09, 0x4c, 0xa4, 0x91, 0x04, 0xc2, 0xb5, 0x78, 0x07, 0xa1, 0x9d, 0xee, 0x24, 0x87, 0x38, 0xef, 0x96, 0x0b, 0x31, 0x2c, 0x39, 0x17, 0x7c, 0x0d, 0x20, 0xad, 0x87, 0x47, 0xfc, 0x2a, 0x74, 0xbf, 0x70, 0xa5, 0x10, 0x22, 0x6d, 0x94, 0x22, 0x1a, 0xb8, 0x37, 0x54, 0x81, 0x46, 0xa0, 0x60, 0x07, 0xc0, 0x16, 0x66, 0x7c, 0xdf, 0xc7, 0x2e, 0x0b, 0x47, 0xb4, 0x1d, 0x52, 0xcc, 0x48, 0x51, 0xef, 0x8f, 0xe7, 0x08, 0x81, 0xe8, 0xf7, 0xdd, 0x19, 0x62, 0x43, 0x23, 0x3a, 0xc0, 0xbb, 0x20, 0xeb, 0x13, 0xcc, 0xa8, 0x5b, 0x9c, 0x94, 0xdb, 0x8f, 0xcf, 0x00, 0xc9, 0x28, 0x8a, 0xb2, 0xf0, 0x1e, 0x98, 0x72, 0x08, 0x63, 0xd8, 0x22, 0xc5, 0xac, 0x2c, 0x2c, 0x44, 0x85, 0x53, 0xbb, 0x61, 0x18, 0xf5, 0xf2, 0x95, 0x5f, 0x0a, 0x80, 0x49, 0xdd, 0x77, 0x6c, 0xc6, 0xe1, 0x87, 0x21, 0xa7, 0x6b, 0xe3, 0xed, 0x4b, 0xa0, 0xa5, 0xcf, 0x6f, 0x44, 0x2d, 0xa7, 0x7b, 0x91, 0x0b, 0x2e, 0x3f, 0x00, 0x93, 0x36, 0x27, 0x8e, 0x38, 0xc5, 0xf4, 0x72, 0xae, 0xba, 0x7a, 0x25, 0x1f, 0x1a, 0xd7, 0xa3, 0x0e, 0x93, 0xdb, 0x82, 0x0b, 0x85, 0x94, 0x95, 0xb9, 0xc1, 0xfd, 0x88, 0x0b, 0x50, 0xf9, 0x2d, 0x1e, 0xb8, 0x11, 0x36, 0x86, 0x5f, 0x40, 0x81, 0x25, 0xe2, 0xac, 0xa8, 0xc8, 0xa1, 0xc6, 0xbe, 0x1c, 0x23, 0x9e, 0xcd, 0xfe, 0x33, 0x97, 0x8c, 0x33, 0x34, 0xd8, 0x0c, 0xee, 0x81, 0x79, 0x93, 0x3a, 0x0e, 0x75, 0xb7, 0x46, 0xbe, 0x97, 0xb7, 0x82, 0x6e, 0x79, 0x7e, 0x63, 0x54, 0x01, 0x1a, 0x8d, 0x83, 0x3e, 0x00, 0x66, 0xef, 0x0a, 0x84, 0x0f, 0x66, 0xae, 0xfa, 0xe2, 0x4a, 0x02, 0xc7, 0x37, 0xa9, 0xff, 0x66, 0xc5, 0x21, 0x86, 0x2e, 0x74, 0x31, 0xde, 0x1c, 0x9f, 0xa9, 0xa9, 0x93, 0x33, 0x35, 0x75, 0x7a, 0xa6, 0xa6, 0xbe, 0x06, 0xaa, 0x72, 0x1c, 0xa8, 0xca, 0x49, 0xa0, 0x2a, 0xa7, 0x81, 0xaa, 0xfc, 0x09, 0x54, 0xe5, 0xdb, 0x5f, 0x35, 0x75, 0xb0, 0x34, 0xd6, 0x07, 0xf9, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x79, 0x04, 0x7d, 0x78, 0xb8, 0x07, 0x00, 0x00, } func (m *ServerStorageVersion) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *ServerStorageVersion) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *ServerStorageVersion) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.ServedVersions) > 0 { for iNdEx := len(m.ServedVersions) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.ServedVersions[iNdEx]) copy(dAtA[i:], m.ServedVersions[iNdEx]) i = encodeVarintGenerated(dAtA, i, uint64(len(m.ServedVersions[iNdEx]))) i-- dAtA[i] = 0x22 } } if len(m.DecodableVersions) > 0 { for iNdEx := len(m.DecodableVersions) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.DecodableVersions[iNdEx]) copy(dAtA[i:], m.DecodableVersions[iNdEx]) i = encodeVarintGenerated(dAtA, i, uint64(len(m.DecodableVersions[iNdEx]))) i-- dAtA[i] = 0x1a } } i -= len(m.EncodingVersion) copy(dAtA[i:], m.EncodingVersion) i = encodeVarintGenerated(dAtA, i, uint64(len(m.EncodingVersion))) i-- dAtA[i] = 0x12 i -= len(m.APIServerID) copy(dAtA[i:], m.APIServerID) i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIServerID))) i-- dAtA[i] = 0xa return len(dAtA) - i, nil } func (m *StorageVersion) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *StorageVersion) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *StorageVersion) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l { size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a { size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 { size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa return len(dAtA) - i, nil } func (m *StorageVersionCondition) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *StorageVersionCondition) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *StorageVersionCondition) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l i -= len(m.Message) copy(dAtA[i:], m.Message) i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message))) i-- dAtA[i] = 0x32 i -= len(m.Reason) copy(dAtA[i:], m.Reason) i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason))) i-- dAtA[i] = 0x2a { size, err := m.LastTransitionTime.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x22 i = encodeVarintGenerated(dAtA, i, uint64(m.ObservedGeneration)) i-- dAtA[i] = 0x18 i -= len(m.Status) copy(dAtA[i:], m.Status) i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status))) i-- dAtA[i] = 0x12 i -= len(m.Type) copy(dAtA[i:], m.Type) i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) i-- dAtA[i] = 0xa return len(dAtA) - i, nil } func (m *StorageVersionList) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *StorageVersionList) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *StorageVersionList) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.Items) > 0 { for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 } } { size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa return len(dAtA) - i, nil } func (m *StorageVersionSpec) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *StorageVersionSpec) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *StorageVersionSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l return len(dAtA) - i, nil } func (m *StorageVersionStatus) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *StorageVersionStatus) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *StorageVersionStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.Conditions) > 0 { for iNdEx := len(m.Conditions) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.Conditions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a } } if m.CommonEncodingVersion != nil { i -= len(*m.CommonEncodingVersion) copy(dAtA[i:], *m.CommonEncodingVersion) i = encodeVarintGenerated(dAtA, i, uint64(len(*m.CommonEncodingVersion))) i-- dAtA[i] = 0x12 } if len(m.StorageVersions) > 0 { for iNdEx := len(m.StorageVersions) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.StorageVersions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa } } return len(dAtA) - i, nil } func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { offset -= sovGenerated(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return base } func (m *ServerStorageVersion) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.APIServerID) n += 1 + l + sovGenerated(uint64(l)) l = len(m.EncodingVersion) n += 1 + l + sovGenerated(uint64(l)) if len(m.DecodableVersions) > 0 { for _, s := range m.DecodableVersions { l = len(s) n += 1 + l + sovGenerated(uint64(l)) } } if len(m.ServedVersions) > 0 { for _, s := range m.ServedVersions { l = len(s) n += 1 + l + sovGenerated(uint64(l)) } } return n } func (m *StorageVersion) Size() (n int) { if m == nil { return 0 } var l int _ = l l = m.ObjectMeta.Size() n += 1 + l + sovGenerated(uint64(l)) l = m.Spec.Size() n += 1 + l + sovGenerated(uint64(l)) l = m.Status.Size() n += 1 + l + sovGenerated(uint64(l)) return n } func (m *StorageVersionCondition) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Type) n += 1 + l + sovGenerated(uint64(l)) l = len(m.Status) n += 1 + l + sovGenerated(uint64(l)) n += 1 + sovGenerated(uint64(m.ObservedGeneration)) l = m.LastTransitionTime.Size() n += 1 + l + sovGenerated(uint64(l)) l = len(m.Reason) n += 1 + l + sovGenerated(uint64(l)) l = len(m.Message) n += 1 + l + sovGenerated(uint64(l)) return n } func (m *StorageVersionList) Size() (n int) { if m == nil { return 0 } var l int _ = l l = m.ListMeta.Size() n += 1 + l + sovGenerated(uint64(l)) if len(m.Items) > 0 { for _, e := range m.Items { l = e.Size() n += 1 + l + sovGenerated(uint64(l)) } } return n } func (m *StorageVersionSpec) Size() (n int) { if m == nil { return 0 } var l int _ = l return n } func (m *StorageVersionStatus) Size() (n int) { if m == nil { return 0 } var l int _ = l if len(m.StorageVersions) > 0 { for _, e := range m.StorageVersions { l = e.Size() n += 1 + l + sovGenerated(uint64(l)) } } if m.CommonEncodingVersion != nil { l = len(*m.CommonEncodingVersion) n += 1 + l + sovGenerated(uint64(l)) } if len(m.Conditions) > 0 { for _, e := range m.Conditions { l = e.Size() n += 1 + l + sovGenerated(uint64(l)) } } return n } func sovGenerated(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } func sozGenerated(x uint64) (n int) { return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (this *ServerStorageVersion) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&ServerStorageVersion{`, `APIServerID:` + fmt.Sprintf("%v", this.APIServerID) + `,`, `EncodingVersion:` + fmt.Sprintf("%v", this.EncodingVersion) + `,`, `DecodableVersions:` + fmt.Sprintf("%v", this.DecodableVersions) + `,`, `ServedVersions:` + fmt.Sprintf("%v", this.ServedVersions) + `,`, `}`, }, "") return s } func (this *StorageVersion) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&StorageVersion{`, `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "StorageVersionSpec", "StorageVersionSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "StorageVersionStatus", "StorageVersionStatus", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } func (this *StorageVersionCondition) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&StorageVersionCondition{`, `Type:` + fmt.Sprintf("%v", this.Type) + `,`, `Status:` + fmt.Sprintf("%v", this.Status) + `,`, `ObservedGeneration:` + fmt.Sprintf("%v", this.ObservedGeneration) + `,`, `LastTransitionTime:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.LastTransitionTime), "Time", "v1.Time", 1), `&`, ``, 1) + `,`, `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, `Message:` + fmt.Sprintf("%v", this.Message) + `,`, `}`, }, "") return s } func (this *StorageVersionList) String() string { if this == nil { return "nil" } repeatedStringForItems := "[]StorageVersion{" for _, f := range this.Items { repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "StorageVersion", "StorageVersion", 1), `&`, ``, 1) + "," } repeatedStringForItems += "}" s := strings.Join([]string{`&StorageVersionList{`, `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, `Items:` + repeatedStringForItems + `,`, `}`, }, "") return s } func (this *StorageVersionSpec) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&StorageVersionSpec{`, `}`, }, "") return s } func (this *StorageVersionStatus) String() string { if this == nil { return "nil" } repeatedStringForStorageVersions := "[]ServerStorageVersion{" for _, f := range this.StorageVersions { repeatedStringForStorageVersions += strings.Replace(strings.Replace(f.String(), "ServerStorageVersion", "ServerStorageVersion", 1), `&`, ``, 1) + "," } repeatedStringForStorageVersions += "}" repeatedStringForConditions := "[]StorageVersionCondition{" for _, f := range this.Conditions { repeatedStringForConditions += strings.Replace(strings.Replace(f.String(), "StorageVersionCondition", "StorageVersionCondition", 1), `&`, ``, 1) + "," } repeatedStringForConditions += "}" s := strings.Join([]string{`&StorageVersionStatus{`, `StorageVersions:` + repeatedStringForStorageVersions + `,`, `CommonEncodingVersion:` + valueToStringGenerated(this.CommonEncodingVersion) + `,`, `Conditions:` + repeatedStringForConditions + `,`, `}`, }, "") return s } func valueToStringGenerated(v interface{}) string { rv := reflect.ValueOf(v) if rv.IsNil() { return "nil" } pv := reflect.Indirect(rv).Interface() return fmt.Sprintf("*%v", pv) } func (m *ServerStorageVersion) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: ServerStorageVersion: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: ServerStorageVersion: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field APIServerID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } m.APIServerID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field EncodingVersion", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } m.EncodingVersion = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DecodableVersions", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } m.DecodableVersions = append(m.DecodableVersions, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ServedVersions", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } m.ServedVersions = append(m.ServedVersions, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthGenerated } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *StorageVersion) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: StorageVersion: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: StorageVersion: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthGenerated } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *StorageVersionCondition) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: StorageVersionCondition: wiretype end group for non-group") } if fieldNum <= 0 {
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
true
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/admissionregistration/v1alpha1/types_swagger_doc_generated.go
vendor/k8s.io/api/admissionregistration/v1alpha1/types_swagger_doc_generated.go
/* Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package v1alpha1 // This file contains a collection of methods that can be used from go-restful to // generate Swagger API documentation for its models. Please read this PR for more // information on the implementation: https://github.com/emicklei/go-restful/pull/215 // // TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if // they are on one line! For multiple line or blocks that you want to ignore use ---. // Any context after a --- is ignored. // // Those methods can be generated by using hack/update-codegen.sh // AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_ApplyConfiguration = map[string]string{ "": "ApplyConfiguration defines the desired configuration values of an object.", "expression": "expression will be evaluated by CEL to create an apply configuration. ref: https://github.com/google/cel-spec\n\nApply configurations are declared in CEL using object initialization. For example, this CEL expression returns an apply configuration to set a single field:\n\n\tObject{\n\t spec: Object.spec{\n\t serviceAccountName: \"example\"\n\t }\n\t}\n\nApply configurations may not modify atomic structs, maps or arrays due to the risk of accidental deletion of values not included in the apply configuration.\n\nCEL expressions have access to the object types needed to create apply configurations:\n\n- 'Object' - CEL type of the resource object. - 'Object.<fieldName>' - CEL type of object field (such as 'Object.spec') - 'Object.<fieldName1>.<fieldName2>...<fieldNameN>` - CEL type of nested field (such as 'Object.spec.containers')\n\nCEL expressions have access to the contents of the API request, organized into CEL variables as well as some other useful variables:\n\n- 'object' - The object from the incoming request. The value is null for DELETE requests. - 'oldObject' - The existing object. The value is null for CREATE requests. - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. - 'variables' - Map of composited variables, from its name to its lazily evaluated value.\n For example, a variable named 'foo' can be accessed as 'variables.foo'.\n- 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.\n See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz\n- 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the\n request resource.\n\nThe `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the object. No other metadata properties are accessible.\n\nOnly property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. Required.", } func (ApplyConfiguration) SwaggerDoc() map[string]string { return map_ApplyConfiguration } var map_AuditAnnotation = map[string]string{ "": "AuditAnnotation describes how to produce an audit annotation for an API request.", "key": "key specifies the audit annotation key. The audit annotation keys of a ValidatingAdmissionPolicy must be unique. The key must be a qualified name ([A-Za-z0-9][-A-Za-z0-9_.]*) no more than 63 bytes in length.\n\nThe key is combined with the resource name of the ValidatingAdmissionPolicy to construct an audit annotation key: \"{ValidatingAdmissionPolicy name}/{key}\".\n\nIf an admission webhook uses the same resource name as this ValidatingAdmissionPolicy and the same audit annotation key, the annotation key will be identical. In this case, the first annotation written with the key will be included in the audit event and all subsequent annotations with the same key will be discarded.\n\nRequired.", "valueExpression": "valueExpression represents the expression which is evaluated by CEL to produce an audit annotation value. The expression must evaluate to either a string or null value. If the expression evaluates to a string, the audit annotation is included with the string value. If the expression evaluates to null or empty string the audit annotation will be omitted. The valueExpression may be no longer than 5kb in length. If the result of the valueExpression is more than 10kb in length, it will be truncated to 10kb.\n\nIf multiple ValidatingAdmissionPolicyBinding resources match an API request, then the valueExpression will be evaluated for each binding. All unique values produced by the valueExpressions will be joined together in a comma-separated list.\n\nRequired.", } func (AuditAnnotation) SwaggerDoc() map[string]string { return map_AuditAnnotation } var map_ExpressionWarning = map[string]string{ "": "ExpressionWarning is a warning information that targets a specific expression.", "fieldRef": "The path to the field that refers the expression. For example, the reference to the expression of the first item of validations is \"spec.validations[0].expression\"", "warning": "The content of type checking information in a human-readable form. Each line of the warning contains the type that the expression is checked against, followed by the type check error from the compiler.", } func (ExpressionWarning) SwaggerDoc() map[string]string { return map_ExpressionWarning } var map_JSONPatch = map[string]string{ "": "JSONPatch defines a JSON Patch.", "expression": "expression will be evaluated by CEL to create a [JSON patch](https://jsonpatch.com/). ref: https://github.com/google/cel-spec\n\nexpression must return an array of JSONPatch values.\n\nFor example, this CEL expression returns a JSON patch to conditionally modify a value:\n\n\t [\n\t JSONPatch{op: \"test\", path: \"/spec/example\", value: \"Red\"},\n\t JSONPatch{op: \"replace\", path: \"/spec/example\", value: \"Green\"}\n\t ]\n\nTo define an object for the patch value, use Object types. For example:\n\n\t [\n\t JSONPatch{\n\t op: \"add\",\n\t path: \"/spec/selector\",\n\t value: Object.spec.selector{matchLabels: {\"environment\": \"test\"}}\n\t }\n\t ]\n\nTo use strings containing '/' and '~' as JSONPatch path keys, use \"jsonpatch.escapeKey\". For example:\n\n\t [\n\t JSONPatch{\n\t op: \"add\",\n\t path: \"/metadata/labels/\" + jsonpatch.escapeKey(\"example.com/environment\"),\n\t value: \"test\"\n\t },\n\t ]\n\nCEL expressions have access to the types needed to create JSON patches and objects:\n\n- 'JSONPatch' - CEL type of JSON Patch operations. JSONPatch has the fields 'op', 'from', 'path' and 'value'.\n See [JSON patch](https://jsonpatch.com/) for more details. The 'value' field may be set to any of: string,\n integer, array, map or object. If set, the 'path' and 'from' fields must be set to a\n [JSON pointer](https://datatracker.ietf.org/doc/html/rfc6901/) string, where the 'jsonpatch.escapeKey()' CEL\n function may be used to escape path keys containing '/' and '~'.\n- 'Object' - CEL type of the resource object. - 'Object.<fieldName>' - CEL type of object field (such as 'Object.spec') - 'Object.<fieldName1>.<fieldName2>...<fieldNameN>` - CEL type of nested field (such as 'Object.spec.containers')\n\nCEL expressions have access to the contents of the API request, organized into CEL variables as well as some other useful variables:\n\n- 'object' - The object from the incoming request. The value is null for DELETE requests. - 'oldObject' - The existing object. The value is null for CREATE requests. - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. - 'variables' - Map of composited variables, from its name to its lazily evaluated value.\n For example, a variable named 'foo' can be accessed as 'variables.foo'.\n- 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.\n See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz\n- 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the\n request resource.\n\nCEL expressions have access to [Kubernetes CEL function libraries](https://kubernetes.io/docs/reference/using-api/cel/#cel-options-language-features-and-libraries) as well as:\n\n- 'jsonpatch.escapeKey' - Performs JSONPatch key escaping. '~' and '/' are escaped as '~0' and `~1' respectively).\n\nOnly property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. Required.", } func (JSONPatch) SwaggerDoc() map[string]string { return map_JSONPatch } var map_MatchResources = map[string]string{ "": "MatchResources decides whether to run the admission control policy on an object based on whether it meets the match criteria. The exclude rules take precedence over include rules (if a resource matches both, it is excluded)", "namespaceSelector": "NamespaceSelector decides whether to run the admission control policy on an object based on whether the namespace for that object matches the selector. If the object itself is a namespace, the matching is performed on object.metadata.labels. If the object is another cluster scoped resource, it never skips the policy.\n\nFor example, to run the webhook on any objects whose namespace is not associated with \"runlevel\" of \"0\" or \"1\"; you will set the selector as follows: \"namespaceSelector\": {\n \"matchExpressions\": [\n {\n \"key\": \"runlevel\",\n \"operator\": \"NotIn\",\n \"values\": [\n \"0\",\n \"1\"\n ]\n }\n ]\n}\n\nIf instead you want to only run the policy on any objects whose namespace is associated with the \"environment\" of \"prod\" or \"staging\"; you will set the selector as follows: \"namespaceSelector\": {\n \"matchExpressions\": [\n {\n \"key\": \"environment\",\n \"operator\": \"In\",\n \"values\": [\n \"prod\",\n \"staging\"\n ]\n }\n ]\n}\n\nSee https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ for more examples of label selectors.\n\nDefault to the empty LabelSelector, which matches everything.", "objectSelector": "ObjectSelector decides whether to run the validation based on if the object has matching labels. objectSelector is evaluated against both the oldObject and newObject that would be sent to the cel validation, and is considered to match if either object matches the selector. A null object (oldObject in the case of create, or newObject in the case of delete) or an object that cannot have labels (like a DeploymentRollback or a PodProxyOptions object) is not considered to match. Use the object selector only if the webhook is opt-in, because end users may skip the admission webhook by setting the labels. Default to the empty LabelSelector, which matches everything.", "resourceRules": "ResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy matches. The policy cares about an operation if it matches _any_ Rule.", "excludeResourceRules": "ExcludeResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy should not care about. The exclude rules take precedence over include rules (if a resource matches both, it is excluded)", "matchPolicy": "matchPolicy defines how the \"MatchResources\" list is used to match incoming requests. Allowed values are \"Exact\" or \"Equivalent\".\n\n- Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the ValidatingAdmissionPolicy.\n\n- Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the ValidatingAdmissionPolicy.\n\nDefaults to \"Equivalent\"", } func (MatchResources) SwaggerDoc() map[string]string { return map_MatchResources } var map_MutatingAdmissionPolicy = map[string]string{ "": "MutatingAdmissionPolicy describes the definition of an admission mutation policy that mutates the object coming into admission chain.", "metadata": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.", "spec": "Specification of the desired behavior of the MutatingAdmissionPolicy.", } func (MutatingAdmissionPolicy) SwaggerDoc() map[string]string { return map_MutatingAdmissionPolicy } var map_MutatingAdmissionPolicyBinding = map[string]string{ "": "MutatingAdmissionPolicyBinding binds the MutatingAdmissionPolicy with parametrized resources. MutatingAdmissionPolicyBinding and the optional parameter resource together define how cluster administrators configure policies for clusters.\n\nFor a given admission request, each binding will cause its policy to be evaluated N times, where N is 1 for policies/bindings that don't use params, otherwise N is the number of parameters selected by the binding. Each evaluation is constrained by a [runtime cost budget](https://kubernetes.io/docs/reference/using-api/cel/#runtime-cost-budget).\n\nAdding/removing policies, bindings, or params can not affect whether a given (policy, binding, param) combination is within its own CEL budget.", "metadata": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.", "spec": "Specification of the desired behavior of the MutatingAdmissionPolicyBinding.", } func (MutatingAdmissionPolicyBinding) SwaggerDoc() map[string]string { return map_MutatingAdmissionPolicyBinding } var map_MutatingAdmissionPolicyBindingList = map[string]string{ "": "MutatingAdmissionPolicyBindingList is a list of MutatingAdmissionPolicyBinding.", "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "items": "List of PolicyBinding.", } func (MutatingAdmissionPolicyBindingList) SwaggerDoc() map[string]string { return map_MutatingAdmissionPolicyBindingList } var map_MutatingAdmissionPolicyBindingSpec = map[string]string{ "": "MutatingAdmissionPolicyBindingSpec is the specification of the MutatingAdmissionPolicyBinding.", "policyName": "policyName references a MutatingAdmissionPolicy name which the MutatingAdmissionPolicyBinding binds to. If the referenced resource does not exist, this binding is considered invalid and will be ignored Required.", "paramRef": "paramRef specifies the parameter resource used to configure the admission control policy. It should point to a resource of the type specified in spec.ParamKind of the bound MutatingAdmissionPolicy. If the policy specifies a ParamKind and the resource referred to by ParamRef does not exist, this binding is considered mis-configured and the FailurePolicy of the MutatingAdmissionPolicy applied. If the policy does not specify a ParamKind then this field is ignored, and the rules are evaluated without a param.", "matchResources": "matchResources limits what resources match this binding and may be mutated by it. Note that if matchResources matches a resource, the resource must also match a policy's matchConstraints and matchConditions before the resource may be mutated. When matchResources is unset, it does not constrain resource matching, and only the policy's matchConstraints and matchConditions must match for the resource to be mutated. Additionally, matchResources.resourceRules are optional and do not constraint matching when unset. Note that this is differs from MutatingAdmissionPolicy matchConstraints, where resourceRules are required. The CREATE, UPDATE and CONNECT operations are allowed. The DELETE operation may not be matched. '*' matches CREATE, UPDATE and CONNECT.", } func (MutatingAdmissionPolicyBindingSpec) SwaggerDoc() map[string]string { return map_MutatingAdmissionPolicyBindingSpec } var map_MutatingAdmissionPolicyList = map[string]string{ "": "MutatingAdmissionPolicyList is a list of MutatingAdmissionPolicy.", "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "items": "List of ValidatingAdmissionPolicy.", } func (MutatingAdmissionPolicyList) SwaggerDoc() map[string]string { return map_MutatingAdmissionPolicyList } var map_MutatingAdmissionPolicySpec = map[string]string{ "": "MutatingAdmissionPolicySpec is the specification of the desired behavior of the admission policy.", "paramKind": "paramKind specifies the kind of resources used to parameterize this policy. If absent, there are no parameters for this policy and the param CEL variable will not be provided to validation expressions. If paramKind refers to a non-existent kind, this policy definition is mis-configured and the FailurePolicy is applied. If paramKind is specified but paramRef is unset in MutatingAdmissionPolicyBinding, the params variable will be null.", "matchConstraints": "matchConstraints specifies what resources this policy is designed to validate. The MutatingAdmissionPolicy cares about a request if it matches _all_ Constraints. However, in order to prevent clusters from being put into an unstable state that cannot be recovered from via the API MutatingAdmissionPolicy cannot match MutatingAdmissionPolicy and MutatingAdmissionPolicyBinding. The CREATE, UPDATE and CONNECT operations are allowed. The DELETE operation may not be matched. '*' matches CREATE, UPDATE and CONNECT. Required.", "variables": "variables contain definitions of variables that can be used in composition of other expressions. Each variable is defined as a named CEL expression. The variables defined here will be available under `variables` in other expressions of the policy except matchConditions because matchConditions are evaluated before the rest of the policy.\n\nThe expression of a variable can refer to other variables defined earlier in the list but not those after. Thus, variables must be sorted by the order of first appearance and acyclic.", "mutations": "mutations contain operations to perform on matching objects. mutations may not be empty; a minimum of one mutation is required. mutations are evaluated in order, and are reinvoked according to the reinvocationPolicy. The mutations of a policy are invoked for each binding of this policy and reinvocation of mutations occurs on a per binding basis.", "failurePolicy": "failurePolicy defines how to handle failures for the admission policy. Failures can occur from CEL expression parse errors, type check errors, runtime errors and invalid or mis-configured policy definitions or bindings.\n\nA policy is invalid if paramKind refers to a non-existent Kind. A binding is invalid if paramRef.name refers to a non-existent resource.\n\nfailurePolicy does not define how validations that evaluate to false are handled.\n\nAllowed values are Ignore or Fail. Defaults to Fail.", "matchConditions": "matchConditions is a list of conditions that must be met for a request to be validated. Match conditions filter requests that have already been matched by the matchConstraints. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.\n\nIf a parameter object is provided, it can be accessed via the `params` handle in the same manner as validation expressions.\n\nThe exact matching logic is (in order):\n 1. If ANY matchCondition evaluates to FALSE, the policy is skipped.\n 2. If ALL matchConditions evaluate to TRUE, the policy is evaluated.\n 3. If any matchCondition evaluates to an error (but none are FALSE):\n - If failurePolicy=Fail, reject the request\n - If failurePolicy=Ignore, the policy is skipped", "reinvocationPolicy": "reinvocationPolicy indicates whether mutations may be called multiple times per MutatingAdmissionPolicyBinding as part of a single admission evaluation. Allowed values are \"Never\" and \"IfNeeded\".\n\nNever: These mutations will not be called more than once per binding in a single admission evaluation.\n\nIfNeeded: These mutations may be invoked more than once per binding for a single admission request and there is no guarantee of order with respect to other admission plugins, admission webhooks, bindings of this policy and admission policies. Mutations are only reinvoked when mutations change the object after this mutation is invoked. Required.", } func (MutatingAdmissionPolicySpec) SwaggerDoc() map[string]string { return map_MutatingAdmissionPolicySpec } var map_Mutation = map[string]string{ "": "Mutation specifies the CEL expression which is used to apply the Mutation.", "patchType": "patchType indicates the patch strategy used. Allowed values are \"ApplyConfiguration\" and \"JSONPatch\". Required.", "applyConfiguration": "applyConfiguration defines the desired configuration values of an object. The configuration is applied to the admission object using [structured merge diff](https://github.com/kubernetes-sigs/structured-merge-diff). A CEL expression is used to create apply configuration.", "jsonPatch": "jsonPatch defines a [JSON patch](https://jsonpatch.com/) operation to perform a mutation to the object. A CEL expression is used to create the JSON patch.", } func (Mutation) SwaggerDoc() map[string]string { return map_Mutation } var map_NamedRuleWithOperations = map[string]string{ "": "NamedRuleWithOperations is a tuple of Operations and Resources with ResourceNames.", "resourceNames": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.", } func (NamedRuleWithOperations) SwaggerDoc() map[string]string { return map_NamedRuleWithOperations } var map_ParamKind = map[string]string{ "": "ParamKind is a tuple of Group Kind and Version.", "apiVersion": "APIVersion is the API group version the resources belong to. In format of \"group/version\". Required.", "kind": "Kind is the API kind the resources belong to. Required.", } func (ParamKind) SwaggerDoc() map[string]string { return map_ParamKind } var map_ParamRef = map[string]string{ "": "ParamRef describes how to locate the params to be used as input to expressions of rules applied by a policy binding.", "name": "`name` is the name of the resource being referenced.\n\n`name` and `selector` are mutually exclusive properties. If one is set, the other must be unset.", "namespace": "namespace is the namespace of the referenced resource. Allows limiting the search for params to a specific namespace. Applies to both `name` and `selector` fields.\n\nA per-namespace parameter may be used by specifying a namespace-scoped `paramKind` in the policy and leaving this field empty.\n\n- If `paramKind` is cluster-scoped, this field MUST be unset. Setting this field results in a configuration error.\n\n- If `paramKind` is namespace-scoped, the namespace of the object being evaluated for admission will be used when this field is left unset. Take care that if this is left empty the binding must not match any cluster-scoped resources, which will result in an error.", "selector": "selector can be used to match multiple param objects based on their labels. Supply selector: {} to match all resources of the ParamKind.\n\nIf multiple params are found, they are all evaluated with the policy expressions and the results are ANDed together.\n\nOne of `name` or `selector` must be set, but `name` and `selector` are mutually exclusive properties. If one is set, the other must be unset.", "parameterNotFoundAction": "`parameterNotFoundAction` controls the behavior of the binding when the resource exists, and name or selector is valid, but there are no parameters matched by the binding. If the value is set to `Allow`, then no matched parameters will be treated as successful validation by the binding. If set to `Deny`, then no matched parameters will be subject to the `failurePolicy` of the policy.\n\nAllowed values are `Allow` or `Deny` Default to `Deny`", } func (ParamRef) SwaggerDoc() map[string]string { return map_ParamRef } var map_TypeChecking = map[string]string{ "": "TypeChecking contains results of type checking the expressions in the ValidatingAdmissionPolicy", "expressionWarnings": "The type checking warnings for each expression.", } func (TypeChecking) SwaggerDoc() map[string]string { return map_TypeChecking } var map_ValidatingAdmissionPolicy = map[string]string{ "": "ValidatingAdmissionPolicy describes the definition of an admission validation policy that accepts or rejects an object without changing it.", "metadata": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.", "spec": "Specification of the desired behavior of the ValidatingAdmissionPolicy.", "status": "The status of the ValidatingAdmissionPolicy, including warnings that are useful to determine if the policy behaves in the expected way. Populated by the system. Read-only.", } func (ValidatingAdmissionPolicy) SwaggerDoc() map[string]string { return map_ValidatingAdmissionPolicy } var map_ValidatingAdmissionPolicyBinding = map[string]string{ "": "ValidatingAdmissionPolicyBinding binds the ValidatingAdmissionPolicy with paramerized resources. ValidatingAdmissionPolicyBinding and parameter CRDs together define how cluster administrators configure policies for clusters.\n\nFor a given admission request, each binding will cause its policy to be evaluated N times, where N is 1 for policies/bindings that don't use params, otherwise N is the number of parameters selected by the binding.\n\nThe CEL expressions of a policy must have a computed CEL cost below the maximum CEL budget. Each evaluation of the policy is given an independent CEL cost budget. Adding/removing policies, bindings, or params can not affect whether a given (policy, binding, param) combination is within its own CEL budget.", "metadata": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.", "spec": "Specification of the desired behavior of the ValidatingAdmissionPolicyBinding.", } func (ValidatingAdmissionPolicyBinding) SwaggerDoc() map[string]string { return map_ValidatingAdmissionPolicyBinding } var map_ValidatingAdmissionPolicyBindingList = map[string]string{ "": "ValidatingAdmissionPolicyBindingList is a list of ValidatingAdmissionPolicyBinding.", "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "items": "List of PolicyBinding.", } func (ValidatingAdmissionPolicyBindingList) SwaggerDoc() map[string]string { return map_ValidatingAdmissionPolicyBindingList } var map_ValidatingAdmissionPolicyBindingSpec = map[string]string{ "": "ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding.", "policyName": "PolicyName references a ValidatingAdmissionPolicy name which the ValidatingAdmissionPolicyBinding binds to. If the referenced resource does not exist, this binding is considered invalid and will be ignored Required.", "paramRef": "paramRef specifies the parameter resource used to configure the admission control policy. It should point to a resource of the type specified in ParamKind of the bound ValidatingAdmissionPolicy. If the policy specifies a ParamKind and the resource referred to by ParamRef does not exist, this binding is considered mis-configured and the FailurePolicy of the ValidatingAdmissionPolicy applied. If the policy does not specify a ParamKind then this field is ignored, and the rules are evaluated without a param.", "matchResources": "MatchResources declares what resources match this binding and will be validated by it. Note that this is intersected with the policy's matchConstraints, so only requests that are matched by the policy can be selected by this. If this is unset, all resources matched by the policy are validated by this binding When resourceRules is unset, it does not constrain resource matching. If a resource is matched by the other fields of this object, it will be validated. Note that this is differs from ValidatingAdmissionPolicy matchConstraints, where resourceRules are required.", "validationActions": "validationActions declares how Validations of the referenced ValidatingAdmissionPolicy are enforced. If a validation evaluates to false it is always enforced according to these actions.\n\nFailures defined by the ValidatingAdmissionPolicy's FailurePolicy are enforced according to these actions only if the FailurePolicy is set to Fail, otherwise the failures are ignored. This includes compilation errors, runtime errors and misconfigurations of the policy.\n\nvalidationActions is declared as a set of action values. Order does not matter. validationActions may not contain duplicates of the same action.\n\nThe supported actions values are:\n\n\"Deny\" specifies that a validation failure results in a denied request.\n\n\"Warn\" specifies that a validation failure is reported to the request client in HTTP Warning headers, with a warning code of 299. Warnings can be sent both for allowed or denied admission responses.\n\n\"Audit\" specifies that a validation failure is included in the published audit event for the request. The audit event will contain a `validation.policy.admission.k8s.io/validation_failure` audit annotation with a value containing the details of the validation failures, formatted as a JSON list of objects, each with the following fields: - message: The validation failure message string - policy: The resource name of the ValidatingAdmissionPolicy - binding: The resource name of the ValidatingAdmissionPolicyBinding - expressionIndex: The index of the failed validations in the ValidatingAdmissionPolicy - validationActions: The enforcement actions enacted for the validation failure Example audit annotation: `\"validation.policy.admission.k8s.io/validation_failure\": \"[{\"message\": \"Invalid value\", {\"policy\": \"policy.example.com\", {\"binding\": \"policybinding.example.com\", {\"expressionIndex\": \"1\", {\"validationActions\": [\"Audit\"]}]\"`\n\nClients should expect to handle additional values by ignoring any values not recognized.\n\n\"Deny\" and \"Warn\" may not be used together since this combination needlessly duplicates the validation failure both in the API response body and the HTTP warning headers.\n\nRequired.", } func (ValidatingAdmissionPolicyBindingSpec) SwaggerDoc() map[string]string { return map_ValidatingAdmissionPolicyBindingSpec } var map_ValidatingAdmissionPolicyList = map[string]string{ "": "ValidatingAdmissionPolicyList is a list of ValidatingAdmissionPolicy.",
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
true
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/admissionregistration/v1alpha1/zz_generated.deepcopy.go
vendor/k8s.io/api/admissionregistration/v1alpha1/zz_generated.deepcopy.go
//go:build !ignore_autogenerated // +build !ignore_autogenerated /* Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Code generated by deepcopy-gen. DO NOT EDIT. package v1alpha1 import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ApplyConfiguration) DeepCopyInto(out *ApplyConfiguration) { *out = *in return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplyConfiguration. func (in *ApplyConfiguration) DeepCopy() *ApplyConfiguration { if in == nil { return nil } out := new(ApplyConfiguration) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *AuditAnnotation) DeepCopyInto(out *AuditAnnotation) { *out = *in return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuditAnnotation. func (in *AuditAnnotation) DeepCopy() *AuditAnnotation { if in == nil { return nil } out := new(AuditAnnotation) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ExpressionWarning) DeepCopyInto(out *ExpressionWarning) { *out = *in return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExpressionWarning. func (in *ExpressionWarning) DeepCopy() *ExpressionWarning { if in == nil { return nil } out := new(ExpressionWarning) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *JSONPatch) DeepCopyInto(out *JSONPatch) { *out = *in return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JSONPatch. func (in *JSONPatch) DeepCopy() *JSONPatch { if in == nil { return nil } out := new(JSONPatch) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MatchCondition) DeepCopyInto(out *MatchCondition) { *out = *in return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MatchCondition. func (in *MatchCondition) DeepCopy() *MatchCondition { if in == nil { return nil } out := new(MatchCondition) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MatchResources) DeepCopyInto(out *MatchResources) { *out = *in if in.NamespaceSelector != nil { in, out := &in.NamespaceSelector, &out.NamespaceSelector *out = new(v1.LabelSelector) (*in).DeepCopyInto(*out) } if in.ObjectSelector != nil { in, out := &in.ObjectSelector, &out.ObjectSelector *out = new(v1.LabelSelector) (*in).DeepCopyInto(*out) } if in.ResourceRules != nil { in, out := &in.ResourceRules, &out.ResourceRules *out = make([]NamedRuleWithOperations, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.ExcludeResourceRules != nil { in, out := &in.ExcludeResourceRules, &out.ExcludeResourceRules *out = make([]NamedRuleWithOperations, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.MatchPolicy != nil { in, out := &in.MatchPolicy, &out.MatchPolicy *out = new(MatchPolicyType) **out = **in } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MatchResources. func (in *MatchResources) DeepCopy() *MatchResources { if in == nil { return nil } out := new(MatchResources) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MutatingAdmissionPolicy) DeepCopyInto(out *MutatingAdmissionPolicy) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MutatingAdmissionPolicy. func (in *MutatingAdmissionPolicy) DeepCopy() *MutatingAdmissionPolicy { if in == nil { return nil } out := new(MutatingAdmissionPolicy) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. func (in *MutatingAdmissionPolicy) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MutatingAdmissionPolicyBinding) DeepCopyInto(out *MutatingAdmissionPolicyBinding) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MutatingAdmissionPolicyBinding. func (in *MutatingAdmissionPolicyBinding) DeepCopy() *MutatingAdmissionPolicyBinding { if in == nil { return nil } out := new(MutatingAdmissionPolicyBinding) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. func (in *MutatingAdmissionPolicyBinding) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MutatingAdmissionPolicyBindingList) DeepCopyInto(out *MutatingAdmissionPolicyBindingList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]MutatingAdmissionPolicyBinding, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MutatingAdmissionPolicyBindingList. func (in *MutatingAdmissionPolicyBindingList) DeepCopy() *MutatingAdmissionPolicyBindingList { if in == nil { return nil } out := new(MutatingAdmissionPolicyBindingList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. func (in *MutatingAdmissionPolicyBindingList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MutatingAdmissionPolicyBindingSpec) DeepCopyInto(out *MutatingAdmissionPolicyBindingSpec) { *out = *in if in.ParamRef != nil { in, out := &in.ParamRef, &out.ParamRef *out = new(ParamRef) (*in).DeepCopyInto(*out) } if in.MatchResources != nil { in, out := &in.MatchResources, &out.MatchResources *out = new(MatchResources) (*in).DeepCopyInto(*out) } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MutatingAdmissionPolicyBindingSpec. func (in *MutatingAdmissionPolicyBindingSpec) DeepCopy() *MutatingAdmissionPolicyBindingSpec { if in == nil { return nil } out := new(MutatingAdmissionPolicyBindingSpec) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MutatingAdmissionPolicyList) DeepCopyInto(out *MutatingAdmissionPolicyList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]MutatingAdmissionPolicy, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MutatingAdmissionPolicyList. func (in *MutatingAdmissionPolicyList) DeepCopy() *MutatingAdmissionPolicyList { if in == nil { return nil } out := new(MutatingAdmissionPolicyList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. func (in *MutatingAdmissionPolicyList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MutatingAdmissionPolicySpec) DeepCopyInto(out *MutatingAdmissionPolicySpec) { *out = *in if in.ParamKind != nil { in, out := &in.ParamKind, &out.ParamKind *out = new(ParamKind) **out = **in } if in.MatchConstraints != nil { in, out := &in.MatchConstraints, &out.MatchConstraints *out = new(MatchResources) (*in).DeepCopyInto(*out) } if in.Variables != nil { in, out := &in.Variables, &out.Variables *out = make([]Variable, len(*in)) copy(*out, *in) } if in.Mutations != nil { in, out := &in.Mutations, &out.Mutations *out = make([]Mutation, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.FailurePolicy != nil { in, out := &in.FailurePolicy, &out.FailurePolicy *out = new(FailurePolicyType) **out = **in } if in.MatchConditions != nil { in, out := &in.MatchConditions, &out.MatchConditions *out = make([]MatchCondition, len(*in)) copy(*out, *in) } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MutatingAdmissionPolicySpec. func (in *MutatingAdmissionPolicySpec) DeepCopy() *MutatingAdmissionPolicySpec { if in == nil { return nil } out := new(MutatingAdmissionPolicySpec) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Mutation) DeepCopyInto(out *Mutation) { *out = *in if in.ApplyConfiguration != nil { in, out := &in.ApplyConfiguration, &out.ApplyConfiguration *out = new(ApplyConfiguration) **out = **in } if in.JSONPatch != nil { in, out := &in.JSONPatch, &out.JSONPatch *out = new(JSONPatch) **out = **in } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Mutation. func (in *Mutation) DeepCopy() *Mutation { if in == nil { return nil } out := new(Mutation) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NamedRuleWithOperations) DeepCopyInto(out *NamedRuleWithOperations) { *out = *in if in.ResourceNames != nil { in, out := &in.ResourceNames, &out.ResourceNames *out = make([]string, len(*in)) copy(*out, *in) } in.RuleWithOperations.DeepCopyInto(&out.RuleWithOperations) return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedRuleWithOperations. func (in *NamedRuleWithOperations) DeepCopy() *NamedRuleWithOperations { if in == nil { return nil } out := new(NamedRuleWithOperations) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ParamKind) DeepCopyInto(out *ParamKind) { *out = *in return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParamKind. func (in *ParamKind) DeepCopy() *ParamKind { if in == nil { return nil } out := new(ParamKind) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ParamRef) DeepCopyInto(out *ParamRef) { *out = *in if in.Selector != nil { in, out := &in.Selector, &out.Selector *out = new(v1.LabelSelector) (*in).DeepCopyInto(*out) } if in.ParameterNotFoundAction != nil { in, out := &in.ParameterNotFoundAction, &out.ParameterNotFoundAction *out = new(ParameterNotFoundActionType) **out = **in } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParamRef. func (in *ParamRef) DeepCopy() *ParamRef { if in == nil { return nil } out := new(ParamRef) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TypeChecking) DeepCopyInto(out *TypeChecking) { *out = *in if in.ExpressionWarnings != nil { in, out := &in.ExpressionWarnings, &out.ExpressionWarnings *out = make([]ExpressionWarning, len(*in)) copy(*out, *in) } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TypeChecking. func (in *TypeChecking) DeepCopy() *TypeChecking { if in == nil { return nil } out := new(TypeChecking) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ValidatingAdmissionPolicy) DeepCopyInto(out *ValidatingAdmissionPolicy) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) in.Status.DeepCopyInto(&out.Status) return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatingAdmissionPolicy. func (in *ValidatingAdmissionPolicy) DeepCopy() *ValidatingAdmissionPolicy { if in == nil { return nil } out := new(ValidatingAdmissionPolicy) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. func (in *ValidatingAdmissionPolicy) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ValidatingAdmissionPolicyBinding) DeepCopyInto(out *ValidatingAdmissionPolicyBinding) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatingAdmissionPolicyBinding. func (in *ValidatingAdmissionPolicyBinding) DeepCopy() *ValidatingAdmissionPolicyBinding { if in == nil { return nil } out := new(ValidatingAdmissionPolicyBinding) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. func (in *ValidatingAdmissionPolicyBinding) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ValidatingAdmissionPolicyBindingList) DeepCopyInto(out *ValidatingAdmissionPolicyBindingList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]ValidatingAdmissionPolicyBinding, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatingAdmissionPolicyBindingList. func (in *ValidatingAdmissionPolicyBindingList) DeepCopy() *ValidatingAdmissionPolicyBindingList { if in == nil { return nil } out := new(ValidatingAdmissionPolicyBindingList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. func (in *ValidatingAdmissionPolicyBindingList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ValidatingAdmissionPolicyBindingSpec) DeepCopyInto(out *ValidatingAdmissionPolicyBindingSpec) { *out = *in if in.ParamRef != nil { in, out := &in.ParamRef, &out.ParamRef *out = new(ParamRef) (*in).DeepCopyInto(*out) } if in.MatchResources != nil { in, out := &in.MatchResources, &out.MatchResources *out = new(MatchResources) (*in).DeepCopyInto(*out) } if in.ValidationActions != nil { in, out := &in.ValidationActions, &out.ValidationActions *out = make([]ValidationAction, len(*in)) copy(*out, *in) } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatingAdmissionPolicyBindingSpec. func (in *ValidatingAdmissionPolicyBindingSpec) DeepCopy() *ValidatingAdmissionPolicyBindingSpec { if in == nil { return nil } out := new(ValidatingAdmissionPolicyBindingSpec) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ValidatingAdmissionPolicyList) DeepCopyInto(out *ValidatingAdmissionPolicyList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]ValidatingAdmissionPolicy, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatingAdmissionPolicyList. func (in *ValidatingAdmissionPolicyList) DeepCopy() *ValidatingAdmissionPolicyList { if in == nil { return nil } out := new(ValidatingAdmissionPolicyList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. func (in *ValidatingAdmissionPolicyList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ValidatingAdmissionPolicySpec) DeepCopyInto(out *ValidatingAdmissionPolicySpec) { *out = *in if in.ParamKind != nil { in, out := &in.ParamKind, &out.ParamKind *out = new(ParamKind) **out = **in } if in.MatchConstraints != nil { in, out := &in.MatchConstraints, &out.MatchConstraints *out = new(MatchResources) (*in).DeepCopyInto(*out) } if in.Validations != nil { in, out := &in.Validations, &out.Validations *out = make([]Validation, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.FailurePolicy != nil { in, out := &in.FailurePolicy, &out.FailurePolicy *out = new(FailurePolicyType) **out = **in } if in.AuditAnnotations != nil { in, out := &in.AuditAnnotations, &out.AuditAnnotations *out = make([]AuditAnnotation, len(*in)) copy(*out, *in) } if in.MatchConditions != nil { in, out := &in.MatchConditions, &out.MatchConditions *out = make([]MatchCondition, len(*in)) copy(*out, *in) } if in.Variables != nil { in, out := &in.Variables, &out.Variables *out = make([]Variable, len(*in)) copy(*out, *in) } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatingAdmissionPolicySpec. func (in *ValidatingAdmissionPolicySpec) DeepCopy() *ValidatingAdmissionPolicySpec { if in == nil { return nil } out := new(ValidatingAdmissionPolicySpec) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ValidatingAdmissionPolicyStatus) DeepCopyInto(out *ValidatingAdmissionPolicyStatus) { *out = *in if in.TypeChecking != nil { in, out := &in.TypeChecking, &out.TypeChecking *out = new(TypeChecking) (*in).DeepCopyInto(*out) } if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions *out = make([]v1.Condition, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatingAdmissionPolicyStatus. func (in *ValidatingAdmissionPolicyStatus) DeepCopy() *ValidatingAdmissionPolicyStatus { if in == nil { return nil } out := new(ValidatingAdmissionPolicyStatus) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Validation) DeepCopyInto(out *Validation) { *out = *in if in.Reason != nil { in, out := &in.Reason, &out.Reason *out = new(v1.StatusReason) **out = **in } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Validation. func (in *Validation) DeepCopy() *Validation { if in == nil { return nil } out := new(Validation) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Variable) DeepCopyInto(out *Variable) { *out = *in return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Variable. func (in *Variable) DeepCopy() *Variable { if in == nil { return nil } out := new(Variable) in.DeepCopyInto(out) return out }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/admissionregistration/v1alpha1/types.go
vendor/k8s.io/api/admissionregistration/v1alpha1/types.go
/* Copyright 2022 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package v1alpha1 import ( v1 "k8s.io/api/admissionregistration/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // Rule is a tuple of APIGroups, APIVersion, and Resources.It is recommended // to make sure that all the tuple expansions are valid. type Rule = v1.Rule // ScopeType specifies a scope for a Rule. // +enum type ScopeType = v1.ScopeType const ( // ClusterScope means that scope is limited to cluster-scoped objects. // Namespace objects are cluster-scoped. ClusterScope ScopeType = v1.ClusterScope // NamespacedScope means that scope is limited to namespaced objects. NamespacedScope ScopeType = v1.NamespacedScope // AllScopes means that all scopes are included. AllScopes ScopeType = v1.AllScopes ) // ParameterNotFoundActionType specifies a failure policy that defines how a binding // is evaluated when the param referred by its perNamespaceParamRef is not found. // +enum type ParameterNotFoundActionType string const ( // Ignore means that an error finding params for a binding is ignored AllowAction ParameterNotFoundActionType = "Allow" // Fail means that an error finding params for a binding is ignored DenyAction ParameterNotFoundActionType = "Deny" ) // FailurePolicyType specifies a failure policy that defines how unrecognized errors from the admission endpoint are handled. // +enum type FailurePolicyType string const ( // Ignore means that an error calling the webhook is ignored. Ignore FailurePolicyType = "Ignore" // Fail means that an error calling the webhook causes the admission to fail. Fail FailurePolicyType = "Fail" ) // MatchPolicyType specifies the type of match policy. // +enum type MatchPolicyType string const ( // Exact means requests should only be sent to the webhook if they exactly match a given rule. Exact MatchPolicyType = "Exact" // Equivalent means requests should be sent to the webhook if they modify a resource listed in rules via another API group or version. Equivalent MatchPolicyType = "Equivalent" ) // +genclient // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.26 // ValidatingAdmissionPolicy describes the definition of an admission validation policy that accepts or rejects an object without changing it. type ValidatingAdmissionPolicy struct { metav1.TypeMeta `json:",inline"` // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Specification of the desired behavior of the ValidatingAdmissionPolicy. Spec ValidatingAdmissionPolicySpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` // The status of the ValidatingAdmissionPolicy, including warnings that are useful to determine if the policy // behaves in the expected way. // Populated by the system. // Read-only. // +optional Status ValidatingAdmissionPolicyStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` } // ValidatingAdmissionPolicyStatus represents the status of a ValidatingAdmissionPolicy. type ValidatingAdmissionPolicyStatus struct { // The generation observed by the controller. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"` // The results of type checking for each expression. // Presence of this field indicates the completion of the type checking. // +optional TypeChecking *TypeChecking `json:"typeChecking,omitempty" protobuf:"bytes,2,opt,name=typeChecking"` // The conditions represent the latest available observations of a policy's current state. // +optional // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:"conditions,omitempty" protobuf:"bytes,3,rep,name=conditions"` } // TypeChecking contains results of type checking the expressions in the // ValidatingAdmissionPolicy type TypeChecking struct { // The type checking warnings for each expression. // +optional // +listType=atomic ExpressionWarnings []ExpressionWarning `json:"expressionWarnings,omitempty" protobuf:"bytes,1,rep,name=expressionWarnings"` } // ExpressionWarning is a warning information that targets a specific expression. type ExpressionWarning struct { // The path to the field that refers the expression. // For example, the reference to the expression of the first item of // validations is "spec.validations[0].expression" FieldRef string `json:"fieldRef" protobuf:"bytes,2,opt,name=fieldRef"` // The content of type checking information in a human-readable form. // Each line of the warning contains the type that the expression is checked // against, followed by the type check error from the compiler. Warning string `json:"warning" protobuf:"bytes,3,opt,name=warning"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.26 // ValidatingAdmissionPolicyList is a list of ValidatingAdmissionPolicy. type ValidatingAdmissionPolicyList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // List of ValidatingAdmissionPolicy. Items []ValidatingAdmissionPolicy `json:"items" protobuf:"bytes,2,rep,name=items"` } // ValidatingAdmissionPolicySpec is the specification of the desired behavior of the AdmissionPolicy. type ValidatingAdmissionPolicySpec struct { // ParamKind specifies the kind of resources used to parameterize this policy. // If absent, there are no parameters for this policy and the param CEL variable will not be provided to validation expressions. // If ParamKind refers to a non-existent kind, this policy definition is mis-configured and the FailurePolicy is applied. // If paramKind is specified but paramRef is unset in ValidatingAdmissionPolicyBinding, the params variable will be null. // +optional ParamKind *ParamKind `json:"paramKind,omitempty" protobuf:"bytes,1,rep,name=paramKind"` // MatchConstraints specifies what resources this policy is designed to validate. // The AdmissionPolicy cares about a request if it matches _all_ Constraints. // However, in order to prevent clusters from being put into an unstable state that cannot be recovered from via the API // ValidatingAdmissionPolicy cannot match ValidatingAdmissionPolicy and ValidatingAdmissionPolicyBinding. // Required. MatchConstraints *MatchResources `json:"matchConstraints,omitempty" protobuf:"bytes,2,rep,name=matchConstraints"` // Validations contain CEL expressions which is used to apply the validation. // Validations and AuditAnnotations may not both be empty; a minimum of one Validations or AuditAnnotations is // required. // +listType=atomic // +optional Validations []Validation `json:"validations,omitempty" protobuf:"bytes,3,rep,name=validations"` // failurePolicy defines how to handle failures for the admission policy. Failures can // occur from CEL expression parse errors, type check errors, runtime errors and invalid // or mis-configured policy definitions or bindings. // // A policy is invalid if spec.paramKind refers to a non-existent Kind. // A binding is invalid if spec.paramRef.name refers to a non-existent resource. // // failurePolicy does not define how validations that evaluate to false are handled. // // When failurePolicy is set to Fail, ValidatingAdmissionPolicyBinding validationActions // define how failures are enforced. // // Allowed values are Ignore or Fail. Defaults to Fail. // +optional FailurePolicy *FailurePolicyType `json:"failurePolicy,omitempty" protobuf:"bytes,4,opt,name=failurePolicy,casttype=FailurePolicyType"` // auditAnnotations contains CEL expressions which are used to produce audit // annotations for the audit event of the API request. // validations and auditAnnotations may not both be empty; a least one of validations or auditAnnotations is // required. // +listType=atomic // +optional AuditAnnotations []AuditAnnotation `json:"auditAnnotations,omitempty" protobuf:"bytes,5,rep,name=auditAnnotations"` // MatchConditions is a list of conditions that must be met for a request to be validated. // Match conditions filter requests that have already been matched by the rules, // namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. // There are a maximum of 64 match conditions allowed. // // If a parameter object is provided, it can be accessed via the `params` handle in the same // manner as validation expressions. // // The exact matching logic is (in order): // 1. If ANY matchCondition evaluates to FALSE, the policy is skipped. // 2. If ALL matchConditions evaluate to TRUE, the policy is evaluated. // 3. If any matchCondition evaluates to an error (but none are FALSE): // - If failurePolicy=Fail, reject the request // - If failurePolicy=Ignore, the policy is skipped // // +patchMergeKey=name // +patchStrategy=merge // +listType=map // +listMapKey=name // +optional MatchConditions []MatchCondition `json:"matchConditions,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,6,rep,name=matchConditions"` // Variables contain definitions of variables that can be used in composition of other expressions. // Each variable is defined as a named CEL expression. // The variables defined here will be available under `variables` in other expressions of the policy // except MatchConditions because MatchConditions are evaluated before the rest of the policy. // // The expression of a variable can refer to other variables defined earlier in the list but not those after. // Thus, Variables must be sorted by the order of first appearance and acyclic. // +patchMergeKey=name // +patchStrategy=merge // +listType=map // +listMapKey=name // +optional Variables []Variable `json:"variables,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,7,rep,name=variables"` } type MatchCondition v1.MatchCondition // ParamKind is a tuple of Group Kind and Version. // +structType=atomic type ParamKind struct { // APIVersion is the API group version the resources belong to. // In format of "group/version". // Required. APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,1,rep,name=apiVersion"` // Kind is the API kind the resources belong to. // Required. Kind string `json:"kind,omitempty" protobuf:"bytes,2,rep,name=kind"` } // Validation specifies the CEL expression which is used to apply the validation. type Validation struct { // Expression represents the expression which will be evaluated by CEL. // ref: https://github.com/google/cel-spec // CEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables: // // - 'object' - The object from the incoming request. The value is null for DELETE requests. // - 'oldObject' - The existing object. The value is null for CREATE requests. // - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). // - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. // - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. // - 'variables' - Map of composited variables, from its name to its lazily evaluated value. // For example, a variable named 'foo' can be accessed as 'variables.foo'. // - 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. // See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz // - 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the // request resource. // // The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the // object. No other metadata properties are accessible. // // Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. // Accessible property names are escaped according to the following rules when accessed in the expression: // - '__' escapes to '__underscores__' // - '.' escapes to '__dot__' // - '-' escapes to '__dash__' // - '/' escapes to '__slash__' // - Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are: // "true", "false", "null", "in", "as", "break", "const", "continue", "else", "for", "function", "if", // "import", "let", "loop", "package", "namespace", "return". // Examples: // - Expression accessing a property named "namespace": {"Expression": "object.__namespace__ > 0"} // - Expression accessing a property named "x-prop": {"Expression": "object.x__dash__prop > 0"} // - Expression accessing a property named "redact__d": {"Expression": "object.redact__underscores__d > 0"} // // Equality on arrays with list type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1]. // Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type: // - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and // non-intersecting elements in `Y` are appended, retaining their partial order. // - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values // are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with // non-intersecting keys are appended, retaining their partial order. // Required. Expression string `json:"expression" protobuf:"bytes,1,opt,name=Expression"` // Message represents the message displayed when validation fails. The message is required if the Expression contains // line breaks. The message must not contain line breaks. // If unset, the message is "failed rule: {Rule}". // e.g. "must be a URL with the host matching spec.host" // If the Expression contains line breaks. Message is required. // The message must not contain line breaks. // If unset, the message is "failed Expression: {Expression}". // +optional Message string `json:"message,omitempty" protobuf:"bytes,2,opt,name=message"` // Reason represents a machine-readable description of why this validation failed. // If this is the first validation in the list to fail, this reason, as well as the // corresponding HTTP response code, are used in the // HTTP response to the client. // The currently supported reasons are: "Unauthorized", "Forbidden", "Invalid", "RequestEntityTooLarge". // If not set, StatusReasonInvalid is used in the response to the client. // +optional Reason *metav1.StatusReason `json:"reason,omitempty" protobuf:"bytes,3,opt,name=reason"` // messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. // Since messageExpression is used as a failure message, it must evaluate to a string. // If both message and messageExpression are present on a validation, then messageExpression will be used if validation fails. // If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced // as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string // that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and // the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged. // messageExpression has access to all the same variables as the `expression` except for 'authorizer' and 'authorizer.requestResource'. // Example: // "object.x must be less than max ("+string(params.max)+")" // +optional MessageExpression string `json:"messageExpression,omitempty" protobuf:"bytes,4,opt,name=messageExpression"` } // Variable is the definition of a variable that is used for composition. type Variable struct { // Name is the name of the variable. The name must be a valid CEL identifier and unique among all variables. // The variable can be accessed in other expressions through `variables` // For example, if name is "foo", the variable will be available as `variables.foo` Name string `json:"name" protobuf:"bytes,1,opt,name=Name"` // Expression is the expression that will be evaluated as the value of the variable. // The CEL expression has access to the same identifiers as the CEL expressions in Validation. Expression string `json:"expression" protobuf:"bytes,2,opt,name=Expression"` } // AuditAnnotation describes how to produce an audit annotation for an API request. type AuditAnnotation struct { // key specifies the audit annotation key. The audit annotation keys of // a ValidatingAdmissionPolicy must be unique. The key must be a qualified // name ([A-Za-z0-9][-A-Za-z0-9_.]*) no more than 63 bytes in length. // // The key is combined with the resource name of the // ValidatingAdmissionPolicy to construct an audit annotation key: // "{ValidatingAdmissionPolicy name}/{key}". // // If an admission webhook uses the same resource name as this ValidatingAdmissionPolicy // and the same audit annotation key, the annotation key will be identical. // In this case, the first annotation written with the key will be included // in the audit event and all subsequent annotations with the same key // will be discarded. // // Required. Key string `json:"key" protobuf:"bytes,1,opt,name=key"` // valueExpression represents the expression which is evaluated by CEL to // produce an audit annotation value. The expression must evaluate to either // a string or null value. If the expression evaluates to a string, the // audit annotation is included with the string value. If the expression // evaluates to null or empty string the audit annotation will be omitted. // The valueExpression may be no longer than 5kb in length. // If the result of the valueExpression is more than 10kb in length, it // will be truncated to 10kb. // // If multiple ValidatingAdmissionPolicyBinding resources match an // API request, then the valueExpression will be evaluated for // each binding. All unique values produced by the valueExpressions // will be joined together in a comma-separated list. // // Required. ValueExpression string `json:"valueExpression" protobuf:"bytes,2,opt,name=valueExpression"` } // +genclient // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.26 // ValidatingAdmissionPolicyBinding binds the ValidatingAdmissionPolicy with paramerized resources. // ValidatingAdmissionPolicyBinding and parameter CRDs together define how cluster administrators configure policies for clusters. // // For a given admission request, each binding will cause its policy to be // evaluated N times, where N is 1 for policies/bindings that don't use // params, otherwise N is the number of parameters selected by the binding. // // The CEL expressions of a policy must have a computed CEL cost below the maximum // CEL budget. Each evaluation of the policy is given an independent CEL cost budget. // Adding/removing policies, bindings, or params can not affect whether a // given (policy, binding, param) combination is within its own CEL budget. type ValidatingAdmissionPolicyBinding struct { metav1.TypeMeta `json:",inline"` // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Specification of the desired behavior of the ValidatingAdmissionPolicyBinding. Spec ValidatingAdmissionPolicyBindingSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.26 // ValidatingAdmissionPolicyBindingList is a list of ValidatingAdmissionPolicyBinding. type ValidatingAdmissionPolicyBindingList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // List of PolicyBinding. Items []ValidatingAdmissionPolicyBinding `json:"items" protobuf:"bytes,2,rep,name=items"` } // ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding. type ValidatingAdmissionPolicyBindingSpec struct { // PolicyName references a ValidatingAdmissionPolicy name which the ValidatingAdmissionPolicyBinding binds to. // If the referenced resource does not exist, this binding is considered invalid and will be ignored // Required. PolicyName string `json:"policyName,omitempty" protobuf:"bytes,1,rep,name=policyName"` // paramRef specifies the parameter resource used to configure the admission control policy. // It should point to a resource of the type specified in ParamKind of the bound ValidatingAdmissionPolicy. // If the policy specifies a ParamKind and the resource referred to by ParamRef does not exist, this binding is considered mis-configured and the FailurePolicy of the ValidatingAdmissionPolicy applied. // If the policy does not specify a ParamKind then this field is ignored, and the rules are evaluated without a param. // +optional ParamRef *ParamRef `json:"paramRef,omitempty" protobuf:"bytes,2,rep,name=paramRef"` // MatchResources declares what resources match this binding and will be validated by it. // Note that this is intersected with the policy's matchConstraints, so only requests that are matched by the policy can be selected by this. // If this is unset, all resources matched by the policy are validated by this binding // When resourceRules is unset, it does not constrain resource matching. If a resource is matched by the other fields of this object, it will be validated. // Note that this is differs from ValidatingAdmissionPolicy matchConstraints, where resourceRules are required. // +optional MatchResources *MatchResources `json:"matchResources,omitempty" protobuf:"bytes,3,rep,name=matchResources"` // validationActions declares how Validations of the referenced ValidatingAdmissionPolicy are enforced. // If a validation evaluates to false it is always enforced according to these actions. // // Failures defined by the ValidatingAdmissionPolicy's FailurePolicy are enforced according // to these actions only if the FailurePolicy is set to Fail, otherwise the failures are // ignored. This includes compilation errors, runtime errors and misconfigurations of the policy. // // validationActions is declared as a set of action values. Order does // not matter. validationActions may not contain duplicates of the same action. // // The supported actions values are: // // "Deny" specifies that a validation failure results in a denied request. // // "Warn" specifies that a validation failure is reported to the request client // in HTTP Warning headers, with a warning code of 299. Warnings can be sent // both for allowed or denied admission responses. // // "Audit" specifies that a validation failure is included in the published // audit event for the request. The audit event will contain a // `validation.policy.admission.k8s.io/validation_failure` audit annotation // with a value containing the details of the validation failures, formatted as // a JSON list of objects, each with the following fields: // - message: The validation failure message string // - policy: The resource name of the ValidatingAdmissionPolicy // - binding: The resource name of the ValidatingAdmissionPolicyBinding // - expressionIndex: The index of the failed validations in the ValidatingAdmissionPolicy // - validationActions: The enforcement actions enacted for the validation failure // Example audit annotation: // `"validation.policy.admission.k8s.io/validation_failure": "[{\"message\": \"Invalid value\", {\"policy\": \"policy.example.com\", {\"binding\": \"policybinding.example.com\", {\"expressionIndex\": \"1\", {\"validationActions\": [\"Audit\"]}]"` // // Clients should expect to handle additional values by ignoring // any values not recognized. // // "Deny" and "Warn" may not be used together since this combination // needlessly duplicates the validation failure both in the // API response body and the HTTP warning headers. // // Required. // +listType=set ValidationActions []ValidationAction `json:"validationActions,omitempty" protobuf:"bytes,4,rep,name=validationActions"` } // ParamRef describes how to locate the params to be used as input to // expressions of rules applied by a policy binding. // +structType=atomic type ParamRef struct { // `name` is the name of the resource being referenced. // // `name` and `selector` are mutually exclusive properties. If one is set, // the other must be unset. // // +optional Name string `json:"name,omitempty" protobuf:"bytes,1,rep,name=name"` // namespace is the namespace of the referenced resource. Allows limiting // the search for params to a specific namespace. Applies to both `name` and // `selector` fields. // // A per-namespace parameter may be used by specifying a namespace-scoped // `paramKind` in the policy and leaving this field empty. // // - If `paramKind` is cluster-scoped, this field MUST be unset. Setting this // field results in a configuration error. // // - If `paramKind` is namespace-scoped, the namespace of the object being // evaluated for admission will be used when this field is left unset. Take // care that if this is left empty the binding must not match any cluster-scoped // resources, which will result in an error. // // +optional Namespace string `json:"namespace,omitempty" protobuf:"bytes,2,rep,name=namespace"` // selector can be used to match multiple param objects based on their labels. // Supply selector: {} to match all resources of the ParamKind. // // If multiple params are found, they are all evaluated with the policy expressions // and the results are ANDed together. // // One of `name` or `selector` must be set, but `name` and `selector` are // mutually exclusive properties. If one is set, the other must be unset. // // +optional Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,3,rep,name=selector"` // `parameterNotFoundAction` controls the behavior of the binding when the resource // exists, and name or selector is valid, but there are no parameters // matched by the binding. If the value is set to `Allow`, then no // matched parameters will be treated as successful validation by the binding. // If set to `Deny`, then no matched parameters will be subject to the // `failurePolicy` of the policy. // // Allowed values are `Allow` or `Deny` // Default to `Deny` // +optional ParameterNotFoundAction *ParameterNotFoundActionType `json:"parameterNotFoundAction,omitempty" protobuf:"bytes,4,rep,name=parameterNotFoundAction"` } // MatchResources decides whether to run the admission control policy on an object based // on whether it meets the match criteria. // The exclude rules take precedence over include rules (if a resource matches both, it is excluded) // +structType=atomic type MatchResources struct { // NamespaceSelector decides whether to run the admission control policy on an object based // on whether the namespace for that object matches the selector. If the // object itself is a namespace, the matching is performed on // object.metadata.labels. If the object is another cluster scoped resource, // it never skips the policy. // // For example, to run the webhook on any objects whose namespace is not // associated with "runlevel" of "0" or "1"; you will set the selector as // follows: // "namespaceSelector": { // "matchExpressions": [ // { // "key": "runlevel", // "operator": "NotIn", // "values": [ // "0", // "1" // ] // } // ] // } // // If instead you want to only run the policy on any objects whose // namespace is associated with the "environment" of "prod" or "staging"; // you will set the selector as follows: // "namespaceSelector": { // "matchExpressions": [ // { // "key": "environment", // "operator": "In", // "values": [ // "prod", // "staging" // ] // } // ] // } // // See // https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ // for more examples of label selectors. // // Default to the empty LabelSelector, which matches everything. // +optional NamespaceSelector *metav1.LabelSelector `json:"namespaceSelector,omitempty" protobuf:"bytes,1,opt,name=namespaceSelector"` // ObjectSelector decides whether to run the validation based on if the // object has matching labels. objectSelector is evaluated against both // the oldObject and newObject that would be sent to the cel validation, and // is considered to match if either object matches the selector. A null // object (oldObject in the case of create, or newObject in the case of // delete) or an object that cannot have labels (like a // DeploymentRollback or a PodProxyOptions object) is not considered to // match. // Use the object selector only if the webhook is opt-in, because end // users may skip the admission webhook by setting the labels. // Default to the empty LabelSelector, which matches everything. // +optional ObjectSelector *metav1.LabelSelector `json:"objectSelector,omitempty" protobuf:"bytes,2,opt,name=objectSelector"` // ResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy matches. // The policy cares about an operation if it matches _any_ Rule. // +listType=atomic // +optional ResourceRules []NamedRuleWithOperations `json:"resourceRules,omitempty" protobuf:"bytes,3,rep,name=resourceRules"` // ExcludeResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy should not care about. // The exclude rules take precedence over include rules (if a resource matches both, it is excluded) // +listType=atomic // +optional ExcludeResourceRules []NamedRuleWithOperations `json:"excludeResourceRules,omitempty" protobuf:"bytes,4,rep,name=excludeResourceRules"` // matchPolicy defines how the "MatchResources" list is used to match incoming requests. // Allowed values are "Exact" or "Equivalent". // // - Exact: match a request only if it exactly matches a specified rule. // For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, // but "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, // a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the ValidatingAdmissionPolicy. // // - Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. // For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, // and "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, // a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the ValidatingAdmissionPolicy. // // Defaults to "Equivalent" // +optional MatchPolicy *MatchPolicyType `json:"matchPolicy,omitempty" protobuf:"bytes,7,opt,name=matchPolicy,casttype=MatchPolicyType"` } // ValidationAction specifies a policy enforcement action. // +enum
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
true
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/admissionregistration/v1alpha1/register.go
vendor/k8s.io/api/admissionregistration/v1alpha1/register.go
/* Copyright 2022 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package v1alpha1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" ) // GroupName is the group name for this API. const GroupName = "admissionregistration.k8s.io" // SchemeGroupVersion is group version used to register these objects var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} // Resource takes an unqualified resource and returns a Group qualified GroupResource func Resource(resource string) schema.GroupResource { return SchemeGroupVersion.WithResource(resource).GroupResource() } // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api. // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes. var ( // SchemeBuilder points to a list of functions added to Scheme. SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) localSchemeBuilder = &SchemeBuilder // AddToScheme is a common registration function for mapping packaged scoped group & version keys to a scheme. AddToScheme = localSchemeBuilder.AddToScheme ) // Adds the list of known types to scheme. func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &ValidatingAdmissionPolicy{}, &ValidatingAdmissionPolicyList{}, &ValidatingAdmissionPolicyBinding{}, &ValidatingAdmissionPolicyBindingList{}, &MutatingAdmissionPolicy{}, &MutatingAdmissionPolicyList{}, &MutatingAdmissionPolicyBinding{}, &MutatingAdmissionPolicyBindingList{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/admissionregistration/v1alpha1/zz_generated.prerelease-lifecycle.go
vendor/k8s.io/api/admissionregistration/v1alpha1/zz_generated.prerelease-lifecycle.go
//go:build !ignore_autogenerated // +build !ignore_autogenerated /* Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Code generated by prerelease-lifecycle-gen. DO NOT EDIT. package v1alpha1 // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *MutatingAdmissionPolicy) APILifecycleIntroduced() (major, minor int) { return 1, 32 } // APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. func (in *MutatingAdmissionPolicy) APILifecycleDeprecated() (major, minor int) { return 1, 35 } // APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. func (in *MutatingAdmissionPolicy) APILifecycleRemoved() (major, minor int) { return 1, 38 } // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *MutatingAdmissionPolicyBinding) APILifecycleIntroduced() (major, minor int) { return 1, 32 } // APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. func (in *MutatingAdmissionPolicyBinding) APILifecycleDeprecated() (major, minor int) { return 1, 35 } // APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. func (in *MutatingAdmissionPolicyBinding) APILifecycleRemoved() (major, minor int) { return 1, 38 } // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *MutatingAdmissionPolicyBindingList) APILifecycleIntroduced() (major, minor int) { return 1, 32 } // APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. func (in *MutatingAdmissionPolicyBindingList) APILifecycleDeprecated() (major, minor int) { return 1, 35 } // APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. func (in *MutatingAdmissionPolicyBindingList) APILifecycleRemoved() (major, minor int) { return 1, 38 } // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *MutatingAdmissionPolicyList) APILifecycleIntroduced() (major, minor int) { return 1, 32 } // APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. func (in *MutatingAdmissionPolicyList) APILifecycleDeprecated() (major, minor int) { return 1, 35 } // APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. func (in *MutatingAdmissionPolicyList) APILifecycleRemoved() (major, minor int) { return 1, 38 } // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *ValidatingAdmissionPolicy) APILifecycleIntroduced() (major, minor int) { return 1, 26 } // APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. func (in *ValidatingAdmissionPolicy) APILifecycleDeprecated() (major, minor int) { return 1, 29 } // APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. func (in *ValidatingAdmissionPolicy) APILifecycleRemoved() (major, minor int) { return 1, 32 } // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *ValidatingAdmissionPolicyBinding) APILifecycleIntroduced() (major, minor int) { return 1, 26 } // APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. func (in *ValidatingAdmissionPolicyBinding) APILifecycleDeprecated() (major, minor int) { return 1, 29 } // APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. func (in *ValidatingAdmissionPolicyBinding) APILifecycleRemoved() (major, minor int) { return 1, 32 } // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *ValidatingAdmissionPolicyBindingList) APILifecycleIntroduced() (major, minor int) { return 1, 26 } // APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. func (in *ValidatingAdmissionPolicyBindingList) APILifecycleDeprecated() (major, minor int) { return 1, 29 } // APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. func (in *ValidatingAdmissionPolicyBindingList) APILifecycleRemoved() (major, minor int) { return 1, 32 } // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *ValidatingAdmissionPolicyList) APILifecycleIntroduced() (major, minor int) { return 1, 26 } // APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. func (in *ValidatingAdmissionPolicyList) APILifecycleDeprecated() (major, minor int) { return 1, 29 } // APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. func (in *ValidatingAdmissionPolicyList) APILifecycleRemoved() (major, minor int) { return 1, 32 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/admissionregistration/v1alpha1/doc.go
vendor/k8s.io/api/admissionregistration/v1alpha1/doc.go
/* Copyright 2022 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // +k8s:deepcopy-gen=package // +k8s:protobuf-gen=package // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true // +groupName=admissionregistration.k8s.io // Package v1alpha1 is the v1alpha1 version of the API. package v1alpha1 // import "k8s.io/api/admissionregistration/v1alpha1"
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/admissionregistration/v1alpha1/generated.pb.go
vendor/k8s.io/api/admissionregistration/v1alpha1/generated.pb.go
/* Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: k8s.io/api/admissionregistration/v1alpha1/generated.proto package v1alpha1 import ( fmt "fmt" io "io" proto "github.com/gogo/protobuf/proto" k8s_io_api_admissionregistration_v1 "k8s.io/api/admissionregistration/v1" k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *ApplyConfiguration) Reset() { *m = ApplyConfiguration{} } func (*ApplyConfiguration) ProtoMessage() {} func (*ApplyConfiguration) Descriptor() ([]byte, []int) { return fileDescriptor_2c49182728ae0af5, []int{0} } func (m *ApplyConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ApplyConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ApplyConfiguration) XXX_Merge(src proto.Message) { xxx_messageInfo_ApplyConfiguration.Merge(m, src) } func (m *ApplyConfiguration) XXX_Size() int { return m.Size() } func (m *ApplyConfiguration) XXX_DiscardUnknown() { xxx_messageInfo_ApplyConfiguration.DiscardUnknown(m) } var xxx_messageInfo_ApplyConfiguration proto.InternalMessageInfo func (m *AuditAnnotation) Reset() { *m = AuditAnnotation{} } func (*AuditAnnotation) ProtoMessage() {} func (*AuditAnnotation) Descriptor() ([]byte, []int) { return fileDescriptor_2c49182728ae0af5, []int{1} } func (m *AuditAnnotation) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *AuditAnnotation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *AuditAnnotation) XXX_Merge(src proto.Message) { xxx_messageInfo_AuditAnnotation.Merge(m, src) } func (m *AuditAnnotation) XXX_Size() int { return m.Size() } func (m *AuditAnnotation) XXX_DiscardUnknown() { xxx_messageInfo_AuditAnnotation.DiscardUnknown(m) } var xxx_messageInfo_AuditAnnotation proto.InternalMessageInfo func (m *ExpressionWarning) Reset() { *m = ExpressionWarning{} } func (*ExpressionWarning) ProtoMessage() {} func (*ExpressionWarning) Descriptor() ([]byte, []int) { return fileDescriptor_2c49182728ae0af5, []int{2} } func (m *ExpressionWarning) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ExpressionWarning) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ExpressionWarning) XXX_Merge(src proto.Message) { xxx_messageInfo_ExpressionWarning.Merge(m, src) } func (m *ExpressionWarning) XXX_Size() int { return m.Size() } func (m *ExpressionWarning) XXX_DiscardUnknown() { xxx_messageInfo_ExpressionWarning.DiscardUnknown(m) } var xxx_messageInfo_ExpressionWarning proto.InternalMessageInfo func (m *JSONPatch) Reset() { *m = JSONPatch{} } func (*JSONPatch) ProtoMessage() {} func (*JSONPatch) Descriptor() ([]byte, []int) { return fileDescriptor_2c49182728ae0af5, []int{3} } func (m *JSONPatch) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *JSONPatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *JSONPatch) XXX_Merge(src proto.Message) { xxx_messageInfo_JSONPatch.Merge(m, src) } func (m *JSONPatch) XXX_Size() int { return m.Size() } func (m *JSONPatch) XXX_DiscardUnknown() { xxx_messageInfo_JSONPatch.DiscardUnknown(m) } var xxx_messageInfo_JSONPatch proto.InternalMessageInfo func (m *MatchCondition) Reset() { *m = MatchCondition{} } func (*MatchCondition) ProtoMessage() {} func (*MatchCondition) Descriptor() ([]byte, []int) { return fileDescriptor_2c49182728ae0af5, []int{4} } func (m *MatchCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MatchCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *MatchCondition) XXX_Merge(src proto.Message) { xxx_messageInfo_MatchCondition.Merge(m, src) } func (m *MatchCondition) XXX_Size() int { return m.Size() } func (m *MatchCondition) XXX_DiscardUnknown() { xxx_messageInfo_MatchCondition.DiscardUnknown(m) } var xxx_messageInfo_MatchCondition proto.InternalMessageInfo func (m *MatchResources) Reset() { *m = MatchResources{} } func (*MatchResources) ProtoMessage() {} func (*MatchResources) Descriptor() ([]byte, []int) { return fileDescriptor_2c49182728ae0af5, []int{5} } func (m *MatchResources) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MatchResources) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *MatchResources) XXX_Merge(src proto.Message) { xxx_messageInfo_MatchResources.Merge(m, src) } func (m *MatchResources) XXX_Size() int { return m.Size() } func (m *MatchResources) XXX_DiscardUnknown() { xxx_messageInfo_MatchResources.DiscardUnknown(m) } var xxx_messageInfo_MatchResources proto.InternalMessageInfo func (m *MutatingAdmissionPolicy) Reset() { *m = MutatingAdmissionPolicy{} } func (*MutatingAdmissionPolicy) ProtoMessage() {} func (*MutatingAdmissionPolicy) Descriptor() ([]byte, []int) { return fileDescriptor_2c49182728ae0af5, []int{6} } func (m *MutatingAdmissionPolicy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MutatingAdmissionPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *MutatingAdmissionPolicy) XXX_Merge(src proto.Message) { xxx_messageInfo_MutatingAdmissionPolicy.Merge(m, src) } func (m *MutatingAdmissionPolicy) XXX_Size() int { return m.Size() } func (m *MutatingAdmissionPolicy) XXX_DiscardUnknown() { xxx_messageInfo_MutatingAdmissionPolicy.DiscardUnknown(m) } var xxx_messageInfo_MutatingAdmissionPolicy proto.InternalMessageInfo func (m *MutatingAdmissionPolicyBinding) Reset() { *m = MutatingAdmissionPolicyBinding{} } func (*MutatingAdmissionPolicyBinding) ProtoMessage() {} func (*MutatingAdmissionPolicyBinding) Descriptor() ([]byte, []int) { return fileDescriptor_2c49182728ae0af5, []int{7} } func (m *MutatingAdmissionPolicyBinding) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MutatingAdmissionPolicyBinding) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *MutatingAdmissionPolicyBinding) XXX_Merge(src proto.Message) { xxx_messageInfo_MutatingAdmissionPolicyBinding.Merge(m, src) } func (m *MutatingAdmissionPolicyBinding) XXX_Size() int { return m.Size() } func (m *MutatingAdmissionPolicyBinding) XXX_DiscardUnknown() { xxx_messageInfo_MutatingAdmissionPolicyBinding.DiscardUnknown(m) } var xxx_messageInfo_MutatingAdmissionPolicyBinding proto.InternalMessageInfo func (m *MutatingAdmissionPolicyBindingList) Reset() { *m = MutatingAdmissionPolicyBindingList{} } func (*MutatingAdmissionPolicyBindingList) ProtoMessage() {} func (*MutatingAdmissionPolicyBindingList) Descriptor() ([]byte, []int) { return fileDescriptor_2c49182728ae0af5, []int{8} } func (m *MutatingAdmissionPolicyBindingList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MutatingAdmissionPolicyBindingList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *MutatingAdmissionPolicyBindingList) XXX_Merge(src proto.Message) { xxx_messageInfo_MutatingAdmissionPolicyBindingList.Merge(m, src) } func (m *MutatingAdmissionPolicyBindingList) XXX_Size() int { return m.Size() } func (m *MutatingAdmissionPolicyBindingList) XXX_DiscardUnknown() { xxx_messageInfo_MutatingAdmissionPolicyBindingList.DiscardUnknown(m) } var xxx_messageInfo_MutatingAdmissionPolicyBindingList proto.InternalMessageInfo func (m *MutatingAdmissionPolicyBindingSpec) Reset() { *m = MutatingAdmissionPolicyBindingSpec{} } func (*MutatingAdmissionPolicyBindingSpec) ProtoMessage() {} func (*MutatingAdmissionPolicyBindingSpec) Descriptor() ([]byte, []int) { return fileDescriptor_2c49182728ae0af5, []int{9} } func (m *MutatingAdmissionPolicyBindingSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MutatingAdmissionPolicyBindingSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *MutatingAdmissionPolicyBindingSpec) XXX_Merge(src proto.Message) { xxx_messageInfo_MutatingAdmissionPolicyBindingSpec.Merge(m, src) } func (m *MutatingAdmissionPolicyBindingSpec) XXX_Size() int { return m.Size() } func (m *MutatingAdmissionPolicyBindingSpec) XXX_DiscardUnknown() { xxx_messageInfo_MutatingAdmissionPolicyBindingSpec.DiscardUnknown(m) } var xxx_messageInfo_MutatingAdmissionPolicyBindingSpec proto.InternalMessageInfo func (m *MutatingAdmissionPolicyList) Reset() { *m = MutatingAdmissionPolicyList{} } func (*MutatingAdmissionPolicyList) ProtoMessage() {} func (*MutatingAdmissionPolicyList) Descriptor() ([]byte, []int) { return fileDescriptor_2c49182728ae0af5, []int{10} } func (m *MutatingAdmissionPolicyList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MutatingAdmissionPolicyList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *MutatingAdmissionPolicyList) XXX_Merge(src proto.Message) { xxx_messageInfo_MutatingAdmissionPolicyList.Merge(m, src) } func (m *MutatingAdmissionPolicyList) XXX_Size() int { return m.Size() } func (m *MutatingAdmissionPolicyList) XXX_DiscardUnknown() { xxx_messageInfo_MutatingAdmissionPolicyList.DiscardUnknown(m) } var xxx_messageInfo_MutatingAdmissionPolicyList proto.InternalMessageInfo func (m *MutatingAdmissionPolicySpec) Reset() { *m = MutatingAdmissionPolicySpec{} } func (*MutatingAdmissionPolicySpec) ProtoMessage() {} func (*MutatingAdmissionPolicySpec) Descriptor() ([]byte, []int) { return fileDescriptor_2c49182728ae0af5, []int{11} } func (m *MutatingAdmissionPolicySpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MutatingAdmissionPolicySpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *MutatingAdmissionPolicySpec) XXX_Merge(src proto.Message) { xxx_messageInfo_MutatingAdmissionPolicySpec.Merge(m, src) } func (m *MutatingAdmissionPolicySpec) XXX_Size() int { return m.Size() } func (m *MutatingAdmissionPolicySpec) XXX_DiscardUnknown() { xxx_messageInfo_MutatingAdmissionPolicySpec.DiscardUnknown(m) } var xxx_messageInfo_MutatingAdmissionPolicySpec proto.InternalMessageInfo func (m *Mutation) Reset() { *m = Mutation{} } func (*Mutation) ProtoMessage() {} func (*Mutation) Descriptor() ([]byte, []int) { return fileDescriptor_2c49182728ae0af5, []int{12} } func (m *Mutation) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *Mutation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *Mutation) XXX_Merge(src proto.Message) { xxx_messageInfo_Mutation.Merge(m, src) } func (m *Mutation) XXX_Size() int { return m.Size() } func (m *Mutation) XXX_DiscardUnknown() { xxx_messageInfo_Mutation.DiscardUnknown(m) } var xxx_messageInfo_Mutation proto.InternalMessageInfo func (m *NamedRuleWithOperations) Reset() { *m = NamedRuleWithOperations{} } func (*NamedRuleWithOperations) ProtoMessage() {} func (*NamedRuleWithOperations) Descriptor() ([]byte, []int) { return fileDescriptor_2c49182728ae0af5, []int{13} } func (m *NamedRuleWithOperations) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *NamedRuleWithOperations) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *NamedRuleWithOperations) XXX_Merge(src proto.Message) { xxx_messageInfo_NamedRuleWithOperations.Merge(m, src) } func (m *NamedRuleWithOperations) XXX_Size() int { return m.Size() } func (m *NamedRuleWithOperations) XXX_DiscardUnknown() { xxx_messageInfo_NamedRuleWithOperations.DiscardUnknown(m) } var xxx_messageInfo_NamedRuleWithOperations proto.InternalMessageInfo func (m *ParamKind) Reset() { *m = ParamKind{} } func (*ParamKind) ProtoMessage() {} func (*ParamKind) Descriptor() ([]byte, []int) { return fileDescriptor_2c49182728ae0af5, []int{14} } func (m *ParamKind) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ParamKind) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ParamKind) XXX_Merge(src proto.Message) { xxx_messageInfo_ParamKind.Merge(m, src) } func (m *ParamKind) XXX_Size() int { return m.Size() } func (m *ParamKind) XXX_DiscardUnknown() { xxx_messageInfo_ParamKind.DiscardUnknown(m) } var xxx_messageInfo_ParamKind proto.InternalMessageInfo func (m *ParamRef) Reset() { *m = ParamRef{} } func (*ParamRef) ProtoMessage() {} func (*ParamRef) Descriptor() ([]byte, []int) { return fileDescriptor_2c49182728ae0af5, []int{15} } func (m *ParamRef) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ParamRef) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ParamRef) XXX_Merge(src proto.Message) { xxx_messageInfo_ParamRef.Merge(m, src) } func (m *ParamRef) XXX_Size() int { return m.Size() } func (m *ParamRef) XXX_DiscardUnknown() { xxx_messageInfo_ParamRef.DiscardUnknown(m) } var xxx_messageInfo_ParamRef proto.InternalMessageInfo func (m *TypeChecking) Reset() { *m = TypeChecking{} } func (*TypeChecking) ProtoMessage() {} func (*TypeChecking) Descriptor() ([]byte, []int) { return fileDescriptor_2c49182728ae0af5, []int{16} } func (m *TypeChecking) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *TypeChecking) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *TypeChecking) XXX_Merge(src proto.Message) { xxx_messageInfo_TypeChecking.Merge(m, src) } func (m *TypeChecking) XXX_Size() int { return m.Size() } func (m *TypeChecking) XXX_DiscardUnknown() { xxx_messageInfo_TypeChecking.DiscardUnknown(m) } var xxx_messageInfo_TypeChecking proto.InternalMessageInfo func (m *ValidatingAdmissionPolicy) Reset() { *m = ValidatingAdmissionPolicy{} } func (*ValidatingAdmissionPolicy) ProtoMessage() {} func (*ValidatingAdmissionPolicy) Descriptor() ([]byte, []int) { return fileDescriptor_2c49182728ae0af5, []int{17} } func (m *ValidatingAdmissionPolicy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ValidatingAdmissionPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ValidatingAdmissionPolicy) XXX_Merge(src proto.Message) { xxx_messageInfo_ValidatingAdmissionPolicy.Merge(m, src) } func (m *ValidatingAdmissionPolicy) XXX_Size() int { return m.Size() } func (m *ValidatingAdmissionPolicy) XXX_DiscardUnknown() { xxx_messageInfo_ValidatingAdmissionPolicy.DiscardUnknown(m) } var xxx_messageInfo_ValidatingAdmissionPolicy proto.InternalMessageInfo func (m *ValidatingAdmissionPolicyBinding) Reset() { *m = ValidatingAdmissionPolicyBinding{} } func (*ValidatingAdmissionPolicyBinding) ProtoMessage() {} func (*ValidatingAdmissionPolicyBinding) Descriptor() ([]byte, []int) { return fileDescriptor_2c49182728ae0af5, []int{18} } func (m *ValidatingAdmissionPolicyBinding) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ValidatingAdmissionPolicyBinding) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ValidatingAdmissionPolicyBinding) XXX_Merge(src proto.Message) { xxx_messageInfo_ValidatingAdmissionPolicyBinding.Merge(m, src) } func (m *ValidatingAdmissionPolicyBinding) XXX_Size() int { return m.Size() } func (m *ValidatingAdmissionPolicyBinding) XXX_DiscardUnknown() { xxx_messageInfo_ValidatingAdmissionPolicyBinding.DiscardUnknown(m) } var xxx_messageInfo_ValidatingAdmissionPolicyBinding proto.InternalMessageInfo func (m *ValidatingAdmissionPolicyBindingList) Reset() { *m = ValidatingAdmissionPolicyBindingList{} } func (*ValidatingAdmissionPolicyBindingList) ProtoMessage() {} func (*ValidatingAdmissionPolicyBindingList) Descriptor() ([]byte, []int) { return fileDescriptor_2c49182728ae0af5, []int{19} } func (m *ValidatingAdmissionPolicyBindingList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ValidatingAdmissionPolicyBindingList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ValidatingAdmissionPolicyBindingList) XXX_Merge(src proto.Message) { xxx_messageInfo_ValidatingAdmissionPolicyBindingList.Merge(m, src) } func (m *ValidatingAdmissionPolicyBindingList) XXX_Size() int { return m.Size() } func (m *ValidatingAdmissionPolicyBindingList) XXX_DiscardUnknown() { xxx_messageInfo_ValidatingAdmissionPolicyBindingList.DiscardUnknown(m) } var xxx_messageInfo_ValidatingAdmissionPolicyBindingList proto.InternalMessageInfo func (m *ValidatingAdmissionPolicyBindingSpec) Reset() { *m = ValidatingAdmissionPolicyBindingSpec{} } func (*ValidatingAdmissionPolicyBindingSpec) ProtoMessage() {} func (*ValidatingAdmissionPolicyBindingSpec) Descriptor() ([]byte, []int) { return fileDescriptor_2c49182728ae0af5, []int{20} } func (m *ValidatingAdmissionPolicyBindingSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ValidatingAdmissionPolicyBindingSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ValidatingAdmissionPolicyBindingSpec) XXX_Merge(src proto.Message) { xxx_messageInfo_ValidatingAdmissionPolicyBindingSpec.Merge(m, src) } func (m *ValidatingAdmissionPolicyBindingSpec) XXX_Size() int { return m.Size() } func (m *ValidatingAdmissionPolicyBindingSpec) XXX_DiscardUnknown() { xxx_messageInfo_ValidatingAdmissionPolicyBindingSpec.DiscardUnknown(m) } var xxx_messageInfo_ValidatingAdmissionPolicyBindingSpec proto.InternalMessageInfo func (m *ValidatingAdmissionPolicyList) Reset() { *m = ValidatingAdmissionPolicyList{} } func (*ValidatingAdmissionPolicyList) ProtoMessage() {} func (*ValidatingAdmissionPolicyList) Descriptor() ([]byte, []int) { return fileDescriptor_2c49182728ae0af5, []int{21} } func (m *ValidatingAdmissionPolicyList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ValidatingAdmissionPolicyList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ValidatingAdmissionPolicyList) XXX_Merge(src proto.Message) { xxx_messageInfo_ValidatingAdmissionPolicyList.Merge(m, src) } func (m *ValidatingAdmissionPolicyList) XXX_Size() int { return m.Size() } func (m *ValidatingAdmissionPolicyList) XXX_DiscardUnknown() { xxx_messageInfo_ValidatingAdmissionPolicyList.DiscardUnknown(m) } var xxx_messageInfo_ValidatingAdmissionPolicyList proto.InternalMessageInfo func (m *ValidatingAdmissionPolicySpec) Reset() { *m = ValidatingAdmissionPolicySpec{} } func (*ValidatingAdmissionPolicySpec) ProtoMessage() {} func (*ValidatingAdmissionPolicySpec) Descriptor() ([]byte, []int) { return fileDescriptor_2c49182728ae0af5, []int{22} } func (m *ValidatingAdmissionPolicySpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ValidatingAdmissionPolicySpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ValidatingAdmissionPolicySpec) XXX_Merge(src proto.Message) { xxx_messageInfo_ValidatingAdmissionPolicySpec.Merge(m, src) } func (m *ValidatingAdmissionPolicySpec) XXX_Size() int { return m.Size() } func (m *ValidatingAdmissionPolicySpec) XXX_DiscardUnknown() { xxx_messageInfo_ValidatingAdmissionPolicySpec.DiscardUnknown(m) } var xxx_messageInfo_ValidatingAdmissionPolicySpec proto.InternalMessageInfo func (m *ValidatingAdmissionPolicyStatus) Reset() { *m = ValidatingAdmissionPolicyStatus{} } func (*ValidatingAdmissionPolicyStatus) ProtoMessage() {} func (*ValidatingAdmissionPolicyStatus) Descriptor() ([]byte, []int) { return fileDescriptor_2c49182728ae0af5, []int{23} } func (m *ValidatingAdmissionPolicyStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ValidatingAdmissionPolicyStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ValidatingAdmissionPolicyStatus) XXX_Merge(src proto.Message) { xxx_messageInfo_ValidatingAdmissionPolicyStatus.Merge(m, src) } func (m *ValidatingAdmissionPolicyStatus) XXX_Size() int { return m.Size() } func (m *ValidatingAdmissionPolicyStatus) XXX_DiscardUnknown() { xxx_messageInfo_ValidatingAdmissionPolicyStatus.DiscardUnknown(m) } var xxx_messageInfo_ValidatingAdmissionPolicyStatus proto.InternalMessageInfo func (m *Validation) Reset() { *m = Validation{} } func (*Validation) ProtoMessage() {} func (*Validation) Descriptor() ([]byte, []int) { return fileDescriptor_2c49182728ae0af5, []int{24} } func (m *Validation) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *Validation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *Validation) XXX_Merge(src proto.Message) { xxx_messageInfo_Validation.Merge(m, src) } func (m *Validation) XXX_Size() int { return m.Size() } func (m *Validation) XXX_DiscardUnknown() { xxx_messageInfo_Validation.DiscardUnknown(m) } var xxx_messageInfo_Validation proto.InternalMessageInfo func (m *Variable) Reset() { *m = Variable{} } func (*Variable) ProtoMessage() {} func (*Variable) Descriptor() ([]byte, []int) { return fileDescriptor_2c49182728ae0af5, []int{25} } func (m *Variable) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *Variable) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *Variable) XXX_Merge(src proto.Message) { xxx_messageInfo_Variable.Merge(m, src) } func (m *Variable) XXX_Size() int { return m.Size() } func (m *Variable) XXX_DiscardUnknown() { xxx_messageInfo_Variable.DiscardUnknown(m) } var xxx_messageInfo_Variable proto.InternalMessageInfo func init() { proto.RegisterType((*ApplyConfiguration)(nil), "k8s.io.api.admissionregistration.v1alpha1.ApplyConfiguration") proto.RegisterType((*AuditAnnotation)(nil), "k8s.io.api.admissionregistration.v1alpha1.AuditAnnotation") proto.RegisterType((*ExpressionWarning)(nil), "k8s.io.api.admissionregistration.v1alpha1.ExpressionWarning") proto.RegisterType((*JSONPatch)(nil), "k8s.io.api.admissionregistration.v1alpha1.JSONPatch") proto.RegisterType((*MatchCondition)(nil), "k8s.io.api.admissionregistration.v1alpha1.MatchCondition") proto.RegisterType((*MatchResources)(nil), "k8s.io.api.admissionregistration.v1alpha1.MatchResources") proto.RegisterType((*MutatingAdmissionPolicy)(nil), "k8s.io.api.admissionregistration.v1alpha1.MutatingAdmissionPolicy") proto.RegisterType((*MutatingAdmissionPolicyBinding)(nil), "k8s.io.api.admissionregistration.v1alpha1.MutatingAdmissionPolicyBinding") proto.RegisterType((*MutatingAdmissionPolicyBindingList)(nil), "k8s.io.api.admissionregistration.v1alpha1.MutatingAdmissionPolicyBindingList") proto.RegisterType((*MutatingAdmissionPolicyBindingSpec)(nil), "k8s.io.api.admissionregistration.v1alpha1.MutatingAdmissionPolicyBindingSpec") proto.RegisterType((*MutatingAdmissionPolicyList)(nil), "k8s.io.api.admissionregistration.v1alpha1.MutatingAdmissionPolicyList") proto.RegisterType((*MutatingAdmissionPolicySpec)(nil), "k8s.io.api.admissionregistration.v1alpha1.MutatingAdmissionPolicySpec") proto.RegisterType((*Mutation)(nil), "k8s.io.api.admissionregistration.v1alpha1.Mutation") proto.RegisterType((*NamedRuleWithOperations)(nil), "k8s.io.api.admissionregistration.v1alpha1.NamedRuleWithOperations") proto.RegisterType((*ParamKind)(nil), "k8s.io.api.admissionregistration.v1alpha1.ParamKind") proto.RegisterType((*ParamRef)(nil), "k8s.io.api.admissionregistration.v1alpha1.ParamRef") proto.RegisterType((*TypeChecking)(nil), "k8s.io.api.admissionregistration.v1alpha1.TypeChecking") proto.RegisterType((*ValidatingAdmissionPolicy)(nil), "k8s.io.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicy") proto.RegisterType((*ValidatingAdmissionPolicyBinding)(nil), "k8s.io.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyBinding") proto.RegisterType((*ValidatingAdmissionPolicyBindingList)(nil), "k8s.io.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyBindingList") proto.RegisterType((*ValidatingAdmissionPolicyBindingSpec)(nil), "k8s.io.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyBindingSpec") proto.RegisterType((*ValidatingAdmissionPolicyList)(nil), "k8s.io.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyList") proto.RegisterType((*ValidatingAdmissionPolicySpec)(nil), "k8s.io.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicySpec") proto.RegisterType((*ValidatingAdmissionPolicyStatus)(nil), "k8s.io.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyStatus") proto.RegisterType((*Validation)(nil), "k8s.io.api.admissionregistration.v1alpha1.Validation") proto.RegisterType((*Variable)(nil), "k8s.io.api.admissionregistration.v1alpha1.Variable") } func init() { proto.RegisterFile("k8s.io/api/admissionregistration/v1alpha1/generated.proto", fileDescriptor_2c49182728ae0af5) } var fileDescriptor_2c49182728ae0af5 = []byte{ // 1783 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x59, 0xdd, 0x6f, 0x1b, 0x4b, 0x15, 0xcf, 0xda, 0xce, 0x87, 0xc7, 0xf9, 0xf2, 0xd0, 0x12, 0x37, 0xa5, 0xde, 0x68, 0x55, 0xa1, 0x46, 0x82, 0x35, 0x49, 0x0b, 0xa5, 0x55, 0x51, 0x95, 0x6d, 0x9b, 0xb6, 0x69, 0x9d, 0x44, 0x53, 0x94, 0x20, 0x04, 0x12, 0x93, 0xf5, 0xc4, 0xde, 0xc6, 0xfb, 0xc1, 0xce, 0x3a, 0x34, 0x02, 0x89, 0x4a, 0x08, 0x09, 0xde, 0x78, 0xe0, 0x85, 0x37, 0xc4, 0x1f, 0xc0, 0x03, 0xfc, 0x05, 0xbc, 0xf5, 0xb1, 0x8f, 0xe5, 0x81, 0x15, 0x35, 0x20, 0xf1, 0x0c, 0xd2, 0xbd, 0x52, 0x5e, 0xee, 0xd5, 0xcc, 0xce, 0x7e, 0x79, 0xed, 0xc6, 0x4e, 0xd3, 0xf4, 0xe1, 0xde, 0x37, 0xcf, 0xf9, 0xf8, 0x9d, 0x39, 0x67, 0xce, 0x9c, 0x39, 0xc7, 0x0b, 0x6e, 0x1d, 0x7c, 0x97, 0xaa, 0x86, 0x5d, 0xc3, 0x8e, 0x51, 0xc3, 0x0d, 0xd3, 0xa0, 0xd4, 0xb0, 0x2d, 0x97, 0x34, 0x0d, 0xea, 0xb9, 0xd8, 0x33, 0x6c, 0xab, 0x76, 0xb8, 0x82, 0xdb, 0x4e, 0x0b, 0xaf, 0xd4, 0x9a, 0xc4, 0x22, 0x2e, 0xf6, 0x48, 0x43, 0x75, 0x5c, 0xdb, 0xb3, 0xe1, 0x72, 0xa0, 0xaa, 0x62, 0xc7, 0x50, 0xfb, 0xaa, 0xaa, 0xa1, 0xea, 0xe2, 0x37, 0x9b, 0x86, 0xd7, 0xea, 0xec, 0xa9, 0xba, 0x6d, 0xd6, 0x9a, 0x76, 0xd3, 0xae, 0x71, 0x84, 0xbd, 0xce, 0x3e, 0x5f, 0xf1, 0x05, 0xff, 0x15, 0x20, 0x2f, 0x5e, 0x1f, 0x62, 0x53, 0xbd, 0xdb, 0x59, 0xbc, 0x11, 0x2b, 0x99, 0x58, 0x6f, 0x19, 0x16, 0x71, 0x8f, 0x6a, 0xce, 0x41, 0x93, 0x11, 0x68, 0xcd, 0x24, 0x1e, 0xee, 0xa7, 0x55, 0x1b, 0xa4, 0xe5, 0x76, 0x2c, 0xcf, 0x30, 0x49, 0x46, 0xe1, 0x3b, 0x27, 0x29, 0x50, 0xbd, 0x45, 0x4c, 0xdc, 0xab, 0xa7, 0x3c, 0x02, 0x70, 0xcd, 0x71, 0xda, 0x47, 0xf7, 0x6c, 0x6b, 0xdf, 0x68, 0x76, 0x02, 0x3f, 0xe0, 0x2a, 0x00, 0xe4, 0x85, 0xe3, 0x12, 0xee, 0x61, 0x45, 0x5a, 0x92, 0xae, 0x15, 0x35, 0xf8, 0xca, 0x97, 0xc7, 0xba, 0xbe, 0x0c, 0x1e, 0x44, 0x1c, 0x94, 0x90, 0x52, 0x28, 0x98, 0x5b, 0xeb, 0x34, 0x0c, 0x6f, 0xcd, 0xb2, 0x6c, 0x2f, 0x80, 0xb9, 0x02, 0xf2, 0x07, 0xe4, 0x48, 0xe8, 0x97, 0x84, 0x7e, 0xfe, 0x09, 0x39, 0x42, 0x8c, 0x0e, 0xd7, 0xc0, 0xdc, 0x21, 0x6e, 0x77, 0x48, 0x0c, 0x58, 0xc9, 0x71, 0xd1, 0x05, 0x21, 0x3a, 0xb7, 0x93, 0x66, 0xa3, 0x5e, 0x79, 0xa5, 0x0d, 0xca, 0xf1, 0x6a, 0x17, 0xbb, 0x96, 0x61, 0x35, 0xe1, 0x37, 0xc0, 0xd4, 0xbe, 0x41, 0xda, 0x0d, 0x44, 0xf6, 0x05, 0xe0, 0xbc, 0x00, 0x9c, 0x5a, 0x17, 0x74, 0x14, 0x49, 0xc0, 0x65, 0x30, 0xf9, 0xb3, 0x40, 0xb1, 0x92, 0xe7, 0xc2, 0x73, 0x42, 0x78, 0x52, 0xe0, 0xa1, 0x90, 0xaf, 0xdc, 0x05, 0xc5, 0x8d, 0x67, 0x5b, 0x9b, 0xdb, 0xd8, 0xd3, 0x5b, 0xa7, 0x8a, 0xd1, 0x3e, 0x98, 0xad, 0x33, 0xe5, 0x7b, 0xb6, 0xd5, 0x30, 0x78, 0x88, 0x96, 0x40, 0xc1, 0xc2, 0x26, 0x11, 0xfa, 0xd3, 0x42, 0xbf, 0xb0, 0x89, 0x4d, 0x82, 0x38, 0xa7, 0xc7, 0x4e, 0x6e, 0x28, 0x3b, 0x7f, 0x2f, 0x08, 0x43, 0x88, 0x50, 0xbb, 0xe3, 0xea, 0x84, 0xc2, 0x17, 0xa0, 0xcc, 0xe0, 0xa8, 0x83, 0x75, 0xf2, 0x8c, 0xb4, 0x89, 0xee, 0xd9, 0x2e, 0xb7, 0x5a, 0x5a, 0xbd, 0xae, 0xc6, 0x57, 0x26, 0x4a, 0x1e, 0xd5, 0x39, 0x68, 0x32, 0x02, 0x55, 0x59, 0x8e, 0xaa, 0x87, 0x2b, 0xea, 0x53, 0xbc, 0x47, 0xda, 0xa1, 0xaa, 0x76, 0xb1, 0xeb, 0xcb, 0xe5, 0xcd, 0x5e, 0x44, 0x94, 0x35, 0x02, 0x6d, 0x30, 0x6b, 0xef, 0x3d, 0x27, 0xba, 0x17, 0x99, 0xcd, 0x9d, 0xde, 0x2c, 0xec, 0xfa, 0xf2, 0xec, 0x56, 0x0a, 0x0e, 0xf5, 0xc0, 0xc3, 0x5f, 0x82, 0x19, 0x57, 0xf8, 0x8d, 0x3a, 0x6d, 0x42, 0x2b, 0xf9, 0xa5, 0xfc, 0xb5, 0xd2, 0xaa, 0xa6, 0x0e, 0x5d, 0x19, 0x54, 0xe6, 0x58, 0x83, 0x29, 0xef, 0x1a, 0x5e, 0x6b, 0xcb, 0x21, 0x01, 0x9f, 0x6a, 0x17, 0x45, 0xe0, 0x67, 0x50, 0xd2, 0x00, 0x4a, 0xdb, 0x83, 0xbf, 0x97, 0xc0, 0x05, 0xf2, 0x42, 0x6f, 0x77, 0x1a, 0x24, 0x25, 0x57, 0x29, 0x9c, 0xd9, 0x46, 0xbe, 0x26, 0x36, 0x72, 0xe1, 0x41, 0x1f, 0x3b, 0xa8, 0xaf, 0x75, 0x78, 0x1f, 0x94, 0x4c, 0x96, 0x14, 0xdb, 0x76, 0xdb, 0xd0, 0x8f, 0x2a, 0x93, 0x3c, 0x95, 0x94, 0xae, 0x2f, 0x97, 0xea, 0x31, 0xf9, 0xd8, 0x97, 0xe7, 0x12, 0xcb, 0xef, 0x1f, 0x39, 0x04, 0x25, 0xd5, 0x94, 0xff, 0x48, 0x60, 0xa1, 0xde, 0x61, 0x37, 0xdc, 0x6a, 0xae, 0x85, 0x9b, 0x0f, 0x78, 0xf0, 0x27, 0x60, 0x8a, 0x1d, 0x5b, 0x03, 0x7b, 0x58, 0xe4, 0xd6, 0xb7, 0x86, 0x3b, 0xe4, 0xe0, 0x44, 0xeb, 0xc4, 0xc3, 0x71, 0x6e, 0xc7, 0x34, 0x14, 0xa1, 0xc2, 0x16, 0x28, 0x50, 0x87, 0xe8, 0x22, 0x85, 0xd6, 0x47, 0x88, 0xe4, 0x80, 0x3d, 0x3f, 0x73, 0x88, 0x1e, 0xdf, 0x3b, 0xb6, 0x42, 0xdc, 0x82, 0xf2, 0x7f, 0x09, 0x54, 0x07, 0xe8, 0x68, 0x86, 0xd5, 0x60, 0x85,
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
true
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/admissionregistration/v1/types_swagger_doc_generated.go
vendor/k8s.io/api/admissionregistration/v1/types_swagger_doc_generated.go
/* Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package v1 // This file contains a collection of methods that can be used from go-restful to // generate Swagger API documentation for its models. Please read this PR for more // information on the implementation: https://github.com/emicklei/go-restful/pull/215 // // TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if // they are on one line! For multiple line or blocks that you want to ignore use ---. // Any context after a --- is ignored. // // Those methods can be generated by using hack/update-codegen.sh // AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_AuditAnnotation = map[string]string{ "": "AuditAnnotation describes how to produce an audit annotation for an API request.", "key": "key specifies the audit annotation key. The audit annotation keys of a ValidatingAdmissionPolicy must be unique. The key must be a qualified name ([A-Za-z0-9][-A-Za-z0-9_.]*) no more than 63 bytes in length.\n\nThe key is combined with the resource name of the ValidatingAdmissionPolicy to construct an audit annotation key: \"{ValidatingAdmissionPolicy name}/{key}\".\n\nIf an admission webhook uses the same resource name as this ValidatingAdmissionPolicy and the same audit annotation key, the annotation key will be identical. In this case, the first annotation written with the key will be included in the audit event and all subsequent annotations with the same key will be discarded.\n\nRequired.", "valueExpression": "valueExpression represents the expression which is evaluated by CEL to produce an audit annotation value. The expression must evaluate to either a string or null value. If the expression evaluates to a string, the audit annotation is included with the string value. If the expression evaluates to null or empty string the audit annotation will be omitted. The valueExpression may be no longer than 5kb in length. If the result of the valueExpression is more than 10kb in length, it will be truncated to 10kb.\n\nIf multiple ValidatingAdmissionPolicyBinding resources match an API request, then the valueExpression will be evaluated for each binding. All unique values produced by the valueExpressions will be joined together in a comma-separated list.\n\nRequired.", } func (AuditAnnotation) SwaggerDoc() map[string]string { return map_AuditAnnotation } var map_ExpressionWarning = map[string]string{ "": "ExpressionWarning is a warning information that targets a specific expression.", "fieldRef": "The path to the field that refers the expression. For example, the reference to the expression of the first item of validations is \"spec.validations[0].expression\"", "warning": "The content of type checking information in a human-readable form. Each line of the warning contains the type that the expression is checked against, followed by the type check error from the compiler.", } func (ExpressionWarning) SwaggerDoc() map[string]string { return map_ExpressionWarning } var map_MatchCondition = map[string]string{ "": "MatchCondition represents a condition which must by fulfilled for a request to be sent to a webhook.", "name": "Name is an identifier for this match condition, used for strategic merging of MatchConditions, as well as providing an identifier for logging purposes. A good name should be descriptive of the associated expression. Name must be a qualified name consisting of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyName', or 'my.name', or '123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]') with an optional DNS subdomain prefix and '/' (e.g. 'example.com/MyName')\n\nRequired.", "expression": "Expression represents the expression which will be evaluated by CEL. Must evaluate to bool. CEL expressions have access to the contents of the AdmissionRequest and Authorizer, organized into CEL variables:\n\n'object' - The object from the incoming request. The value is null for DELETE requests. 'oldObject' - The existing object. The value is null for CREATE requests. 'request' - Attributes of the admission request(/pkg/apis/admission/types.go#AdmissionRequest). 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.\n See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz\n'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the\n request resource.\nDocumentation on CEL: https://kubernetes.io/docs/reference/using-api/cel/\n\nRequired.", } func (MatchCondition) SwaggerDoc() map[string]string { return map_MatchCondition } var map_MatchResources = map[string]string{ "": "MatchResources decides whether to run the admission control policy on an object based on whether it meets the match criteria. The exclude rules take precedence over include rules (if a resource matches both, it is excluded)", "namespaceSelector": "NamespaceSelector decides whether to run the admission control policy on an object based on whether the namespace for that object matches the selector. If the object itself is a namespace, the matching is performed on object.metadata.labels. If the object is another cluster scoped resource, it never skips the policy.\n\nFor example, to run the webhook on any objects whose namespace is not associated with \"runlevel\" of \"0\" or \"1\"; you will set the selector as follows: \"namespaceSelector\": {\n \"matchExpressions\": [\n {\n \"key\": \"runlevel\",\n \"operator\": \"NotIn\",\n \"values\": [\n \"0\",\n \"1\"\n ]\n }\n ]\n}\n\nIf instead you want to only run the policy on any objects whose namespace is associated with the \"environment\" of \"prod\" or \"staging\"; you will set the selector as follows: \"namespaceSelector\": {\n \"matchExpressions\": [\n {\n \"key\": \"environment\",\n \"operator\": \"In\",\n \"values\": [\n \"prod\",\n \"staging\"\n ]\n }\n ]\n}\n\nSee https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ for more examples of label selectors.\n\nDefault to the empty LabelSelector, which matches everything.", "objectSelector": "ObjectSelector decides whether to run the validation based on if the object has matching labels. objectSelector is evaluated against both the oldObject and newObject that would be sent to the cel validation, and is considered to match if either object matches the selector. A null object (oldObject in the case of create, or newObject in the case of delete) or an object that cannot have labels (like a DeploymentRollback or a PodProxyOptions object) is not considered to match. Use the object selector only if the webhook is opt-in, because end users may skip the admission webhook by setting the labels. Default to the empty LabelSelector, which matches everything.", "resourceRules": "ResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy matches. The policy cares about an operation if it matches _any_ Rule.", "excludeResourceRules": "ExcludeResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy should not care about. The exclude rules take precedence over include rules (if a resource matches both, it is excluded)", "matchPolicy": "matchPolicy defines how the \"MatchResources\" list is used to match incoming requests. Allowed values are \"Exact\" or \"Equivalent\".\n\n- Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the ValidatingAdmissionPolicy.\n\n- Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the ValidatingAdmissionPolicy.\n\nDefaults to \"Equivalent\"", } func (MatchResources) SwaggerDoc() map[string]string { return map_MatchResources } var map_MutatingWebhook = map[string]string{ "": "MutatingWebhook describes an admission webhook and the resources and operations it applies to.", "name": "The name of the admission webhook. Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where \"imagepolicy\" is the name of the webhook, and kubernetes.io is the name of the organization. Required.", "clientConfig": "ClientConfig defines how to communicate with the hook. Required", "rules": "Rules describes what operations on what resources/subresources the webhook cares about. The webhook cares about an operation if it matches _any_ Rule. However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks from putting the cluster in a state which cannot be recovered from without completely disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects.", "failurePolicy": "FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Fail.", "matchPolicy": "matchPolicy defines how the \"rules\" list is used to match incoming requests. Allowed values are \"Exact\" or \"Equivalent\".\n\n- Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the webhook.\n\n- Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the webhook.\n\nDefaults to \"Equivalent\"", "namespaceSelector": "NamespaceSelector decides whether to run the webhook on an object based on whether the namespace for that object matches the selector. If the object itself is a namespace, the matching is performed on object.metadata.labels. If the object is another cluster scoped resource, it never skips the webhook.\n\nFor example, to run the webhook on any objects whose namespace is not associated with \"runlevel\" of \"0\" or \"1\"; you will set the selector as follows: \"namespaceSelector\": {\n \"matchExpressions\": [\n {\n \"key\": \"runlevel\",\n \"operator\": \"NotIn\",\n \"values\": [\n \"0\",\n \"1\"\n ]\n }\n ]\n}\n\nIf instead you want to only run the webhook on any objects whose namespace is associated with the \"environment\" of \"prod\" or \"staging\"; you will set the selector as follows: \"namespaceSelector\": {\n \"matchExpressions\": [\n {\n \"key\": \"environment\",\n \"operator\": \"In\",\n \"values\": [\n \"prod\",\n \"staging\"\n ]\n }\n ]\n}\n\nSee https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ for more examples of label selectors.\n\nDefault to the empty LabelSelector, which matches everything.", "objectSelector": "ObjectSelector decides whether to run the webhook based on if the object has matching labels. objectSelector is evaluated against both the oldObject and newObject that would be sent to the webhook, and is considered to match if either object matches the selector. A null object (oldObject in the case of create, or newObject in the case of delete) or an object that cannot have labels (like a DeploymentRollback or a PodProxyOptions object) is not considered to match. Use the object selector only if the webhook is opt-in, because end users may skip the admission webhook by setting the labels. Default to the empty LabelSelector, which matches everything.", "sideEffects": "SideEffects states whether this webhook has side effects. Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some.", "timeoutSeconds": "TimeoutSeconds specifies the timeout for this webhook. After the timeout passes, the webhook call will be ignored or the API call will fail based on the failure policy. The timeout value must be between 1 and 30 seconds. Default to 10 seconds.", "admissionReviewVersions": "AdmissionReviewVersions is an ordered list of preferred `AdmissionReview` versions the Webhook expects. API server will try to use first version in the list which it supports. If none of the versions specified in this list supported by API server, validation will fail for this object. If a persisted webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail and be subject to the failure policy.", "reinvocationPolicy": "reinvocationPolicy indicates whether this webhook should be called multiple times as part of a single admission evaluation. Allowed values are \"Never\" and \"IfNeeded\".\n\nNever: the webhook will not be called more than once in a single admission evaluation.\n\nIfNeeded: the webhook will be called at least one additional time as part of the admission evaluation if the object being admitted is modified by other admission plugins after the initial webhook call. Webhooks that specify this option *must* be idempotent, able to process objects they previously admitted. Note: * the number of additional invocations is not guaranteed to be exactly one. * if additional invocations result in further modifications to the object, webhooks are not guaranteed to be invoked again. * webhooks that use this option may be reordered to minimize the number of additional invocations. * to validate an object after all mutations are guaranteed complete, use a validating admission webhook instead.\n\nDefaults to \"Never\".", "matchConditions": "MatchConditions is a list of conditions that must be met for a request to be sent to this webhook. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.\n\nThe exact matching logic is (in order):\n 1. If ANY matchCondition evaluates to FALSE, the webhook is skipped.\n 2. If ALL matchConditions evaluate to TRUE, the webhook is called.\n 3. If any matchCondition evaluates to an error (but none are FALSE):\n - If failurePolicy=Fail, reject the request\n - If failurePolicy=Ignore, the error is ignored and the webhook is skipped", } func (MutatingWebhook) SwaggerDoc() map[string]string { return map_MutatingWebhook } var map_MutatingWebhookConfiguration = map[string]string{ "": "MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object.", "metadata": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.", "webhooks": "Webhooks is a list of webhooks and the affected resources and operations.", } func (MutatingWebhookConfiguration) SwaggerDoc() map[string]string { return map_MutatingWebhookConfiguration } var map_MutatingWebhookConfigurationList = map[string]string{ "": "MutatingWebhookConfigurationList is a list of MutatingWebhookConfiguration.", "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "items": "List of MutatingWebhookConfiguration.", } func (MutatingWebhookConfigurationList) SwaggerDoc() map[string]string { return map_MutatingWebhookConfigurationList } var map_NamedRuleWithOperations = map[string]string{ "": "NamedRuleWithOperations is a tuple of Operations and Resources with ResourceNames.", "resourceNames": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.", } func (NamedRuleWithOperations) SwaggerDoc() map[string]string { return map_NamedRuleWithOperations } var map_ParamKind = map[string]string{ "": "ParamKind is a tuple of Group Kind and Version.", "apiVersion": "APIVersion is the API group version the resources belong to. In format of \"group/version\". Required.", "kind": "Kind is the API kind the resources belong to. Required.", } func (ParamKind) SwaggerDoc() map[string]string { return map_ParamKind } var map_ParamRef = map[string]string{ "": "ParamRef describes how to locate the params to be used as input to expressions of rules applied by a policy binding.", "name": "name is the name of the resource being referenced.\n\nOne of `name` or `selector` must be set, but `name` and `selector` are mutually exclusive properties. If one is set, the other must be unset.\n\nA single parameter used for all admission requests can be configured by setting the `name` field, leaving `selector` blank, and setting namespace if `paramKind` is namespace-scoped.", "namespace": "namespace is the namespace of the referenced resource. Allows limiting the search for params to a specific namespace. Applies to both `name` and `selector` fields.\n\nA per-namespace parameter may be used by specifying a namespace-scoped `paramKind` in the policy and leaving this field empty.\n\n- If `paramKind` is cluster-scoped, this field MUST be unset. Setting this field results in a configuration error.\n\n- If `paramKind` is namespace-scoped, the namespace of the object being evaluated for admission will be used when this field is left unset. Take care that if this is left empty the binding must not match any cluster-scoped resources, which will result in an error.", "selector": "selector can be used to match multiple param objects based on their labels. Supply selector: {} to match all resources of the ParamKind.\n\nIf multiple params are found, they are all evaluated with the policy expressions and the results are ANDed together.\n\nOne of `name` or `selector` must be set, but `name` and `selector` are mutually exclusive properties. If one is set, the other must be unset.", "parameterNotFoundAction": "`parameterNotFoundAction` controls the behavior of the binding when the resource exists, and name or selector is valid, but there are no parameters matched by the binding. If the value is set to `Allow`, then no matched parameters will be treated as successful validation by the binding. If set to `Deny`, then no matched parameters will be subject to the `failurePolicy` of the policy.\n\nAllowed values are `Allow` or `Deny`\n\nRequired", } func (ParamRef) SwaggerDoc() map[string]string { return map_ParamRef } var map_Rule = map[string]string{ "": "Rule is a tuple of APIGroups, APIVersion, and Resources.It is recommended to make sure that all the tuple expansions are valid.", "apiGroups": "APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required.", "apiVersions": "APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required.", "resources": "Resources is a list of resources this rule applies to.\n\nFor example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '*/scale' means all scale subresources. '*/*' means all resources and their subresources.\n\nIf wildcard is present, the validation rule will ensure resources do not overlap with each other.\n\nDepending on the enclosing object, subresources might not be allowed. Required.", "scope": "scope specifies the scope of this rule. Valid values are \"Cluster\", \"Namespaced\", and \"*\" \"Cluster\" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. \"Namespaced\" means that only namespaced resources will match this rule. \"*\" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is \"*\".", } func (Rule) SwaggerDoc() map[string]string { return map_Rule } var map_RuleWithOperations = map[string]string{ "": "RuleWithOperations is a tuple of Operations and Resources. It is recommended to make sure that all the tuple expansions are valid.", "operations": "Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * for all of those operations and any future admission operations that are added. If '*' is present, the length of the slice must be one. Required.", } func (RuleWithOperations) SwaggerDoc() map[string]string { return map_RuleWithOperations } var map_ServiceReference = map[string]string{ "": "ServiceReference holds a reference to Service.legacy.k8s.io", "namespace": "`namespace` is the namespace of the service. Required", "name": "`name` is the name of the service. Required", "path": "`path` is an optional URL path which will be sent in any request to this service.", "port": "If specified, the port on the service that hosting webhook. Default to 443 for backward compatibility. `port` should be a valid port number (1-65535, inclusive).", } func (ServiceReference) SwaggerDoc() map[string]string { return map_ServiceReference } var map_TypeChecking = map[string]string{ "": "TypeChecking contains results of type checking the expressions in the ValidatingAdmissionPolicy", "expressionWarnings": "The type checking warnings for each expression.", } func (TypeChecking) SwaggerDoc() map[string]string { return map_TypeChecking } var map_ValidatingAdmissionPolicy = map[string]string{ "": "ValidatingAdmissionPolicy describes the definition of an admission validation policy that accepts or rejects an object without changing it.", "metadata": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.", "spec": "Specification of the desired behavior of the ValidatingAdmissionPolicy.", "status": "The status of the ValidatingAdmissionPolicy, including warnings that are useful to determine if the policy behaves in the expected way. Populated by the system. Read-only.", } func (ValidatingAdmissionPolicy) SwaggerDoc() map[string]string { return map_ValidatingAdmissionPolicy } var map_ValidatingAdmissionPolicyBinding = map[string]string{ "": "ValidatingAdmissionPolicyBinding binds the ValidatingAdmissionPolicy with paramerized resources. ValidatingAdmissionPolicyBinding and parameter CRDs together define how cluster administrators configure policies for clusters.\n\nFor a given admission request, each binding will cause its policy to be evaluated N times, where N is 1 for policies/bindings that don't use params, otherwise N is the number of parameters selected by the binding.\n\nThe CEL expressions of a policy must have a computed CEL cost below the maximum CEL budget. Each evaluation of the policy is given an independent CEL cost budget. Adding/removing policies, bindings, or params can not affect whether a given (policy, binding, param) combination is within its own CEL budget.", "metadata": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.", "spec": "Specification of the desired behavior of the ValidatingAdmissionPolicyBinding.", } func (ValidatingAdmissionPolicyBinding) SwaggerDoc() map[string]string { return map_ValidatingAdmissionPolicyBinding } var map_ValidatingAdmissionPolicyBindingList = map[string]string{ "": "ValidatingAdmissionPolicyBindingList is a list of ValidatingAdmissionPolicyBinding.", "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "items": "List of PolicyBinding.", } func (ValidatingAdmissionPolicyBindingList) SwaggerDoc() map[string]string { return map_ValidatingAdmissionPolicyBindingList } var map_ValidatingAdmissionPolicyBindingSpec = map[string]string{ "": "ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding.", "policyName": "PolicyName references a ValidatingAdmissionPolicy name which the ValidatingAdmissionPolicyBinding binds to. If the referenced resource does not exist, this binding is considered invalid and will be ignored Required.", "paramRef": "paramRef specifies the parameter resource used to configure the admission control policy. It should point to a resource of the type specified in ParamKind of the bound ValidatingAdmissionPolicy. If the policy specifies a ParamKind and the resource referred to by ParamRef does not exist, this binding is considered mis-configured and the FailurePolicy of the ValidatingAdmissionPolicy applied. If the policy does not specify a ParamKind then this field is ignored, and the rules are evaluated without a param.", "matchResources": "MatchResources declares what resources match this binding and will be validated by it. Note that this is intersected with the policy's matchConstraints, so only requests that are matched by the policy can be selected by this. If this is unset, all resources matched by the policy are validated by this binding When resourceRules is unset, it does not constrain resource matching. If a resource is matched by the other fields of this object, it will be validated. Note that this is differs from ValidatingAdmissionPolicy matchConstraints, where resourceRules are required.", "validationActions": "validationActions declares how Validations of the referenced ValidatingAdmissionPolicy are enforced. If a validation evaluates to false it is always enforced according to these actions.\n\nFailures defined by the ValidatingAdmissionPolicy's FailurePolicy are enforced according to these actions only if the FailurePolicy is set to Fail, otherwise the failures are ignored. This includes compilation errors, runtime errors and misconfigurations of the policy.\n\nvalidationActions is declared as a set of action values. Order does not matter. validationActions may not contain duplicates of the same action.\n\nThe supported actions values are:\n\n\"Deny\" specifies that a validation failure results in a denied request.\n\n\"Warn\" specifies that a validation failure is reported to the request client in HTTP Warning headers, with a warning code of 299. Warnings can be sent both for allowed or denied admission responses.\n\n\"Audit\" specifies that a validation failure is included in the published audit event for the request. The audit event will contain a `validation.policy.admission.k8s.io/validation_failure` audit annotation with a value containing the details of the validation failures, formatted as a JSON list of objects, each with the following fields: - message: The validation failure message string - policy: The resource name of the ValidatingAdmissionPolicy - binding: The resource name of the ValidatingAdmissionPolicyBinding - expressionIndex: The index of the failed validations in the ValidatingAdmissionPolicy - validationActions: The enforcement actions enacted for the validation failure Example audit annotation: `\"validation.policy.admission.k8s.io/validation_failure\": \"[{\"message\": \"Invalid value\", {\"policy\": \"policy.example.com\", {\"binding\": \"policybinding.example.com\", {\"expressionIndex\": \"1\", {\"validationActions\": [\"Audit\"]}]\"`\n\nClients should expect to handle additional values by ignoring any values not recognized.\n\n\"Deny\" and \"Warn\" may not be used together since this combination needlessly duplicates the validation failure both in the API response body and the HTTP warning headers.\n\nRequired.", } func (ValidatingAdmissionPolicyBindingSpec) SwaggerDoc() map[string]string { return map_ValidatingAdmissionPolicyBindingSpec } var map_ValidatingAdmissionPolicyList = map[string]string{ "": "ValidatingAdmissionPolicyList is a list of ValidatingAdmissionPolicy.", "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "items": "List of ValidatingAdmissionPolicy.", } func (ValidatingAdmissionPolicyList) SwaggerDoc() map[string]string { return map_ValidatingAdmissionPolicyList } var map_ValidatingAdmissionPolicySpec = map[string]string{ "": "ValidatingAdmissionPolicySpec is the specification of the desired behavior of the AdmissionPolicy.", "paramKind": "ParamKind specifies the kind of resources used to parameterize this policy. If absent, there are no parameters for this policy and the param CEL variable will not be provided to validation expressions. If ParamKind refers to a non-existent kind, this policy definition is mis-configured and the FailurePolicy is applied. If paramKind is specified but paramRef is unset in ValidatingAdmissionPolicyBinding, the params variable will be null.", "matchConstraints": "MatchConstraints specifies what resources this policy is designed to validate. The AdmissionPolicy cares about a request if it matches _all_ Constraints. However, in order to prevent clusters from being put into an unstable state that cannot be recovered from via the API ValidatingAdmissionPolicy cannot match ValidatingAdmissionPolicy and ValidatingAdmissionPolicyBinding. Required.", "validations": "Validations contain CEL expressions which is used to apply the validation. Validations and AuditAnnotations may not both be empty; a minimum of one Validations or AuditAnnotations is required.", "failurePolicy": "failurePolicy defines how to handle failures for the admission policy. Failures can occur from CEL expression parse errors, type check errors, runtime errors and invalid or mis-configured policy definitions or bindings.\n\nA policy is invalid if spec.paramKind refers to a non-existent Kind. A binding is invalid if spec.paramRef.name refers to a non-existent resource.\n\nfailurePolicy does not define how validations that evaluate to false are handled.\n\nWhen failurePolicy is set to Fail, ValidatingAdmissionPolicyBinding validationActions define how failures are enforced.\n\nAllowed values are Ignore or Fail. Defaults to Fail.", "auditAnnotations": "auditAnnotations contains CEL expressions which are used to produce audit annotations for the audit event of the API request. validations and auditAnnotations may not both be empty; a least one of validations or auditAnnotations is required.",
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
true
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/admissionregistration/v1/zz_generated.deepcopy.go
vendor/k8s.io/api/admissionregistration/v1/zz_generated.deepcopy.go
//go:build !ignore_autogenerated // +build !ignore_autogenerated /* Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Code generated by deepcopy-gen. DO NOT EDIT. package v1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *AuditAnnotation) DeepCopyInto(out *AuditAnnotation) { *out = *in return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuditAnnotation. func (in *AuditAnnotation) DeepCopy() *AuditAnnotation { if in == nil { return nil } out := new(AuditAnnotation) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ExpressionWarning) DeepCopyInto(out *ExpressionWarning) { *out = *in return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExpressionWarning. func (in *ExpressionWarning) DeepCopy() *ExpressionWarning { if in == nil { return nil } out := new(ExpressionWarning) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MatchCondition) DeepCopyInto(out *MatchCondition) { *out = *in return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MatchCondition. func (in *MatchCondition) DeepCopy() *MatchCondition { if in == nil { return nil } out := new(MatchCondition) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MatchResources) DeepCopyInto(out *MatchResources) { *out = *in if in.NamespaceSelector != nil { in, out := &in.NamespaceSelector, &out.NamespaceSelector *out = new(metav1.LabelSelector) (*in).DeepCopyInto(*out) } if in.ObjectSelector != nil { in, out := &in.ObjectSelector, &out.ObjectSelector *out = new(metav1.LabelSelector) (*in).DeepCopyInto(*out) } if in.ResourceRules != nil { in, out := &in.ResourceRules, &out.ResourceRules *out = make([]NamedRuleWithOperations, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.ExcludeResourceRules != nil { in, out := &in.ExcludeResourceRules, &out.ExcludeResourceRules *out = make([]NamedRuleWithOperations, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.MatchPolicy != nil { in, out := &in.MatchPolicy, &out.MatchPolicy *out = new(MatchPolicyType) **out = **in } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MatchResources. func (in *MatchResources) DeepCopy() *MatchResources { if in == nil { return nil } out := new(MatchResources) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MutatingWebhook) DeepCopyInto(out *MutatingWebhook) { *out = *in in.ClientConfig.DeepCopyInto(&out.ClientConfig) if in.Rules != nil { in, out := &in.Rules, &out.Rules *out = make([]RuleWithOperations, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.FailurePolicy != nil { in, out := &in.FailurePolicy, &out.FailurePolicy *out = new(FailurePolicyType) **out = **in } if in.MatchPolicy != nil { in, out := &in.MatchPolicy, &out.MatchPolicy *out = new(MatchPolicyType) **out = **in } if in.NamespaceSelector != nil { in, out := &in.NamespaceSelector, &out.NamespaceSelector *out = new(metav1.LabelSelector) (*in).DeepCopyInto(*out) } if in.ObjectSelector != nil { in, out := &in.ObjectSelector, &out.ObjectSelector *out = new(metav1.LabelSelector) (*in).DeepCopyInto(*out) } if in.SideEffects != nil { in, out := &in.SideEffects, &out.SideEffects *out = new(SideEffectClass) **out = **in } if in.TimeoutSeconds != nil { in, out := &in.TimeoutSeconds, &out.TimeoutSeconds *out = new(int32) **out = **in } if in.AdmissionReviewVersions != nil { in, out := &in.AdmissionReviewVersions, &out.AdmissionReviewVersions *out = make([]string, len(*in)) copy(*out, *in) } if in.ReinvocationPolicy != nil { in, out := &in.ReinvocationPolicy, &out.ReinvocationPolicy *out = new(ReinvocationPolicyType) **out = **in } if in.MatchConditions != nil { in, out := &in.MatchConditions, &out.MatchConditions *out = make([]MatchCondition, len(*in)) copy(*out, *in) } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MutatingWebhook. func (in *MutatingWebhook) DeepCopy() *MutatingWebhook { if in == nil { return nil } out := new(MutatingWebhook) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MutatingWebhookConfiguration) DeepCopyInto(out *MutatingWebhookConfiguration) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) if in.Webhooks != nil { in, out := &in.Webhooks, &out.Webhooks *out = make([]MutatingWebhook, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MutatingWebhookConfiguration. func (in *MutatingWebhookConfiguration) DeepCopy() *MutatingWebhookConfiguration { if in == nil { return nil } out := new(MutatingWebhookConfiguration) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. func (in *MutatingWebhookConfiguration) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MutatingWebhookConfigurationList) DeepCopyInto(out *MutatingWebhookConfigurationList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]MutatingWebhookConfiguration, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MutatingWebhookConfigurationList. func (in *MutatingWebhookConfigurationList) DeepCopy() *MutatingWebhookConfigurationList { if in == nil { return nil } out := new(MutatingWebhookConfigurationList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. func (in *MutatingWebhookConfigurationList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NamedRuleWithOperations) DeepCopyInto(out *NamedRuleWithOperations) { *out = *in if in.ResourceNames != nil { in, out := &in.ResourceNames, &out.ResourceNames *out = make([]string, len(*in)) copy(*out, *in) } in.RuleWithOperations.DeepCopyInto(&out.RuleWithOperations) return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedRuleWithOperations. func (in *NamedRuleWithOperations) DeepCopy() *NamedRuleWithOperations { if in == nil { return nil } out := new(NamedRuleWithOperations) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ParamKind) DeepCopyInto(out *ParamKind) { *out = *in return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParamKind. func (in *ParamKind) DeepCopy() *ParamKind { if in == nil { return nil } out := new(ParamKind) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ParamRef) DeepCopyInto(out *ParamRef) { *out = *in if in.Selector != nil { in, out := &in.Selector, &out.Selector *out = new(metav1.LabelSelector) (*in).DeepCopyInto(*out) } if in.ParameterNotFoundAction != nil { in, out := &in.ParameterNotFoundAction, &out.ParameterNotFoundAction *out = new(ParameterNotFoundActionType) **out = **in } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParamRef. func (in *ParamRef) DeepCopy() *ParamRef { if in == nil { return nil } out := new(ParamRef) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Rule) DeepCopyInto(out *Rule) { *out = *in if in.APIGroups != nil { in, out := &in.APIGroups, &out.APIGroups *out = make([]string, len(*in)) copy(*out, *in) } if in.APIVersions != nil { in, out := &in.APIVersions, &out.APIVersions *out = make([]string, len(*in)) copy(*out, *in) } if in.Resources != nil { in, out := &in.Resources, &out.Resources *out = make([]string, len(*in)) copy(*out, *in) } if in.Scope != nil { in, out := &in.Scope, &out.Scope *out = new(ScopeType) **out = **in } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Rule. func (in *Rule) DeepCopy() *Rule { if in == nil { return nil } out := new(Rule) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RuleWithOperations) DeepCopyInto(out *RuleWithOperations) { *out = *in if in.Operations != nil { in, out := &in.Operations, &out.Operations *out = make([]OperationType, len(*in)) copy(*out, *in) } in.Rule.DeepCopyInto(&out.Rule) return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuleWithOperations. func (in *RuleWithOperations) DeepCopy() *RuleWithOperations { if in == nil { return nil } out := new(RuleWithOperations) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ServiceReference) DeepCopyInto(out *ServiceReference) { *out = *in if in.Path != nil { in, out := &in.Path, &out.Path *out = new(string) **out = **in } if in.Port != nil { in, out := &in.Port, &out.Port *out = new(int32) **out = **in } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceReference. func (in *ServiceReference) DeepCopy() *ServiceReference { if in == nil { return nil } out := new(ServiceReference) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TypeChecking) DeepCopyInto(out *TypeChecking) { *out = *in if in.ExpressionWarnings != nil { in, out := &in.ExpressionWarnings, &out.ExpressionWarnings *out = make([]ExpressionWarning, len(*in)) copy(*out, *in) } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TypeChecking. func (in *TypeChecking) DeepCopy() *TypeChecking { if in == nil { return nil } out := new(TypeChecking) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ValidatingAdmissionPolicy) DeepCopyInto(out *ValidatingAdmissionPolicy) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) in.Status.DeepCopyInto(&out.Status) return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatingAdmissionPolicy. func (in *ValidatingAdmissionPolicy) DeepCopy() *ValidatingAdmissionPolicy { if in == nil { return nil } out := new(ValidatingAdmissionPolicy) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. func (in *ValidatingAdmissionPolicy) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ValidatingAdmissionPolicyBinding) DeepCopyInto(out *ValidatingAdmissionPolicyBinding) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatingAdmissionPolicyBinding. func (in *ValidatingAdmissionPolicyBinding) DeepCopy() *ValidatingAdmissionPolicyBinding { if in == nil { return nil } out := new(ValidatingAdmissionPolicyBinding) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. func (in *ValidatingAdmissionPolicyBinding) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ValidatingAdmissionPolicyBindingList) DeepCopyInto(out *ValidatingAdmissionPolicyBindingList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]ValidatingAdmissionPolicyBinding, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatingAdmissionPolicyBindingList. func (in *ValidatingAdmissionPolicyBindingList) DeepCopy() *ValidatingAdmissionPolicyBindingList { if in == nil { return nil } out := new(ValidatingAdmissionPolicyBindingList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. func (in *ValidatingAdmissionPolicyBindingList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ValidatingAdmissionPolicyBindingSpec) DeepCopyInto(out *ValidatingAdmissionPolicyBindingSpec) { *out = *in if in.ParamRef != nil { in, out := &in.ParamRef, &out.ParamRef *out = new(ParamRef) (*in).DeepCopyInto(*out) } if in.MatchResources != nil { in, out := &in.MatchResources, &out.MatchResources *out = new(MatchResources) (*in).DeepCopyInto(*out) } if in.ValidationActions != nil { in, out := &in.ValidationActions, &out.ValidationActions *out = make([]ValidationAction, len(*in)) copy(*out, *in) } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatingAdmissionPolicyBindingSpec. func (in *ValidatingAdmissionPolicyBindingSpec) DeepCopy() *ValidatingAdmissionPolicyBindingSpec { if in == nil { return nil } out := new(ValidatingAdmissionPolicyBindingSpec) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ValidatingAdmissionPolicyList) DeepCopyInto(out *ValidatingAdmissionPolicyList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]ValidatingAdmissionPolicy, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatingAdmissionPolicyList. func (in *ValidatingAdmissionPolicyList) DeepCopy() *ValidatingAdmissionPolicyList { if in == nil { return nil } out := new(ValidatingAdmissionPolicyList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. func (in *ValidatingAdmissionPolicyList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ValidatingAdmissionPolicySpec) DeepCopyInto(out *ValidatingAdmissionPolicySpec) { *out = *in if in.ParamKind != nil { in, out := &in.ParamKind, &out.ParamKind *out = new(ParamKind) **out = **in } if in.MatchConstraints != nil { in, out := &in.MatchConstraints, &out.MatchConstraints *out = new(MatchResources) (*in).DeepCopyInto(*out) } if in.Validations != nil { in, out := &in.Validations, &out.Validations *out = make([]Validation, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.FailurePolicy != nil { in, out := &in.FailurePolicy, &out.FailurePolicy *out = new(FailurePolicyType) **out = **in } if in.AuditAnnotations != nil { in, out := &in.AuditAnnotations, &out.AuditAnnotations *out = make([]AuditAnnotation, len(*in)) copy(*out, *in) } if in.MatchConditions != nil { in, out := &in.MatchConditions, &out.MatchConditions *out = make([]MatchCondition, len(*in)) copy(*out, *in) } if in.Variables != nil { in, out := &in.Variables, &out.Variables *out = make([]Variable, len(*in)) copy(*out, *in) } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatingAdmissionPolicySpec. func (in *ValidatingAdmissionPolicySpec) DeepCopy() *ValidatingAdmissionPolicySpec { if in == nil { return nil } out := new(ValidatingAdmissionPolicySpec) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ValidatingAdmissionPolicyStatus) DeepCopyInto(out *ValidatingAdmissionPolicyStatus) { *out = *in if in.TypeChecking != nil { in, out := &in.TypeChecking, &out.TypeChecking *out = new(TypeChecking) (*in).DeepCopyInto(*out) } if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions *out = make([]metav1.Condition, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatingAdmissionPolicyStatus. func (in *ValidatingAdmissionPolicyStatus) DeepCopy() *ValidatingAdmissionPolicyStatus { if in == nil { return nil } out := new(ValidatingAdmissionPolicyStatus) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ValidatingWebhook) DeepCopyInto(out *ValidatingWebhook) { *out = *in in.ClientConfig.DeepCopyInto(&out.ClientConfig) if in.Rules != nil { in, out := &in.Rules, &out.Rules *out = make([]RuleWithOperations, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.FailurePolicy != nil { in, out := &in.FailurePolicy, &out.FailurePolicy *out = new(FailurePolicyType) **out = **in } if in.MatchPolicy != nil { in, out := &in.MatchPolicy, &out.MatchPolicy *out = new(MatchPolicyType) **out = **in } if in.NamespaceSelector != nil { in, out := &in.NamespaceSelector, &out.NamespaceSelector *out = new(metav1.LabelSelector) (*in).DeepCopyInto(*out) } if in.ObjectSelector != nil { in, out := &in.ObjectSelector, &out.ObjectSelector *out = new(metav1.LabelSelector) (*in).DeepCopyInto(*out) } if in.SideEffects != nil { in, out := &in.SideEffects, &out.SideEffects *out = new(SideEffectClass) **out = **in } if in.TimeoutSeconds != nil { in, out := &in.TimeoutSeconds, &out.TimeoutSeconds *out = new(int32) **out = **in } if in.AdmissionReviewVersions != nil { in, out := &in.AdmissionReviewVersions, &out.AdmissionReviewVersions *out = make([]string, len(*in)) copy(*out, *in) } if in.MatchConditions != nil { in, out := &in.MatchConditions, &out.MatchConditions *out = make([]MatchCondition, len(*in)) copy(*out, *in) } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatingWebhook. func (in *ValidatingWebhook) DeepCopy() *ValidatingWebhook { if in == nil { return nil } out := new(ValidatingWebhook) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ValidatingWebhookConfiguration) DeepCopyInto(out *ValidatingWebhookConfiguration) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) if in.Webhooks != nil { in, out := &in.Webhooks, &out.Webhooks *out = make([]ValidatingWebhook, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatingWebhookConfiguration. func (in *ValidatingWebhookConfiguration) DeepCopy() *ValidatingWebhookConfiguration { if in == nil { return nil } out := new(ValidatingWebhookConfiguration) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. func (in *ValidatingWebhookConfiguration) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ValidatingWebhookConfigurationList) DeepCopyInto(out *ValidatingWebhookConfigurationList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]ValidatingWebhookConfiguration, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatingWebhookConfigurationList. func (in *ValidatingWebhookConfigurationList) DeepCopy() *ValidatingWebhookConfigurationList { if in == nil { return nil } out := new(ValidatingWebhookConfigurationList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. func (in *ValidatingWebhookConfigurationList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Validation) DeepCopyInto(out *Validation) { *out = *in if in.Reason != nil { in, out := &in.Reason, &out.Reason *out = new(metav1.StatusReason) **out = **in } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Validation. func (in *Validation) DeepCopy() *Validation { if in == nil { return nil } out := new(Validation) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Variable) DeepCopyInto(out *Variable) { *out = *in return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Variable. func (in *Variable) DeepCopy() *Variable { if in == nil { return nil } out := new(Variable) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *WebhookClientConfig) DeepCopyInto(out *WebhookClientConfig) { *out = *in if in.URL != nil { in, out := &in.URL, &out.URL *out = new(string) **out = **in } if in.Service != nil { in, out := &in.Service, &out.Service *out = new(ServiceReference) (*in).DeepCopyInto(*out) } if in.CABundle != nil { in, out := &in.CABundle, &out.CABundle *out = make([]byte, len(*in)) copy(*out, *in) } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebhookClientConfig. func (in *WebhookClientConfig) DeepCopy() *WebhookClientConfig { if in == nil { return nil } out := new(WebhookClientConfig) in.DeepCopyInto(out) return out }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/admissionregistration/v1/types.go
vendor/k8s.io/api/admissionregistration/v1/types.go
/* Copyright 2019 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package v1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // Rule is a tuple of APIGroups, APIVersion, and Resources.It is recommended // to make sure that all the tuple expansions are valid. type Rule struct { // APIGroups is the API groups the resources belong to. '*' is all groups. // If '*' is present, the length of the slice must be one. // Required. // +listType=atomic APIGroups []string `json:"apiGroups,omitempty" protobuf:"bytes,1,rep,name=apiGroups"` // APIVersions is the API versions the resources belong to. '*' is all versions. // If '*' is present, the length of the slice must be one. // Required. // +listType=atomic APIVersions []string `json:"apiVersions,omitempty" protobuf:"bytes,2,rep,name=apiVersions"` // Resources is a list of resources this rule applies to. // // For example: // 'pods' means pods. // 'pods/log' means the log subresource of pods. // '*' means all resources, but not subresources. // 'pods/*' means all subresources of pods. // '*/scale' means all scale subresources. // '*/*' means all resources and their subresources. // // If wildcard is present, the validation rule will ensure resources do not // overlap with each other. // // Depending on the enclosing object, subresources might not be allowed. // Required. // +listType=atomic Resources []string `json:"resources,omitempty" protobuf:"bytes,3,rep,name=resources"` // scope specifies the scope of this rule. // Valid values are "Cluster", "Namespaced", and "*" // "Cluster" means that only cluster-scoped resources will match this rule. // Namespace API objects are cluster-scoped. // "Namespaced" means that only namespaced resources will match this rule. // "*" means that there are no scope restrictions. // Subresources match the scope of their parent resource. // Default is "*". // // +optional Scope *ScopeType `json:"scope,omitempty" protobuf:"bytes,4,rep,name=scope"` } // ScopeType specifies a scope for a Rule. // +enum type ScopeType string const ( // ClusterScope means that scope is limited to cluster-scoped objects. // Namespace objects are cluster-scoped. ClusterScope ScopeType = "Cluster" // NamespacedScope means that scope is limited to namespaced objects. NamespacedScope ScopeType = "Namespaced" // AllScopes means that all scopes are included. AllScopes ScopeType = "*" ) // FailurePolicyType specifies a failure policy that defines how unrecognized errors from the admission endpoint are handled. // +enum type FailurePolicyType string const ( // Ignore means that an error calling the webhook is ignored. Ignore FailurePolicyType = "Ignore" // Fail means that an error calling the webhook causes the admission to fail. Fail FailurePolicyType = "Fail" ) // ParameterNotFoundActionType specifies a failure policy that defines how a binding // is evaluated when the param referred by its perNamespaceParamRef is not found. type ParameterNotFoundActionType string const ( // Allow means all requests will be admitted if no param resources // could be found. AllowAction ParameterNotFoundActionType = "Allow" // Deny means all requests will be denied if no param resources are found. DenyAction ParameterNotFoundActionType = "Deny" ) // MatchPolicyType specifies the type of match policy. // +enum type MatchPolicyType string const ( // Exact means requests should only be sent to the webhook if they exactly match a given rule. Exact MatchPolicyType = "Exact" // Equivalent means requests should be sent to the webhook if they modify a resource listed in rules via another API group or version. Equivalent MatchPolicyType = "Equivalent" ) // SideEffectClass specifies the types of side effects a webhook may have. // +enum type SideEffectClass string const ( // SideEffectClassUnknown means that no information is known about the side effects of calling the webhook. // If a request with the dry-run attribute would trigger a call to this webhook, the request will instead fail. SideEffectClassUnknown SideEffectClass = "Unknown" // SideEffectClassNone means that calling the webhook will have no side effects. SideEffectClassNone SideEffectClass = "None" // SideEffectClassSome means that calling the webhook will possibly have side effects. // If a request with the dry-run attribute would trigger a call to this webhook, the request will instead fail. SideEffectClassSome SideEffectClass = "Some" // SideEffectClassNoneOnDryRun means that calling the webhook will possibly have side effects, but if the // request being reviewed has the dry-run attribute, the side effects will be suppressed. SideEffectClassNoneOnDryRun SideEffectClass = "NoneOnDryRun" ) // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +genclient // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.30 // ValidatingAdmissionPolicy describes the definition of an admission validation policy that accepts or rejects an object without changing it. type ValidatingAdmissionPolicy struct { metav1.TypeMeta `json:",inline"` // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Specification of the desired behavior of the ValidatingAdmissionPolicy. Spec ValidatingAdmissionPolicySpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` // The status of the ValidatingAdmissionPolicy, including warnings that are useful to determine if the policy // behaves in the expected way. // Populated by the system. // Read-only. // +optional Status ValidatingAdmissionPolicyStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` } // ValidatingAdmissionPolicyStatus represents the status of an admission validation policy. type ValidatingAdmissionPolicyStatus struct { // The generation observed by the controller. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"` // The results of type checking for each expression. // Presence of this field indicates the completion of the type checking. // +optional TypeChecking *TypeChecking `json:"typeChecking,omitempty" protobuf:"bytes,2,opt,name=typeChecking"` // The conditions represent the latest available observations of a policy's current state. // +optional // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:"conditions,omitempty" protobuf:"bytes,3,rep,name=conditions"` } // ValidatingAdmissionPolicyConditionType is the condition type of admission validation policy. type ValidatingAdmissionPolicyConditionType string // TypeChecking contains results of type checking the expressions in the // ValidatingAdmissionPolicy type TypeChecking struct { // The type checking warnings for each expression. // +optional // +listType=atomic ExpressionWarnings []ExpressionWarning `json:"expressionWarnings,omitempty" protobuf:"bytes,1,rep,name=expressionWarnings"` } // ExpressionWarning is a warning information that targets a specific expression. type ExpressionWarning struct { // The path to the field that refers the expression. // For example, the reference to the expression of the first item of // validations is "spec.validations[0].expression" FieldRef string `json:"fieldRef" protobuf:"bytes,2,opt,name=fieldRef"` // The content of type checking information in a human-readable form. // Each line of the warning contains the type that the expression is checked // against, followed by the type check error from the compiler. Warning string `json:"warning" protobuf:"bytes,3,opt,name=warning"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.30 // ValidatingAdmissionPolicyList is a list of ValidatingAdmissionPolicy. type ValidatingAdmissionPolicyList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // List of ValidatingAdmissionPolicy. Items []ValidatingAdmissionPolicy `json:"items" protobuf:"bytes,2,rep,name=items"` } // ValidatingAdmissionPolicySpec is the specification of the desired behavior of the AdmissionPolicy. type ValidatingAdmissionPolicySpec struct { // ParamKind specifies the kind of resources used to parameterize this policy. // If absent, there are no parameters for this policy and the param CEL variable will not be provided to validation expressions. // If ParamKind refers to a non-existent kind, this policy definition is mis-configured and the FailurePolicy is applied. // If paramKind is specified but paramRef is unset in ValidatingAdmissionPolicyBinding, the params variable will be null. // +optional ParamKind *ParamKind `json:"paramKind,omitempty" protobuf:"bytes,1,rep,name=paramKind"` // MatchConstraints specifies what resources this policy is designed to validate. // The AdmissionPolicy cares about a request if it matches _all_ Constraints. // However, in order to prevent clusters from being put into an unstable state that cannot be recovered from via the API // ValidatingAdmissionPolicy cannot match ValidatingAdmissionPolicy and ValidatingAdmissionPolicyBinding. // Required. MatchConstraints *MatchResources `json:"matchConstraints,omitempty" protobuf:"bytes,2,rep,name=matchConstraints"` // Validations contain CEL expressions which is used to apply the validation. // Validations and AuditAnnotations may not both be empty; a minimum of one Validations or AuditAnnotations is // required. // +listType=atomic // +optional Validations []Validation `json:"validations,omitempty" protobuf:"bytes,3,rep,name=validations"` // failurePolicy defines how to handle failures for the admission policy. Failures can // occur from CEL expression parse errors, type check errors, runtime errors and invalid // or mis-configured policy definitions or bindings. // // A policy is invalid if spec.paramKind refers to a non-existent Kind. // A binding is invalid if spec.paramRef.name refers to a non-existent resource. // // failurePolicy does not define how validations that evaluate to false are handled. // // When failurePolicy is set to Fail, ValidatingAdmissionPolicyBinding validationActions // define how failures are enforced. // // Allowed values are Ignore or Fail. Defaults to Fail. // +optional FailurePolicy *FailurePolicyType `json:"failurePolicy,omitempty" protobuf:"bytes,4,opt,name=failurePolicy,casttype=FailurePolicyType"` // auditAnnotations contains CEL expressions which are used to produce audit // annotations for the audit event of the API request. // validations and auditAnnotations may not both be empty; a least one of validations or auditAnnotations is // required. // +listType=atomic // +optional AuditAnnotations []AuditAnnotation `json:"auditAnnotations,omitempty" protobuf:"bytes,5,rep,name=auditAnnotations"` // MatchConditions is a list of conditions that must be met for a request to be validated. // Match conditions filter requests that have already been matched by the rules, // namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. // There are a maximum of 64 match conditions allowed. // // If a parameter object is provided, it can be accessed via the `params` handle in the same // manner as validation expressions. // // The exact matching logic is (in order): // 1. If ANY matchCondition evaluates to FALSE, the policy is skipped. // 2. If ALL matchConditions evaluate to TRUE, the policy is evaluated. // 3. If any matchCondition evaluates to an error (but none are FALSE): // - If failurePolicy=Fail, reject the request // - If failurePolicy=Ignore, the policy is skipped // // +patchMergeKey=name // +patchStrategy=merge // +listType=map // +listMapKey=name // +optional MatchConditions []MatchCondition `json:"matchConditions,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,6,rep,name=matchConditions"` // Variables contain definitions of variables that can be used in composition of other expressions. // Each variable is defined as a named CEL expression. // The variables defined here will be available under `variables` in other expressions of the policy // except MatchConditions because MatchConditions are evaluated before the rest of the policy. // // The expression of a variable can refer to other variables defined earlier in the list but not those after. // Thus, Variables must be sorted by the order of first appearance and acyclic. // +patchMergeKey=name // +patchStrategy=merge // +listType=map // +listMapKey=name // +optional Variables []Variable `json:"variables,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,7,rep,name=variables"` } // ParamKind is a tuple of Group Kind and Version. // +structType=atomic type ParamKind struct { // APIVersion is the API group version the resources belong to. // In format of "group/version". // Required. APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,1,rep,name=apiVersion"` // Kind is the API kind the resources belong to. // Required. Kind string `json:"kind,omitempty" protobuf:"bytes,2,rep,name=kind"` } // Validation specifies the CEL expression which is used to apply the validation. type Validation struct { // Expression represents the expression which will be evaluated by CEL. // ref: https://github.com/google/cel-spec // CEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables: // // - 'object' - The object from the incoming request. The value is null for DELETE requests. // - 'oldObject' - The existing object. The value is null for CREATE requests. // - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). // - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. // - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. // - 'variables' - Map of composited variables, from its name to its lazily evaluated value. // For example, a variable named 'foo' can be accessed as 'variables.foo'. // - 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. // See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz // - 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the // request resource. // // The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the // object. No other metadata properties are accessible. // // Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. // Accessible property names are escaped according to the following rules when accessed in the expression: // - '__' escapes to '__underscores__' // - '.' escapes to '__dot__' // - '-' escapes to '__dash__' // - '/' escapes to '__slash__' // - Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are: // "true", "false", "null", "in", "as", "break", "const", "continue", "else", "for", "function", "if", // "import", "let", "loop", "package", "namespace", "return". // Examples: // - Expression accessing a property named "namespace": {"Expression": "object.__namespace__ > 0"} // - Expression accessing a property named "x-prop": {"Expression": "object.x__dash__prop > 0"} // - Expression accessing a property named "redact__d": {"Expression": "object.redact__underscores__d > 0"} // // Equality on arrays with list type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1]. // Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type: // - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and // non-intersecting elements in `Y` are appended, retaining their partial order. // - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values // are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with // non-intersecting keys are appended, retaining their partial order. // Required. Expression string `json:"expression" protobuf:"bytes,1,opt,name=Expression"` // Message represents the message displayed when validation fails. The message is required if the Expression contains // line breaks. The message must not contain line breaks. // If unset, the message is "failed rule: {Rule}". // e.g. "must be a URL with the host matching spec.host" // If the Expression contains line breaks. Message is required. // The message must not contain line breaks. // If unset, the message is "failed Expression: {Expression}". // +optional Message string `json:"message,omitempty" protobuf:"bytes,2,opt,name=message"` // Reason represents a machine-readable description of why this validation failed. // If this is the first validation in the list to fail, this reason, as well as the // corresponding HTTP response code, are used in the // HTTP response to the client. // The currently supported reasons are: "Unauthorized", "Forbidden", "Invalid", "RequestEntityTooLarge". // If not set, StatusReasonInvalid is used in the response to the client. // +optional Reason *metav1.StatusReason `json:"reason,omitempty" protobuf:"bytes,3,opt,name=reason"` // messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. // Since messageExpression is used as a failure message, it must evaluate to a string. // If both message and messageExpression are present on a validation, then messageExpression will be used if validation fails. // If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced // as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string // that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and // the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged. // messageExpression has access to all the same variables as the `expression` except for 'authorizer' and 'authorizer.requestResource'. // Example: // "object.x must be less than max ("+string(params.max)+")" // +optional MessageExpression string `json:"messageExpression,omitempty" protobuf:"bytes,4,opt,name=messageExpression"` } // Variable is the definition of a variable that is used for composition. A variable is defined as a named expression. // +structType=atomic type Variable struct { // Name is the name of the variable. The name must be a valid CEL identifier and unique among all variables. // The variable can be accessed in other expressions through `variables` // For example, if name is "foo", the variable will be available as `variables.foo` Name string `json:"name" protobuf:"bytes,1,opt,name=Name"` // Expression is the expression that will be evaluated as the value of the variable. // The CEL expression has access to the same identifiers as the CEL expressions in Validation. Expression string `json:"expression" protobuf:"bytes,2,opt,name=Expression"` } // AuditAnnotation describes how to produce an audit annotation for an API request. type AuditAnnotation struct { // key specifies the audit annotation key. The audit annotation keys of // a ValidatingAdmissionPolicy must be unique. The key must be a qualified // name ([A-Za-z0-9][-A-Za-z0-9_.]*) no more than 63 bytes in length. // // The key is combined with the resource name of the // ValidatingAdmissionPolicy to construct an audit annotation key: // "{ValidatingAdmissionPolicy name}/{key}". // // If an admission webhook uses the same resource name as this ValidatingAdmissionPolicy // and the same audit annotation key, the annotation key will be identical. // In this case, the first annotation written with the key will be included // in the audit event and all subsequent annotations with the same key // will be discarded. // // Required. Key string `json:"key" protobuf:"bytes,1,opt,name=key"` // valueExpression represents the expression which is evaluated by CEL to // produce an audit annotation value. The expression must evaluate to either // a string or null value. If the expression evaluates to a string, the // audit annotation is included with the string value. If the expression // evaluates to null or empty string the audit annotation will be omitted. // The valueExpression may be no longer than 5kb in length. // If the result of the valueExpression is more than 10kb in length, it // will be truncated to 10kb. // // If multiple ValidatingAdmissionPolicyBinding resources match an // API request, then the valueExpression will be evaluated for // each binding. All unique values produced by the valueExpressions // will be joined together in a comma-separated list. // // Required. ValueExpression string `json:"valueExpression" protobuf:"bytes,2,opt,name=valueExpression"` } // +genclient // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.30 // ValidatingAdmissionPolicyBinding binds the ValidatingAdmissionPolicy with paramerized resources. // ValidatingAdmissionPolicyBinding and parameter CRDs together define how cluster administrators configure policies for clusters. // // For a given admission request, each binding will cause its policy to be // evaluated N times, where N is 1 for policies/bindings that don't use // params, otherwise N is the number of parameters selected by the binding. // // The CEL expressions of a policy must have a computed CEL cost below the maximum // CEL budget. Each evaluation of the policy is given an independent CEL cost budget. // Adding/removing policies, bindings, or params can not affect whether a // given (policy, binding, param) combination is within its own CEL budget. type ValidatingAdmissionPolicyBinding struct { metav1.TypeMeta `json:",inline"` // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Specification of the desired behavior of the ValidatingAdmissionPolicyBinding. Spec ValidatingAdmissionPolicyBindingSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.30 // ValidatingAdmissionPolicyBindingList is a list of ValidatingAdmissionPolicyBinding. type ValidatingAdmissionPolicyBindingList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // List of PolicyBinding. Items []ValidatingAdmissionPolicyBinding `json:"items" protobuf:"bytes,2,rep,name=items"` } // ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding. type ValidatingAdmissionPolicyBindingSpec struct { // PolicyName references a ValidatingAdmissionPolicy name which the ValidatingAdmissionPolicyBinding binds to. // If the referenced resource does not exist, this binding is considered invalid and will be ignored // Required. PolicyName string `json:"policyName,omitempty" protobuf:"bytes,1,rep,name=policyName"` // paramRef specifies the parameter resource used to configure the admission control policy. // It should point to a resource of the type specified in ParamKind of the bound ValidatingAdmissionPolicy. // If the policy specifies a ParamKind and the resource referred to by ParamRef does not exist, this binding is considered mis-configured and the FailurePolicy of the ValidatingAdmissionPolicy applied. // If the policy does not specify a ParamKind then this field is ignored, and the rules are evaluated without a param. // +optional ParamRef *ParamRef `json:"paramRef,omitempty" protobuf:"bytes,2,rep,name=paramRef"` // MatchResources declares what resources match this binding and will be validated by it. // Note that this is intersected with the policy's matchConstraints, so only requests that are matched by the policy can be selected by this. // If this is unset, all resources matched by the policy are validated by this binding // When resourceRules is unset, it does not constrain resource matching. If a resource is matched by the other fields of this object, it will be validated. // Note that this is differs from ValidatingAdmissionPolicy matchConstraints, where resourceRules are required. // +optional MatchResources *MatchResources `json:"matchResources,omitempty" protobuf:"bytes,3,rep,name=matchResources"` // validationActions declares how Validations of the referenced ValidatingAdmissionPolicy are enforced. // If a validation evaluates to false it is always enforced according to these actions. // // Failures defined by the ValidatingAdmissionPolicy's FailurePolicy are enforced according // to these actions only if the FailurePolicy is set to Fail, otherwise the failures are // ignored. This includes compilation errors, runtime errors and misconfigurations of the policy. // // validationActions is declared as a set of action values. Order does // not matter. validationActions may not contain duplicates of the same action. // // The supported actions values are: // // "Deny" specifies that a validation failure results in a denied request. // // "Warn" specifies that a validation failure is reported to the request client // in HTTP Warning headers, with a warning code of 299. Warnings can be sent // both for allowed or denied admission responses. // // "Audit" specifies that a validation failure is included in the published // audit event for the request. The audit event will contain a // `validation.policy.admission.k8s.io/validation_failure` audit annotation // with a value containing the details of the validation failures, formatted as // a JSON list of objects, each with the following fields: // - message: The validation failure message string // - policy: The resource name of the ValidatingAdmissionPolicy // - binding: The resource name of the ValidatingAdmissionPolicyBinding // - expressionIndex: The index of the failed validations in the ValidatingAdmissionPolicy // - validationActions: The enforcement actions enacted for the validation failure // Example audit annotation: // `"validation.policy.admission.k8s.io/validation_failure": "[{\"message\": \"Invalid value\", {\"policy\": \"policy.example.com\", {\"binding\": \"policybinding.example.com\", {\"expressionIndex\": \"1\", {\"validationActions\": [\"Audit\"]}]"` // // Clients should expect to handle additional values by ignoring // any values not recognized. // // "Deny" and "Warn" may not be used together since this combination // needlessly duplicates the validation failure both in the // API response body and the HTTP warning headers. // // Required. // +listType=set ValidationActions []ValidationAction `json:"validationActions,omitempty" protobuf:"bytes,4,rep,name=validationActions"` } // ParamRef describes how to locate the params to be used as input to // expressions of rules applied by a policy binding. // +structType=atomic type ParamRef struct { // name is the name of the resource being referenced. // // One of `name` or `selector` must be set, but `name` and `selector` are // mutually exclusive properties. If one is set, the other must be unset. // // A single parameter used for all admission requests can be configured // by setting the `name` field, leaving `selector` blank, and setting namespace // if `paramKind` is namespace-scoped. // Name string `json:"name,omitempty" protobuf:"bytes,1,rep,name=name"` // namespace is the namespace of the referenced resource. Allows limiting // the search for params to a specific namespace. Applies to both `name` and // `selector` fields. // // A per-namespace parameter may be used by specifying a namespace-scoped // `paramKind` in the policy and leaving this field empty. // // - If `paramKind` is cluster-scoped, this field MUST be unset. Setting this // field results in a configuration error. // // - If `paramKind` is namespace-scoped, the namespace of the object being // evaluated for admission will be used when this field is left unset. Take // care that if this is left empty the binding must not match any cluster-scoped // resources, which will result in an error. // // +optional Namespace string `json:"namespace,omitempty" protobuf:"bytes,2,rep,name=namespace"` // selector can be used to match multiple param objects based on their labels. // Supply selector: {} to match all resources of the ParamKind. // // If multiple params are found, they are all evaluated with the policy expressions // and the results are ANDed together. // // One of `name` or `selector` must be set, but `name` and `selector` are // mutually exclusive properties. If one is set, the other must be unset. // // +optional Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,3,rep,name=selector"` // `parameterNotFoundAction` controls the behavior of the binding when the resource // exists, and name or selector is valid, but there are no parameters // matched by the binding. If the value is set to `Allow`, then no // matched parameters will be treated as successful validation by the binding. // If set to `Deny`, then no matched parameters will be subject to the // `failurePolicy` of the policy. // // Allowed values are `Allow` or `Deny` // // Required ParameterNotFoundAction *ParameterNotFoundActionType `json:"parameterNotFoundAction,omitempty" protobuf:"bytes,4,rep,name=parameterNotFoundAction"` } // MatchResources decides whether to run the admission control policy on an object based // on whether it meets the match criteria. // The exclude rules take precedence over include rules (if a resource matches both, it is excluded) // +structType=atomic type MatchResources struct { // NamespaceSelector decides whether to run the admission control policy on an object based // on whether the namespace for that object matches the selector. If the // object itself is a namespace, the matching is performed on // object.metadata.labels. If the object is another cluster scoped resource, // it never skips the policy. // // For example, to run the webhook on any objects whose namespace is not // associated with "runlevel" of "0" or "1"; you will set the selector as // follows: // "namespaceSelector": { // "matchExpressions": [ // { // "key": "runlevel", // "operator": "NotIn", // "values": [ // "0", // "1" // ] // } // ] // } // // If instead you want to only run the policy on any objects whose // namespace is associated with the "environment" of "prod" or "staging"; // you will set the selector as follows: // "namespaceSelector": { // "matchExpressions": [ // { // "key": "environment", // "operator": "In", // "values": [ // "prod", // "staging" // ] // } // ]
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
true
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/admissionregistration/v1/register.go
vendor/k8s.io/api/admissionregistration/v1/register.go
/* Copyright 2019 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package v1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" ) // GroupName is the group name for this API. const GroupName = "admissionregistration.k8s.io" // SchemeGroupVersion is group version used to register these objects var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} // Resource takes an unqualified resource and returns a Group qualified GroupResource func Resource(resource string) schema.GroupResource { return SchemeGroupVersion.WithResource(resource).GroupResource() } // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api. // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes. var ( // SchemeBuilder points to a list of functions added to Scheme. SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) localSchemeBuilder = &SchemeBuilder // AddToScheme is a common registration function for mapping packaged scoped group & version keys to a scheme. AddToScheme = localSchemeBuilder.AddToScheme ) // Adds the list of known types to scheme. func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &ValidatingWebhookConfiguration{}, &ValidatingWebhookConfigurationList{}, &MutatingWebhookConfiguration{}, &MutatingWebhookConfigurationList{}, &ValidatingAdmissionPolicy{}, &ValidatingAdmissionPolicyList{}, &ValidatingAdmissionPolicyBinding{}, &ValidatingAdmissionPolicyBindingList{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/admissionregistration/v1/zz_generated.prerelease-lifecycle.go
vendor/k8s.io/api/admissionregistration/v1/zz_generated.prerelease-lifecycle.go
//go:build !ignore_autogenerated // +build !ignore_autogenerated /* Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Code generated by prerelease-lifecycle-gen. DO NOT EDIT. package v1 // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *MutatingWebhookConfiguration) APILifecycleIntroduced() (major, minor int) { return 1, 16 } // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *MutatingWebhookConfigurationList) APILifecycleIntroduced() (major, minor int) { return 1, 16 } // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *ValidatingAdmissionPolicy) APILifecycleIntroduced() (major, minor int) { return 1, 30 } // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *ValidatingAdmissionPolicyBinding) APILifecycleIntroduced() (major, minor int) { return 1, 30 } // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *ValidatingAdmissionPolicyBindingList) APILifecycleIntroduced() (major, minor int) { return 1, 30 } // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *ValidatingAdmissionPolicyList) APILifecycleIntroduced() (major, minor int) { return 1, 30 } // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *ValidatingWebhookConfiguration) APILifecycleIntroduced() (major, minor int) { return 1, 16 } // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *ValidatingWebhookConfigurationList) APILifecycleIntroduced() (major, minor int) { return 1, 16 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/admissionregistration/v1/doc.go
vendor/k8s.io/api/admissionregistration/v1/doc.go
/* Copyright 2019 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // +k8s:deepcopy-gen=package // +k8s:protobuf-gen=package // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true // +groupName=admissionregistration.k8s.io // Package v1 is the v1 version of the API. // AdmissionConfiguration and AdmissionPluginConfiguration are legacy static admission plugin configuration // MutatingWebhookConfiguration and ValidatingWebhookConfiguration are for the // new dynamic admission controller configuration. package v1 // import "k8s.io/api/admissionregistration/v1"
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/admissionregistration/v1/generated.pb.go
vendor/k8s.io/api/admissionregistration/v1/generated.pb.go
/* Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: k8s.io/api/admissionregistration/v1/generated.proto package v1 import ( fmt "fmt" io "io" proto "github.com/gogo/protobuf/proto" k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *AuditAnnotation) Reset() { *m = AuditAnnotation{} } func (*AuditAnnotation) ProtoMessage() {} func (*AuditAnnotation) Descriptor() ([]byte, []int) { return fileDescriptor_3205c7dc5bf0c9bf, []int{0} } func (m *AuditAnnotation) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *AuditAnnotation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *AuditAnnotation) XXX_Merge(src proto.Message) { xxx_messageInfo_AuditAnnotation.Merge(m, src) } func (m *AuditAnnotation) XXX_Size() int { return m.Size() } func (m *AuditAnnotation) XXX_DiscardUnknown() { xxx_messageInfo_AuditAnnotation.DiscardUnknown(m) } var xxx_messageInfo_AuditAnnotation proto.InternalMessageInfo func (m *ExpressionWarning) Reset() { *m = ExpressionWarning{} } func (*ExpressionWarning) ProtoMessage() {} func (*ExpressionWarning) Descriptor() ([]byte, []int) { return fileDescriptor_3205c7dc5bf0c9bf, []int{1} } func (m *ExpressionWarning) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ExpressionWarning) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ExpressionWarning) XXX_Merge(src proto.Message) { xxx_messageInfo_ExpressionWarning.Merge(m, src) } func (m *ExpressionWarning) XXX_Size() int { return m.Size() } func (m *ExpressionWarning) XXX_DiscardUnknown() { xxx_messageInfo_ExpressionWarning.DiscardUnknown(m) } var xxx_messageInfo_ExpressionWarning proto.InternalMessageInfo func (m *MatchCondition) Reset() { *m = MatchCondition{} } func (*MatchCondition) ProtoMessage() {} func (*MatchCondition) Descriptor() ([]byte, []int) { return fileDescriptor_3205c7dc5bf0c9bf, []int{2} } func (m *MatchCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MatchCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *MatchCondition) XXX_Merge(src proto.Message) { xxx_messageInfo_MatchCondition.Merge(m, src) } func (m *MatchCondition) XXX_Size() int { return m.Size() } func (m *MatchCondition) XXX_DiscardUnknown() { xxx_messageInfo_MatchCondition.DiscardUnknown(m) } var xxx_messageInfo_MatchCondition proto.InternalMessageInfo func (m *MatchResources) Reset() { *m = MatchResources{} } func (*MatchResources) ProtoMessage() {} func (*MatchResources) Descriptor() ([]byte, []int) { return fileDescriptor_3205c7dc5bf0c9bf, []int{3} } func (m *MatchResources) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MatchResources) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *MatchResources) XXX_Merge(src proto.Message) { xxx_messageInfo_MatchResources.Merge(m, src) } func (m *MatchResources) XXX_Size() int { return m.Size() } func (m *MatchResources) XXX_DiscardUnknown() { xxx_messageInfo_MatchResources.DiscardUnknown(m) } var xxx_messageInfo_MatchResources proto.InternalMessageInfo func (m *MutatingWebhook) Reset() { *m = MutatingWebhook{} } func (*MutatingWebhook) ProtoMessage() {} func (*MutatingWebhook) Descriptor() ([]byte, []int) { return fileDescriptor_3205c7dc5bf0c9bf, []int{4} } func (m *MutatingWebhook) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MutatingWebhook) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *MutatingWebhook) XXX_Merge(src proto.Message) { xxx_messageInfo_MutatingWebhook.Merge(m, src) } func (m *MutatingWebhook) XXX_Size() int { return m.Size() } func (m *MutatingWebhook) XXX_DiscardUnknown() { xxx_messageInfo_MutatingWebhook.DiscardUnknown(m) } var xxx_messageInfo_MutatingWebhook proto.InternalMessageInfo func (m *MutatingWebhookConfiguration) Reset() { *m = MutatingWebhookConfiguration{} } func (*MutatingWebhookConfiguration) ProtoMessage() {} func (*MutatingWebhookConfiguration) Descriptor() ([]byte, []int) { return fileDescriptor_3205c7dc5bf0c9bf, []int{5} } func (m *MutatingWebhookConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MutatingWebhookConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *MutatingWebhookConfiguration) XXX_Merge(src proto.Message) { xxx_messageInfo_MutatingWebhookConfiguration.Merge(m, src) } func (m *MutatingWebhookConfiguration) XXX_Size() int { return m.Size() } func (m *MutatingWebhookConfiguration) XXX_DiscardUnknown() { xxx_messageInfo_MutatingWebhookConfiguration.DiscardUnknown(m) } var xxx_messageInfo_MutatingWebhookConfiguration proto.InternalMessageInfo func (m *MutatingWebhookConfigurationList) Reset() { *m = MutatingWebhookConfigurationList{} } func (*MutatingWebhookConfigurationList) ProtoMessage() {} func (*MutatingWebhookConfigurationList) Descriptor() ([]byte, []int) { return fileDescriptor_3205c7dc5bf0c9bf, []int{6} } func (m *MutatingWebhookConfigurationList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MutatingWebhookConfigurationList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *MutatingWebhookConfigurationList) XXX_Merge(src proto.Message) { xxx_messageInfo_MutatingWebhookConfigurationList.Merge(m, src) } func (m *MutatingWebhookConfigurationList) XXX_Size() int { return m.Size() } func (m *MutatingWebhookConfigurationList) XXX_DiscardUnknown() { xxx_messageInfo_MutatingWebhookConfigurationList.DiscardUnknown(m) } var xxx_messageInfo_MutatingWebhookConfigurationList proto.InternalMessageInfo func (m *NamedRuleWithOperations) Reset() { *m = NamedRuleWithOperations{} } func (*NamedRuleWithOperations) ProtoMessage() {} func (*NamedRuleWithOperations) Descriptor() ([]byte, []int) { return fileDescriptor_3205c7dc5bf0c9bf, []int{7} } func (m *NamedRuleWithOperations) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *NamedRuleWithOperations) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *NamedRuleWithOperations) XXX_Merge(src proto.Message) { xxx_messageInfo_NamedRuleWithOperations.Merge(m, src) } func (m *NamedRuleWithOperations) XXX_Size() int { return m.Size() } func (m *NamedRuleWithOperations) XXX_DiscardUnknown() { xxx_messageInfo_NamedRuleWithOperations.DiscardUnknown(m) } var xxx_messageInfo_NamedRuleWithOperations proto.InternalMessageInfo func (m *ParamKind) Reset() { *m = ParamKind{} } func (*ParamKind) ProtoMessage() {} func (*ParamKind) Descriptor() ([]byte, []int) { return fileDescriptor_3205c7dc5bf0c9bf, []int{8} } func (m *ParamKind) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ParamKind) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ParamKind) XXX_Merge(src proto.Message) { xxx_messageInfo_ParamKind.Merge(m, src) } func (m *ParamKind) XXX_Size() int { return m.Size() } func (m *ParamKind) XXX_DiscardUnknown() { xxx_messageInfo_ParamKind.DiscardUnknown(m) } var xxx_messageInfo_ParamKind proto.InternalMessageInfo func (m *ParamRef) Reset() { *m = ParamRef{} } func (*ParamRef) ProtoMessage() {} func (*ParamRef) Descriptor() ([]byte, []int) { return fileDescriptor_3205c7dc5bf0c9bf, []int{9} } func (m *ParamRef) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ParamRef) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ParamRef) XXX_Merge(src proto.Message) { xxx_messageInfo_ParamRef.Merge(m, src) } func (m *ParamRef) XXX_Size() int { return m.Size() } func (m *ParamRef) XXX_DiscardUnknown() { xxx_messageInfo_ParamRef.DiscardUnknown(m) } var xxx_messageInfo_ParamRef proto.InternalMessageInfo func (m *Rule) Reset() { *m = Rule{} } func (*Rule) ProtoMessage() {} func (*Rule) Descriptor() ([]byte, []int) { return fileDescriptor_3205c7dc5bf0c9bf, []int{10} } func (m *Rule) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *Rule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *Rule) XXX_Merge(src proto.Message) { xxx_messageInfo_Rule.Merge(m, src) } func (m *Rule) XXX_Size() int { return m.Size() } func (m *Rule) XXX_DiscardUnknown() { xxx_messageInfo_Rule.DiscardUnknown(m) } var xxx_messageInfo_Rule proto.InternalMessageInfo func (m *RuleWithOperations) Reset() { *m = RuleWithOperations{} } func (*RuleWithOperations) ProtoMessage() {} func (*RuleWithOperations) Descriptor() ([]byte, []int) { return fileDescriptor_3205c7dc5bf0c9bf, []int{11} } func (m *RuleWithOperations) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *RuleWithOperations) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *RuleWithOperations) XXX_Merge(src proto.Message) { xxx_messageInfo_RuleWithOperations.Merge(m, src) } func (m *RuleWithOperations) XXX_Size() int { return m.Size() } func (m *RuleWithOperations) XXX_DiscardUnknown() { xxx_messageInfo_RuleWithOperations.DiscardUnknown(m) } var xxx_messageInfo_RuleWithOperations proto.InternalMessageInfo func (m *ServiceReference) Reset() { *m = ServiceReference{} } func (*ServiceReference) ProtoMessage() {} func (*ServiceReference) Descriptor() ([]byte, []int) { return fileDescriptor_3205c7dc5bf0c9bf, []int{12} } func (m *ServiceReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ServiceReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ServiceReference) XXX_Merge(src proto.Message) { xxx_messageInfo_ServiceReference.Merge(m, src) } func (m *ServiceReference) XXX_Size() int { return m.Size() } func (m *ServiceReference) XXX_DiscardUnknown() { xxx_messageInfo_ServiceReference.DiscardUnknown(m) } var xxx_messageInfo_ServiceReference proto.InternalMessageInfo func (m *TypeChecking) Reset() { *m = TypeChecking{} } func (*TypeChecking) ProtoMessage() {} func (*TypeChecking) Descriptor() ([]byte, []int) { return fileDescriptor_3205c7dc5bf0c9bf, []int{13} } func (m *TypeChecking) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *TypeChecking) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *TypeChecking) XXX_Merge(src proto.Message) { xxx_messageInfo_TypeChecking.Merge(m, src) } func (m *TypeChecking) XXX_Size() int { return m.Size() } func (m *TypeChecking) XXX_DiscardUnknown() { xxx_messageInfo_TypeChecking.DiscardUnknown(m) } var xxx_messageInfo_TypeChecking proto.InternalMessageInfo func (m *ValidatingAdmissionPolicy) Reset() { *m = ValidatingAdmissionPolicy{} } func (*ValidatingAdmissionPolicy) ProtoMessage() {} func (*ValidatingAdmissionPolicy) Descriptor() ([]byte, []int) { return fileDescriptor_3205c7dc5bf0c9bf, []int{14} } func (m *ValidatingAdmissionPolicy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ValidatingAdmissionPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ValidatingAdmissionPolicy) XXX_Merge(src proto.Message) { xxx_messageInfo_ValidatingAdmissionPolicy.Merge(m, src) } func (m *ValidatingAdmissionPolicy) XXX_Size() int { return m.Size() } func (m *ValidatingAdmissionPolicy) XXX_DiscardUnknown() { xxx_messageInfo_ValidatingAdmissionPolicy.DiscardUnknown(m) } var xxx_messageInfo_ValidatingAdmissionPolicy proto.InternalMessageInfo func (m *ValidatingAdmissionPolicyBinding) Reset() { *m = ValidatingAdmissionPolicyBinding{} } func (*ValidatingAdmissionPolicyBinding) ProtoMessage() {} func (*ValidatingAdmissionPolicyBinding) Descriptor() ([]byte, []int) { return fileDescriptor_3205c7dc5bf0c9bf, []int{15} } func (m *ValidatingAdmissionPolicyBinding) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ValidatingAdmissionPolicyBinding) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ValidatingAdmissionPolicyBinding) XXX_Merge(src proto.Message) { xxx_messageInfo_ValidatingAdmissionPolicyBinding.Merge(m, src) } func (m *ValidatingAdmissionPolicyBinding) XXX_Size() int { return m.Size() } func (m *ValidatingAdmissionPolicyBinding) XXX_DiscardUnknown() { xxx_messageInfo_ValidatingAdmissionPolicyBinding.DiscardUnknown(m) } var xxx_messageInfo_ValidatingAdmissionPolicyBinding proto.InternalMessageInfo func (m *ValidatingAdmissionPolicyBindingList) Reset() { *m = ValidatingAdmissionPolicyBindingList{} } func (*ValidatingAdmissionPolicyBindingList) ProtoMessage() {} func (*ValidatingAdmissionPolicyBindingList) Descriptor() ([]byte, []int) { return fileDescriptor_3205c7dc5bf0c9bf, []int{16} } func (m *ValidatingAdmissionPolicyBindingList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ValidatingAdmissionPolicyBindingList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ValidatingAdmissionPolicyBindingList) XXX_Merge(src proto.Message) { xxx_messageInfo_ValidatingAdmissionPolicyBindingList.Merge(m, src) } func (m *ValidatingAdmissionPolicyBindingList) XXX_Size() int { return m.Size() } func (m *ValidatingAdmissionPolicyBindingList) XXX_DiscardUnknown() { xxx_messageInfo_ValidatingAdmissionPolicyBindingList.DiscardUnknown(m) } var xxx_messageInfo_ValidatingAdmissionPolicyBindingList proto.InternalMessageInfo func (m *ValidatingAdmissionPolicyBindingSpec) Reset() { *m = ValidatingAdmissionPolicyBindingSpec{} } func (*ValidatingAdmissionPolicyBindingSpec) ProtoMessage() {} func (*ValidatingAdmissionPolicyBindingSpec) Descriptor() ([]byte, []int) { return fileDescriptor_3205c7dc5bf0c9bf, []int{17} } func (m *ValidatingAdmissionPolicyBindingSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ValidatingAdmissionPolicyBindingSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ValidatingAdmissionPolicyBindingSpec) XXX_Merge(src proto.Message) { xxx_messageInfo_ValidatingAdmissionPolicyBindingSpec.Merge(m, src) } func (m *ValidatingAdmissionPolicyBindingSpec) XXX_Size() int { return m.Size() } func (m *ValidatingAdmissionPolicyBindingSpec) XXX_DiscardUnknown() { xxx_messageInfo_ValidatingAdmissionPolicyBindingSpec.DiscardUnknown(m) } var xxx_messageInfo_ValidatingAdmissionPolicyBindingSpec proto.InternalMessageInfo func (m *ValidatingAdmissionPolicyList) Reset() { *m = ValidatingAdmissionPolicyList{} } func (*ValidatingAdmissionPolicyList) ProtoMessage() {} func (*ValidatingAdmissionPolicyList) Descriptor() ([]byte, []int) { return fileDescriptor_3205c7dc5bf0c9bf, []int{18} } func (m *ValidatingAdmissionPolicyList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ValidatingAdmissionPolicyList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ValidatingAdmissionPolicyList) XXX_Merge(src proto.Message) { xxx_messageInfo_ValidatingAdmissionPolicyList.Merge(m, src) } func (m *ValidatingAdmissionPolicyList) XXX_Size() int { return m.Size() } func (m *ValidatingAdmissionPolicyList) XXX_DiscardUnknown() { xxx_messageInfo_ValidatingAdmissionPolicyList.DiscardUnknown(m) } var xxx_messageInfo_ValidatingAdmissionPolicyList proto.InternalMessageInfo func (m *ValidatingAdmissionPolicySpec) Reset() { *m = ValidatingAdmissionPolicySpec{} } func (*ValidatingAdmissionPolicySpec) ProtoMessage() {} func (*ValidatingAdmissionPolicySpec) Descriptor() ([]byte, []int) { return fileDescriptor_3205c7dc5bf0c9bf, []int{19} } func (m *ValidatingAdmissionPolicySpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ValidatingAdmissionPolicySpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ValidatingAdmissionPolicySpec) XXX_Merge(src proto.Message) { xxx_messageInfo_ValidatingAdmissionPolicySpec.Merge(m, src) } func (m *ValidatingAdmissionPolicySpec) XXX_Size() int { return m.Size() } func (m *ValidatingAdmissionPolicySpec) XXX_DiscardUnknown() { xxx_messageInfo_ValidatingAdmissionPolicySpec.DiscardUnknown(m) } var xxx_messageInfo_ValidatingAdmissionPolicySpec proto.InternalMessageInfo func (m *ValidatingAdmissionPolicyStatus) Reset() { *m = ValidatingAdmissionPolicyStatus{} } func (*ValidatingAdmissionPolicyStatus) ProtoMessage() {} func (*ValidatingAdmissionPolicyStatus) Descriptor() ([]byte, []int) { return fileDescriptor_3205c7dc5bf0c9bf, []int{20} } func (m *ValidatingAdmissionPolicyStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ValidatingAdmissionPolicyStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ValidatingAdmissionPolicyStatus) XXX_Merge(src proto.Message) { xxx_messageInfo_ValidatingAdmissionPolicyStatus.Merge(m, src) } func (m *ValidatingAdmissionPolicyStatus) XXX_Size() int { return m.Size() } func (m *ValidatingAdmissionPolicyStatus) XXX_DiscardUnknown() { xxx_messageInfo_ValidatingAdmissionPolicyStatus.DiscardUnknown(m) } var xxx_messageInfo_ValidatingAdmissionPolicyStatus proto.InternalMessageInfo func (m *ValidatingWebhook) Reset() { *m = ValidatingWebhook{} } func (*ValidatingWebhook) ProtoMessage() {} func (*ValidatingWebhook) Descriptor() ([]byte, []int) { return fileDescriptor_3205c7dc5bf0c9bf, []int{21} } func (m *ValidatingWebhook) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ValidatingWebhook) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ValidatingWebhook) XXX_Merge(src proto.Message) { xxx_messageInfo_ValidatingWebhook.Merge(m, src) } func (m *ValidatingWebhook) XXX_Size() int { return m.Size() } func (m *ValidatingWebhook) XXX_DiscardUnknown() { xxx_messageInfo_ValidatingWebhook.DiscardUnknown(m) } var xxx_messageInfo_ValidatingWebhook proto.InternalMessageInfo func (m *ValidatingWebhookConfiguration) Reset() { *m = ValidatingWebhookConfiguration{} } func (*ValidatingWebhookConfiguration) ProtoMessage() {} func (*ValidatingWebhookConfiguration) Descriptor() ([]byte, []int) { return fileDescriptor_3205c7dc5bf0c9bf, []int{22} } func (m *ValidatingWebhookConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ValidatingWebhookConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ValidatingWebhookConfiguration) XXX_Merge(src proto.Message) { xxx_messageInfo_ValidatingWebhookConfiguration.Merge(m, src) } func (m *ValidatingWebhookConfiguration) XXX_Size() int { return m.Size() } func (m *ValidatingWebhookConfiguration) XXX_DiscardUnknown() { xxx_messageInfo_ValidatingWebhookConfiguration.DiscardUnknown(m) } var xxx_messageInfo_ValidatingWebhookConfiguration proto.InternalMessageInfo func (m *ValidatingWebhookConfigurationList) Reset() { *m = ValidatingWebhookConfigurationList{} } func (*ValidatingWebhookConfigurationList) ProtoMessage() {} func (*ValidatingWebhookConfigurationList) Descriptor() ([]byte, []int) { return fileDescriptor_3205c7dc5bf0c9bf, []int{23} } func (m *ValidatingWebhookConfigurationList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ValidatingWebhookConfigurationList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ValidatingWebhookConfigurationList) XXX_Merge(src proto.Message) { xxx_messageInfo_ValidatingWebhookConfigurationList.Merge(m, src) } func (m *ValidatingWebhookConfigurationList) XXX_Size() int { return m.Size() } func (m *ValidatingWebhookConfigurationList) XXX_DiscardUnknown() { xxx_messageInfo_ValidatingWebhookConfigurationList.DiscardUnknown(m) } var xxx_messageInfo_ValidatingWebhookConfigurationList proto.InternalMessageInfo func (m *Validation) Reset() { *m = Validation{} } func (*Validation) ProtoMessage() {} func (*Validation) Descriptor() ([]byte, []int) { return fileDescriptor_3205c7dc5bf0c9bf, []int{24} } func (m *Validation) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *Validation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *Validation) XXX_Merge(src proto.Message) { xxx_messageInfo_Validation.Merge(m, src) } func (m *Validation) XXX_Size() int { return m.Size() } func (m *Validation) XXX_DiscardUnknown() { xxx_messageInfo_Validation.DiscardUnknown(m) } var xxx_messageInfo_Validation proto.InternalMessageInfo func (m *Variable) Reset() { *m = Variable{} } func (*Variable) ProtoMessage() {} func (*Variable) Descriptor() ([]byte, []int) { return fileDescriptor_3205c7dc5bf0c9bf, []int{25} } func (m *Variable) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *Variable) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *Variable) XXX_Merge(src proto.Message) { xxx_messageInfo_Variable.Merge(m, src) } func (m *Variable) XXX_Size() int { return m.Size() } func (m *Variable) XXX_DiscardUnknown() { xxx_messageInfo_Variable.DiscardUnknown(m) } var xxx_messageInfo_Variable proto.InternalMessageInfo func (m *WebhookClientConfig) Reset() { *m = WebhookClientConfig{} } func (*WebhookClientConfig) ProtoMessage() {} func (*WebhookClientConfig) Descriptor() ([]byte, []int) { return fileDescriptor_3205c7dc5bf0c9bf, []int{26} } func (m *WebhookClientConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *WebhookClientConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *WebhookClientConfig) XXX_Merge(src proto.Message) { xxx_messageInfo_WebhookClientConfig.Merge(m, src) } func (m *WebhookClientConfig) XXX_Size() int { return m.Size() } func (m *WebhookClientConfig) XXX_DiscardUnknown() { xxx_messageInfo_WebhookClientConfig.DiscardUnknown(m) } var xxx_messageInfo_WebhookClientConfig proto.InternalMessageInfo func init() { proto.RegisterType((*AuditAnnotation)(nil), "k8s.io.api.admissionregistration.v1.AuditAnnotation") proto.RegisterType((*ExpressionWarning)(nil), "k8s.io.api.admissionregistration.v1.ExpressionWarning") proto.RegisterType((*MatchCondition)(nil), "k8s.io.api.admissionregistration.v1.MatchCondition") proto.RegisterType((*MatchResources)(nil), "k8s.io.api.admissionregistration.v1.MatchResources") proto.RegisterType((*MutatingWebhook)(nil), "k8s.io.api.admissionregistration.v1.MutatingWebhook") proto.RegisterType((*MutatingWebhookConfiguration)(nil), "k8s.io.api.admissionregistration.v1.MutatingWebhookConfiguration") proto.RegisterType((*MutatingWebhookConfigurationList)(nil), "k8s.io.api.admissionregistration.v1.MutatingWebhookConfigurationList") proto.RegisterType((*NamedRuleWithOperations)(nil), "k8s.io.api.admissionregistration.v1.NamedRuleWithOperations") proto.RegisterType((*ParamKind)(nil), "k8s.io.api.admissionregistration.v1.ParamKind") proto.RegisterType((*ParamRef)(nil), "k8s.io.api.admissionregistration.v1.ParamRef") proto.RegisterType((*Rule)(nil), "k8s.io.api.admissionregistration.v1.Rule") proto.RegisterType((*RuleWithOperations)(nil), "k8s.io.api.admissionregistration.v1.RuleWithOperations") proto.RegisterType((*ServiceReference)(nil), "k8s.io.api.admissionregistration.v1.ServiceReference") proto.RegisterType((*TypeChecking)(nil), "k8s.io.api.admissionregistration.v1.TypeChecking") proto.RegisterType((*ValidatingAdmissionPolicy)(nil), "k8s.io.api.admissionregistration.v1.ValidatingAdmissionPolicy") proto.RegisterType((*ValidatingAdmissionPolicyBinding)(nil), "k8s.io.api.admissionregistration.v1.ValidatingAdmissionPolicyBinding") proto.RegisterType((*ValidatingAdmissionPolicyBindingList)(nil), "k8s.io.api.admissionregistration.v1.ValidatingAdmissionPolicyBindingList") proto.RegisterType((*ValidatingAdmissionPolicyBindingSpec)(nil), "k8s.io.api.admissionregistration.v1.ValidatingAdmissionPolicyBindingSpec") proto.RegisterType((*ValidatingAdmissionPolicyList)(nil), "k8s.io.api.admissionregistration.v1.ValidatingAdmissionPolicyList") proto.RegisterType((*ValidatingAdmissionPolicySpec)(nil), "k8s.io.api.admissionregistration.v1.ValidatingAdmissionPolicySpec") proto.RegisterType((*ValidatingAdmissionPolicyStatus)(nil), "k8s.io.api.admissionregistration.v1.ValidatingAdmissionPolicyStatus") proto.RegisterType((*ValidatingWebhook)(nil), "k8s.io.api.admissionregistration.v1.ValidatingWebhook") proto.RegisterType((*ValidatingWebhookConfiguration)(nil), "k8s.io.api.admissionregistration.v1.ValidatingWebhookConfiguration") proto.RegisterType((*ValidatingWebhookConfigurationList)(nil), "k8s.io.api.admissionregistration.v1.ValidatingWebhookConfigurationList") proto.RegisterType((*Validation)(nil), "k8s.io.api.admissionregistration.v1.Validation") proto.RegisterType((*Variable)(nil), "k8s.io.api.admissionregistration.v1.Variable") proto.RegisterType((*WebhookClientConfig)(nil), "k8s.io.api.admissionregistration.v1.WebhookClientConfig") } func init() { proto.RegisterFile("k8s.io/api/admissionregistration/v1/generated.proto", fileDescriptor_3205c7dc5bf0c9bf) } var fileDescriptor_3205c7dc5bf0c9bf = []byte{ // 2075 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5a, 0xcd, 0x6f, 0x1b, 0xc7, 0x15, 0xf7, 0x8a, 0x94, 0x44, 0x3e, 0xea, 0x8b, 0x13, 0x27, 0xa2, 0x1d, 0x87, 0x2b, 0x6c, 0x82, 0xc2, 0x46, 0x63, 0x32, 0xb2, 0x53, 0x27, 0x08, 0x8a, 0x06, 0xa2, 0xfc, 0x01, 0xc5, 0x96, 0x2d, 0x8c, 0x12, 0xa9, 0x68, 0xdd, 0x22, 0xab, 0xdd, 0x21, 0xb9, 0x11, 0xb9, 0xbb, 0xd8, 0xd9, 0x65, 0xac, 0x9e, 0x8a, 0xf6, 0x5e, 0x14, 0xe8, 0x5f, 0xd0, 0xfe, 0x09, 0xbd, 0xb4, 0x40, 0x4f, 0xbd, 0xf9, 0x52, 0x20, 0x3d, 0xd5, 0x87, 0x62, 0x51, 0xb3, 0x97, 0x1e, 0x7a, 0x68, 0xaf, 0x02, 0x8a, 0x16, 0x33, 0x3b, 0xfb, 0xc9, 0xa5, 0xb5, 0x96, 0x6d, 0xf5, 0xe2, 0x9b, 0xf6, 0x7d, 0xfc, 0xde, 0xbc, 0x37, 0x6f, 0xe6, 0xbd, 0x79, 0x14, 0x5c, 0x3f, 0xfc, 0x98, 0xb6, 0x0c, 0xab, 0xad, 0xda, 0x46, 0x5b, 0xd5, 0x87, 0x06, 0xa5, 0x86, 0x65, 0x3a, 0xa4, 0x67, 0x50, 0xd7, 0x51, 0x5d, 0xc3, 0x32, 0xdb, 0xa3, 0xf5, 0x76, 0x8f, 0x98, 0xc4, 0x51, 0x5d, 0xa2, 0xb7, 0x6c, 0xc7, 0x72, 0x2d, 0xf4, 0x6e, 0xa0, 0xd4, 0x52, 0x6d, 0xa3, 0x95, 0xab, 0xd4, 0x1a, 0xad, 0x5f, 0xbc, 0xda, 0x33, 0xdc, 0xbe, 0x77, 0xd0, 0xd2, 0xac, 0x61, 0xbb, 0x67, 0xf5, 0xac, 0x36, 0xd7, 0x3d, 0xf0, 0xba, 0xfc, 0x8b, 0x7f, 0xf0, 0xbf, 0x02, 0xcc, 0x8b, 0x1f, 0xc6, 0x0b, 0x19, 0xaa, 0x5a, 0xdf, 0x30, 0x89, 0x73, 0xd4, 0xb6, 0x0f, 0x7b, 0x8c, 0x40, 0xdb, 0x43, 0xe2, 0xaa, 0x39, 0x2b, 0xb9, 0xd8, 0x9e, 0xa6, 0xe5, 0x78, 0xa6, 0x6b, 0x0c, 0xc9, 0x84, 0xc2, 0x8d, 0x93, 0x14, 0xa8, 0xd6, 0x27, 0x43, 0x35, 0xab, 0xa7, 0x50, 0x58, 0xde, 0xf0, 0x74, 0xc3, 0xdd, 0x30, 0x4d, 0xcb, 0xe5, 0x3e, 0xa2, 0x77, 0xa0, 0x74, 0x48, 0x8e, 0x1a, 0xd2, 0x9a, 0x74, 0xb9, 0xda, 0xa9, 0x3d, 0xf6, 0xe5, 0x73, 0x63, 0x5f, 0x2e, 0xdd, 0x25, 0x47, 0x98, 0xd1, 0xd1, 0x06, 0x2c, 0x8f, 0xd4, 0x81, 0x47, 0x6e, 0x3d, 0xb2, 0x1d, 0xc2, 0x23, 0xd4, 0x98, 0xe1, 0xa2, 0xab, 0x42, 0x74, 0x79, 0x2f, 0xcd, 0xc6, 0x59, 0x79, 0x65, 0x00, 0xf5, 0xf8, 0x6b, 0x5f, 0x75, 0x4c, 0xc3, 0xec, 0xa1, 0xf7, 0xa1, 0xd2, 0x35, 0xc8, 0x40, 0xc7, 0xa4, 0x2b, 0x00, 0x57, 0x04, 0x60, 0xe5, 0xb6, 0xa0, 0xe3, 0x48, 0x02, 0x5d, 0x81, 0xf9, 0xaf, 0x03, 0xc5, 0x46, 0x89, 0x0b, 0x2f, 0x0b, 0xe1, 0x79, 0x81, 0x87, 0x43, 0xbe, 0xd2, 0x85, 0xa5, 0x6d, 0xd5, 0xd5, 0xfa, 0x9b, 0x96, 0xa9, 0x1b, 0xdc, 0xc3, 0x35, 0x28, 0x9b, 0xea, 0x90, 0x08, 0x17, 0x17, 0x84, 0x66, 0xf9, 0xbe, 0x3a, 0x24, 0x98, 0x73, 0xd0, 0x35, 0x00, 0x92, 0xf5, 0x0f, 0x09, 0x39, 0x48, 0xb8, 0x96, 0x90, 0x52, 0xfe, 0x54, 0x16, 0x86, 0x30, 0xa1, 0x96, 0xe7, 0x68, 0x84, 0xa2, 0x47, 0x50, 0x67, 0x70, 0xd4, 0x56, 0x35, 0xb2, 0x4b, 0x06, 0x44, 0x73, 0x2d, 0x87, 0x5b, 0xad, 0x5d, 0xbb, 0xde, 0x8a, 0x93, 0x2d, 0xda, 0xb1, 0x96, 0x7d, 0xd8, 0x63, 0x04, 0xda, 0x62, 0x89, 0xd1, 0x1a, 0xad, 0xb7, 0xee, 0xa9, 0x07, 0x64, 0x10, 0xaa, 0x76, 0xde, 0x1c, 0xfb, 0x72, 0xfd, 0x7e, 0x16, 0x11, 0x4f, 0x1a, 0x41, 0x16, 0x2c, 0x59, 0x07, 0x5f, 0x11, 0xcd, 0x8d, 0xcc, 0xce, 0x9c, 0xde, 0x2c, 0x1a, 0xfb, 0xf2, 0xd2, 0x83, 0x14, 0x1c, 0xce, 0xc0, 0xa3, 0x23, 0x58, 0x74, 0x84, 0xdf, 0xd8, 0x1b, 0x10, 0xda, 0x28, 0xad, 0x95, 0x2e, 0xd7, 0xae, 0x7d, 0xb7, 0x55, 0xe0, 0x4c, 0xb5, 0x98, 0x4b, 0x3a, 0x53, 0xdb, 0x37, 0xdc, 0xfe, 0x03, 0x9b, 0x04, 0x1c, 0xda, 0x79, 0x53, 0x84, 0x7c, 0x11, 0x27, 0xa1, 0x71, 0xda, 0x12, 0xfa, 0x85, 0x04, 0xe7, 0xc9, 0x23, 0x6d, 0xe0, 0xe9, 0x24, 0x25, 0xd7, 0x28, 0xbf, 0x84, 0x25, 0x5c, 0x12, 0x4b, 0x38, 0x7f, 0x2b, 0xc7, 0x02, 0xce, 0xb5, 0x8b, 0x6e, 0x42, 0x6d, 0xc8, 0x12, 0x61, 0xc7, 0x1a, 0x18, 0xda, 0x51, 0x63, 0x9e, 0xa7, 0x8f, 0x32, 0xf6, 0xe5, 0xda, 0x76, 0x4c, 0x3e, 0xf6, 0xe5, 0xe5, 0xc4, 0xe7, 0xe7, 0x47, 0x36, 0xc1, 0x49, 0x35, 0xe5, 0x77, 0x15, 0x58, 0xde, 0xf6, 0xd8, 0xa1, 0x34, 0x7b, 0xfb, 0xe4, 0xa0, 0x6f, 0x59, 0x87, 0x05, 0x32, 0xd7, 0x81, 0x05, 0x6d, 0x60, 0x10, 0xd3, 0xdd, 0xb4, 0xcc, 0xae, 0xd1, 0x13, 0xdb, 0xfe, 0x71, 0xa1, 0x18,
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
true
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/admissionregistration/v1beta1/types_swagger_doc_generated.go
vendor/k8s.io/api/admissionregistration/v1beta1/types_swagger_doc_generated.go
/* Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package v1beta1 // This file contains a collection of methods that can be used from go-restful to // generate Swagger API documentation for its models. Please read this PR for more // information on the implementation: https://github.com/emicklei/go-restful/pull/215 // // TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if // they are on one line! For multiple line or blocks that you want to ignore use ---. // Any context after a --- is ignored. // // Those methods can be generated by using hack/update-codegen.sh // AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_AuditAnnotation = map[string]string{ "": "AuditAnnotation describes how to produce an audit annotation for an API request.", "key": "key specifies the audit annotation key. The audit annotation keys of a ValidatingAdmissionPolicy must be unique. The key must be a qualified name ([A-Za-z0-9][-A-Za-z0-9_.]*) no more than 63 bytes in length.\n\nThe key is combined with the resource name of the ValidatingAdmissionPolicy to construct an audit annotation key: \"{ValidatingAdmissionPolicy name}/{key}\".\n\nIf an admission webhook uses the same resource name as this ValidatingAdmissionPolicy and the same audit annotation key, the annotation key will be identical. In this case, the first annotation written with the key will be included in the audit event and all subsequent annotations with the same key will be discarded.\n\nRequired.", "valueExpression": "valueExpression represents the expression which is evaluated by CEL to produce an audit annotation value. The expression must evaluate to either a string or null value. If the expression evaluates to a string, the audit annotation is included with the string value. If the expression evaluates to null or empty string the audit annotation will be omitted. The valueExpression may be no longer than 5kb in length. If the result of the valueExpression is more than 10kb in length, it will be truncated to 10kb.\n\nIf multiple ValidatingAdmissionPolicyBinding resources match an API request, then the valueExpression will be evaluated for each binding. All unique values produced by the valueExpressions will be joined together in a comma-separated list.\n\nRequired.", } func (AuditAnnotation) SwaggerDoc() map[string]string { return map_AuditAnnotation } var map_ExpressionWarning = map[string]string{ "": "ExpressionWarning is a warning information that targets a specific expression.", "fieldRef": "The path to the field that refers the expression. For example, the reference to the expression of the first item of validations is \"spec.validations[0].expression\"", "warning": "The content of type checking information in a human-readable form. Each line of the warning contains the type that the expression is checked against, followed by the type check error from the compiler.", } func (ExpressionWarning) SwaggerDoc() map[string]string { return map_ExpressionWarning } var map_MatchCondition = map[string]string{ "": "MatchCondition represents a condition which must be fulfilled for a request to be sent to a webhook.", "name": "Name is an identifier for this match condition, used for strategic merging of MatchConditions, as well as providing an identifier for logging purposes. A good name should be descriptive of the associated expression. Name must be a qualified name consisting of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyName', or 'my.name', or '123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]') with an optional DNS subdomain prefix and '/' (e.g. 'example.com/MyName')\n\nRequired.", "expression": "Expression represents the expression which will be evaluated by CEL. Must evaluate to bool. CEL expressions have access to the contents of the AdmissionRequest and Authorizer, organized into CEL variables:\n\n'object' - The object from the incoming request. The value is null for DELETE requests. 'oldObject' - The existing object. The value is null for CREATE requests. 'request' - Attributes of the admission request(/pkg/apis/admission/types.go#AdmissionRequest). 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request.\n See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz\n'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the\n request resource.\nDocumentation on CEL: https://kubernetes.io/docs/reference/using-api/cel/\n\nRequired.", } func (MatchCondition) SwaggerDoc() map[string]string { return map_MatchCondition } var map_MatchResources = map[string]string{ "": "MatchResources decides whether to run the admission control policy on an object based on whether it meets the match criteria. The exclude rules take precedence over include rules (if a resource matches both, it is excluded)", "namespaceSelector": "NamespaceSelector decides whether to run the admission control policy on an object based on whether the namespace for that object matches the selector. If the object itself is a namespace, the matching is performed on object.metadata.labels. If the object is another cluster scoped resource, it never skips the policy.\n\nFor example, to run the webhook on any objects whose namespace is not associated with \"runlevel\" of \"0\" or \"1\"; you will set the selector as follows: \"namespaceSelector\": {\n \"matchExpressions\": [\n {\n \"key\": \"runlevel\",\n \"operator\": \"NotIn\",\n \"values\": [\n \"0\",\n \"1\"\n ]\n }\n ]\n}\n\nIf instead you want to only run the policy on any objects whose namespace is associated with the \"environment\" of \"prod\" or \"staging\"; you will set the selector as follows: \"namespaceSelector\": {\n \"matchExpressions\": [\n {\n \"key\": \"environment\",\n \"operator\": \"In\",\n \"values\": [\n \"prod\",\n \"staging\"\n ]\n }\n ]\n}\n\nSee https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ for more examples of label selectors.\n\nDefault to the empty LabelSelector, which matches everything.", "objectSelector": "ObjectSelector decides whether to run the validation based on if the object has matching labels. objectSelector is evaluated against both the oldObject and newObject that would be sent to the cel validation, and is considered to match if either object matches the selector. A null object (oldObject in the case of create, or newObject in the case of delete) or an object that cannot have labels (like a DeploymentRollback or a PodProxyOptions object) is not considered to match. Use the object selector only if the webhook is opt-in, because end users may skip the admission webhook by setting the labels. Default to the empty LabelSelector, which matches everything.", "resourceRules": "ResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy matches. The policy cares about an operation if it matches _any_ Rule.", "excludeResourceRules": "ExcludeResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy should not care about. The exclude rules take precedence over include rules (if a resource matches both, it is excluded)", "matchPolicy": "matchPolicy defines how the \"MatchResources\" list is used to match incoming requests. Allowed values are \"Exact\" or \"Equivalent\".\n\n- Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the ValidatingAdmissionPolicy.\n\n- Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the ValidatingAdmissionPolicy.\n\nDefaults to \"Equivalent\"", } func (MatchResources) SwaggerDoc() map[string]string { return map_MatchResources } var map_MutatingWebhook = map[string]string{ "": "MutatingWebhook describes an admission webhook and the resources and operations it applies to.", "name": "The name of the admission webhook. Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where \"imagepolicy\" is the name of the webhook, and kubernetes.io is the name of the organization. Required.", "clientConfig": "ClientConfig defines how to communicate with the hook. Required", "rules": "Rules describes what operations on what resources/subresources the webhook cares about. The webhook cares about an operation if it matches _any_ Rule. However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks from putting the cluster in a state which cannot be recovered from without completely disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects.", "failurePolicy": "FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. Defaults to Ignore.", "matchPolicy": "matchPolicy defines how the \"rules\" list is used to match incoming requests. Allowed values are \"Exact\" or \"Equivalent\".\n\n- Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the webhook.\n\n- Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and \"rules\" only included `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]`, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the webhook.\n\nDefaults to \"Exact\"", "namespaceSelector": "NamespaceSelector decides whether to run the webhook on an object based on whether the namespace for that object matches the selector. If the object itself is a namespace, the matching is performed on object.metadata.labels. If the object is another cluster scoped resource, it never skips the webhook.\n\nFor example, to run the webhook on any objects whose namespace is not associated with \"runlevel\" of \"0\" or \"1\"; you will set the selector as follows: \"namespaceSelector\": {\n \"matchExpressions\": [\n {\n \"key\": \"runlevel\",\n \"operator\": \"NotIn\",\n \"values\": [\n \"0\",\n \"1\"\n ]\n }\n ]\n}\n\nIf instead you want to only run the webhook on any objects whose namespace is associated with the \"environment\" of \"prod\" or \"staging\"; you will set the selector as follows: \"namespaceSelector\": {\n \"matchExpressions\": [\n {\n \"key\": \"environment\",\n \"operator\": \"In\",\n \"values\": [\n \"prod\",\n \"staging\"\n ]\n }\n ]\n}\n\nSee https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ for more examples of label selectors.\n\nDefault to the empty LabelSelector, which matches everything.", "objectSelector": "ObjectSelector decides whether to run the webhook based on if the object has matching labels. objectSelector is evaluated against both the oldObject and newObject that would be sent to the webhook, and is considered to match if either object matches the selector. A null object (oldObject in the case of create, or newObject in the case of delete) or an object that cannot have labels (like a DeploymentRollback or a PodProxyOptions object) is not considered to match. Use the object selector only if the webhook is opt-in, because end users may skip the admission webhook by setting the labels. Default to the empty LabelSelector, which matches everything.", "sideEffects": "SideEffects states whether this webhook has side effects. Acceptable values are: Unknown, None, Some, NoneOnDryRun Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some. Defaults to Unknown.", "timeoutSeconds": "TimeoutSeconds specifies the timeout for this webhook. After the timeout passes, the webhook call will be ignored or the API call will fail based on the failure policy. The timeout value must be between 1 and 30 seconds. Default to 30 seconds.", "admissionReviewVersions": "AdmissionReviewVersions is an ordered list of preferred `AdmissionReview` versions the Webhook expects. API server will try to use first version in the list which it supports. If none of the versions specified in this list supported by API server, validation will fail for this object. If a persisted webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail and be subject to the failure policy. Default to `['v1beta1']`.", "reinvocationPolicy": "reinvocationPolicy indicates whether this webhook should be called multiple times as part of a single admission evaluation. Allowed values are \"Never\" and \"IfNeeded\".\n\nNever: the webhook will not be called more than once in a single admission evaluation.\n\nIfNeeded: the webhook will be called at least one additional time as part of the admission evaluation if the object being admitted is modified by other admission plugins after the initial webhook call. Webhooks that specify this option *must* be idempotent, able to process objects they previously admitted. Note: * the number of additional invocations is not guaranteed to be exactly one. * if additional invocations result in further modifications to the object, webhooks are not guaranteed to be invoked again. * webhooks that use this option may be reordered to minimize the number of additional invocations. * to validate an object after all mutations are guaranteed complete, use a validating admission webhook instead.\n\nDefaults to \"Never\".", "matchConditions": "MatchConditions is a list of conditions that must be met for a request to be sent to this webhook. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.\n\nThe exact matching logic is (in order):\n 1. If ANY matchCondition evaluates to FALSE, the webhook is skipped.\n 2. If ALL matchConditions evaluate to TRUE, the webhook is called.\n 3. If any matchCondition evaluates to an error (but none are FALSE):\n - If failurePolicy=Fail, reject the request\n - If failurePolicy=Ignore, the error is ignored and the webhook is skipped", } func (MutatingWebhook) SwaggerDoc() map[string]string { return map_MutatingWebhook } var map_MutatingWebhookConfiguration = map[string]string{ "": "MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object. Deprecated in v1.16, planned for removal in v1.19. Use admissionregistration.k8s.io/v1 MutatingWebhookConfiguration instead.", "metadata": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.", "webhooks": "Webhooks is a list of webhooks and the affected resources and operations.", } func (MutatingWebhookConfiguration) SwaggerDoc() map[string]string { return map_MutatingWebhookConfiguration } var map_MutatingWebhookConfigurationList = map[string]string{ "": "MutatingWebhookConfigurationList is a list of MutatingWebhookConfiguration.", "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "items": "List of MutatingWebhookConfiguration.", } func (MutatingWebhookConfigurationList) SwaggerDoc() map[string]string { return map_MutatingWebhookConfigurationList } var map_NamedRuleWithOperations = map[string]string{ "": "NamedRuleWithOperations is a tuple of Operations and Resources with ResourceNames.", "resourceNames": "ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.", } func (NamedRuleWithOperations) SwaggerDoc() map[string]string { return map_NamedRuleWithOperations } var map_ParamKind = map[string]string{ "": "ParamKind is a tuple of Group Kind and Version.", "apiVersion": "APIVersion is the API group version the resources belong to. In format of \"group/version\". Required.", "kind": "Kind is the API kind the resources belong to. Required.", } func (ParamKind) SwaggerDoc() map[string]string { return map_ParamKind } var map_ParamRef = map[string]string{ "": "ParamRef describes how to locate the params to be used as input to expressions of rules applied by a policy binding.", "name": "name is the name of the resource being referenced.\n\nOne of `name` or `selector` must be set, but `name` and `selector` are mutually exclusive properties. If one is set, the other must be unset.\n\nA single parameter used for all admission requests can be configured by setting the `name` field, leaving `selector` blank, and setting namespace if `paramKind` is namespace-scoped.", "namespace": "namespace is the namespace of the referenced resource. Allows limiting the search for params to a specific namespace. Applies to both `name` and `selector` fields.\n\nA per-namespace parameter may be used by specifying a namespace-scoped `paramKind` in the policy and leaving this field empty.\n\n- If `paramKind` is cluster-scoped, this field MUST be unset. Setting this field results in a configuration error.\n\n- If `paramKind` is namespace-scoped, the namespace of the object being evaluated for admission will be used when this field is left unset. Take care that if this is left empty the binding must not match any cluster-scoped resources, which will result in an error.", "selector": "selector can be used to match multiple param objects based on their labels. Supply selector: {} to match all resources of the ParamKind.\n\nIf multiple params are found, they are all evaluated with the policy expressions and the results are ANDed together.\n\nOne of `name` or `selector` must be set, but `name` and `selector` are mutually exclusive properties. If one is set, the other must be unset.", "parameterNotFoundAction": "`parameterNotFoundAction` controls the behavior of the binding when the resource exists, and name or selector is valid, but there are no parameters matched by the binding. If the value is set to `Allow`, then no matched parameters will be treated as successful validation by the binding. If set to `Deny`, then no matched parameters will be subject to the `failurePolicy` of the policy.\n\nAllowed values are `Allow` or `Deny`\n\nRequired", } func (ParamRef) SwaggerDoc() map[string]string { return map_ParamRef } var map_ServiceReference = map[string]string{ "": "ServiceReference holds a reference to Service.legacy.k8s.io", "namespace": "`namespace` is the namespace of the service. Required", "name": "`name` is the name of the service. Required", "path": "`path` is an optional URL path which will be sent in any request to this service.", "port": "If specified, the port on the service that hosting webhook. Default to 443 for backward compatibility. `port` should be a valid port number (1-65535, inclusive).", } func (ServiceReference) SwaggerDoc() map[string]string { return map_ServiceReference } var map_TypeChecking = map[string]string{ "": "TypeChecking contains results of type checking the expressions in the ValidatingAdmissionPolicy", "expressionWarnings": "The type checking warnings for each expression.", } func (TypeChecking) SwaggerDoc() map[string]string { return map_TypeChecking } var map_ValidatingAdmissionPolicy = map[string]string{ "": "ValidatingAdmissionPolicy describes the definition of an admission validation policy that accepts or rejects an object without changing it.", "metadata": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.", "spec": "Specification of the desired behavior of the ValidatingAdmissionPolicy.", "status": "The status of the ValidatingAdmissionPolicy, including warnings that are useful to determine if the policy behaves in the expected way. Populated by the system. Read-only.", } func (ValidatingAdmissionPolicy) SwaggerDoc() map[string]string { return map_ValidatingAdmissionPolicy } var map_ValidatingAdmissionPolicyBinding = map[string]string{ "": "ValidatingAdmissionPolicyBinding binds the ValidatingAdmissionPolicy with paramerized resources. ValidatingAdmissionPolicyBinding and parameter CRDs together define how cluster administrators configure policies for clusters.\n\nFor a given admission request, each binding will cause its policy to be evaluated N times, where N is 1 for policies/bindings that don't use params, otherwise N is the number of parameters selected by the binding.\n\nThe CEL expressions of a policy must have a computed CEL cost below the maximum CEL budget. Each evaluation of the policy is given an independent CEL cost budget. Adding/removing policies, bindings, or params can not affect whether a given (policy, binding, param) combination is within its own CEL budget.", "metadata": "Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.", "spec": "Specification of the desired behavior of the ValidatingAdmissionPolicyBinding.", } func (ValidatingAdmissionPolicyBinding) SwaggerDoc() map[string]string { return map_ValidatingAdmissionPolicyBinding } var map_ValidatingAdmissionPolicyBindingList = map[string]string{ "": "ValidatingAdmissionPolicyBindingList is a list of ValidatingAdmissionPolicyBinding.", "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "items": "List of PolicyBinding.", } func (ValidatingAdmissionPolicyBindingList) SwaggerDoc() map[string]string { return map_ValidatingAdmissionPolicyBindingList } var map_ValidatingAdmissionPolicyBindingSpec = map[string]string{ "": "ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding.", "policyName": "PolicyName references a ValidatingAdmissionPolicy name which the ValidatingAdmissionPolicyBinding binds to. If the referenced resource does not exist, this binding is considered invalid and will be ignored Required.", "paramRef": "paramRef specifies the parameter resource used to configure the admission control policy. It should point to a resource of the type specified in ParamKind of the bound ValidatingAdmissionPolicy. If the policy specifies a ParamKind and the resource referred to by ParamRef does not exist, this binding is considered mis-configured and the FailurePolicy of the ValidatingAdmissionPolicy applied. If the policy does not specify a ParamKind then this field is ignored, and the rules are evaluated without a param.", "matchResources": "MatchResources declares what resources match this binding and will be validated by it. Note that this is intersected with the policy's matchConstraints, so only requests that are matched by the policy can be selected by this. If this is unset, all resources matched by the policy are validated by this binding When resourceRules is unset, it does not constrain resource matching. If a resource is matched by the other fields of this object, it will be validated. Note that this is differs from ValidatingAdmissionPolicy matchConstraints, where resourceRules are required.", "validationActions": "validationActions declares how Validations of the referenced ValidatingAdmissionPolicy are enforced. If a validation evaluates to false it is always enforced according to these actions.\n\nFailures defined by the ValidatingAdmissionPolicy's FailurePolicy are enforced according to these actions only if the FailurePolicy is set to Fail, otherwise the failures are ignored. This includes compilation errors, runtime errors and misconfigurations of the policy.\n\nvalidationActions is declared as a set of action values. Order does not matter. validationActions may not contain duplicates of the same action.\n\nThe supported actions values are:\n\n\"Deny\" specifies that a validation failure results in a denied request.\n\n\"Warn\" specifies that a validation failure is reported to the request client in HTTP Warning headers, with a warning code of 299. Warnings can be sent both for allowed or denied admission responses.\n\n\"Audit\" specifies that a validation failure is included in the published audit event for the request. The audit event will contain a `validation.policy.admission.k8s.io/validation_failure` audit annotation with a value containing the details of the validation failures, formatted as a JSON list of objects, each with the following fields: - message: The validation failure message string - policy: The resource name of the ValidatingAdmissionPolicy - binding: The resource name of the ValidatingAdmissionPolicyBinding - expressionIndex: The index of the failed validations in the ValidatingAdmissionPolicy - validationActions: The enforcement actions enacted for the validation failure Example audit annotation: `\"validation.policy.admission.k8s.io/validation_failure\": \"[{\"message\": \"Invalid value\", {\"policy\": \"policy.example.com\", {\"binding\": \"policybinding.example.com\", {\"expressionIndex\": \"1\", {\"validationActions\": [\"Audit\"]}]\"`\n\nClients should expect to handle additional values by ignoring any values not recognized.\n\n\"Deny\" and \"Warn\" may not be used together since this combination needlessly duplicates the validation failure both in the API response body and the HTTP warning headers.\n\nRequired.", } func (ValidatingAdmissionPolicyBindingSpec) SwaggerDoc() map[string]string { return map_ValidatingAdmissionPolicyBindingSpec } var map_ValidatingAdmissionPolicyList = map[string]string{ "": "ValidatingAdmissionPolicyList is a list of ValidatingAdmissionPolicy.", "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", "items": "List of ValidatingAdmissionPolicy.", } func (ValidatingAdmissionPolicyList) SwaggerDoc() map[string]string { return map_ValidatingAdmissionPolicyList } var map_ValidatingAdmissionPolicySpec = map[string]string{ "": "ValidatingAdmissionPolicySpec is the specification of the desired behavior of the AdmissionPolicy.", "paramKind": "ParamKind specifies the kind of resources used to parameterize this policy. If absent, there are no parameters for this policy and the param CEL variable will not be provided to validation expressions. If ParamKind refers to a non-existent kind, this policy definition is mis-configured and the FailurePolicy is applied. If paramKind is specified but paramRef is unset in ValidatingAdmissionPolicyBinding, the params variable will be null.", "matchConstraints": "MatchConstraints specifies what resources this policy is designed to validate. The AdmissionPolicy cares about a request if it matches _all_ Constraints. However, in order to prevent clusters from being put into an unstable state that cannot be recovered from via the API ValidatingAdmissionPolicy cannot match ValidatingAdmissionPolicy and ValidatingAdmissionPolicyBinding. Required.", "validations": "Validations contain CEL expressions which is used to apply the validation. Validations and AuditAnnotations may not both be empty; a minimum of one Validations or AuditAnnotations is required.", "failurePolicy": "failurePolicy defines how to handle failures for the admission policy. Failures can occur from CEL expression parse errors, type check errors, runtime errors and invalid or mis-configured policy definitions or bindings.\n\nA policy is invalid if spec.paramKind refers to a non-existent Kind. A binding is invalid if spec.paramRef.name refers to a non-existent resource.\n\nfailurePolicy does not define how validations that evaluate to false are handled.\n\nWhen failurePolicy is set to Fail, ValidatingAdmissionPolicyBinding validationActions define how failures are enforced.\n\nAllowed values are Ignore or Fail. Defaults to Fail.", "auditAnnotations": "auditAnnotations contains CEL expressions which are used to produce audit annotations for the audit event of the API request. validations and auditAnnotations may not both be empty; a least one of validations or auditAnnotations is required.", "matchConditions": "MatchConditions is a list of conditions that must be met for a request to be validated. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.\n\nIf a parameter object is provided, it can be accessed via the `params` handle in the same manner as validation expressions.\n\nThe exact matching logic is (in order):\n 1. If ANY matchCondition evaluates to FALSE, the policy is skipped.\n 2. If ALL matchConditions evaluate to TRUE, the policy is evaluated.\n 3. If any matchCondition evaluates to an error (but none are FALSE):\n - If failurePolicy=Fail, reject the request\n - If failurePolicy=Ignore, the policy is skipped", "variables": "Variables contain definitions of variables that can be used in composition of other expressions. Each variable is defined as a named CEL expression. The variables defined here will be available under `variables` in other expressions of the policy except MatchConditions because MatchConditions are evaluated before the rest of the policy.\n\nThe expression of a variable can refer to other variables defined earlier in the list but not those after. Thus, Variables must be sorted by the order of first appearance and acyclic.", } func (ValidatingAdmissionPolicySpec) SwaggerDoc() map[string]string { return map_ValidatingAdmissionPolicySpec } var map_ValidatingAdmissionPolicyStatus = map[string]string{ "": "ValidatingAdmissionPolicyStatus represents the status of an admission validation policy.", "observedGeneration": "The generation observed by the controller.", "typeChecking": "The results of type checking for each expression. Presence of this field indicates the completion of the type checking.", "conditions": "The conditions represent the latest available observations of a policy's current state.", } func (ValidatingAdmissionPolicyStatus) SwaggerDoc() map[string]string { return map_ValidatingAdmissionPolicyStatus } var map_ValidatingWebhook = map[string]string{
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
true
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/admissionregistration/v1beta1/zz_generated.deepcopy.go
vendor/k8s.io/api/admissionregistration/v1beta1/zz_generated.deepcopy.go
//go:build !ignore_autogenerated // +build !ignore_autogenerated /* Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Code generated by deepcopy-gen. DO NOT EDIT. package v1beta1 import ( admissionregistrationv1 "k8s.io/api/admissionregistration/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *AuditAnnotation) DeepCopyInto(out *AuditAnnotation) { *out = *in return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuditAnnotation. func (in *AuditAnnotation) DeepCopy() *AuditAnnotation { if in == nil { return nil } out := new(AuditAnnotation) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ExpressionWarning) DeepCopyInto(out *ExpressionWarning) { *out = *in return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExpressionWarning. func (in *ExpressionWarning) DeepCopy() *ExpressionWarning { if in == nil { return nil } out := new(ExpressionWarning) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MatchCondition) DeepCopyInto(out *MatchCondition) { *out = *in return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MatchCondition. func (in *MatchCondition) DeepCopy() *MatchCondition { if in == nil { return nil } out := new(MatchCondition) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MatchResources) DeepCopyInto(out *MatchResources) { *out = *in if in.NamespaceSelector != nil { in, out := &in.NamespaceSelector, &out.NamespaceSelector *out = new(v1.LabelSelector) (*in).DeepCopyInto(*out) } if in.ObjectSelector != nil { in, out := &in.ObjectSelector, &out.ObjectSelector *out = new(v1.LabelSelector) (*in).DeepCopyInto(*out) } if in.ResourceRules != nil { in, out := &in.ResourceRules, &out.ResourceRules *out = make([]NamedRuleWithOperations, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.ExcludeResourceRules != nil { in, out := &in.ExcludeResourceRules, &out.ExcludeResourceRules *out = make([]NamedRuleWithOperations, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.MatchPolicy != nil { in, out := &in.MatchPolicy, &out.MatchPolicy *out = new(MatchPolicyType) **out = **in } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MatchResources. func (in *MatchResources) DeepCopy() *MatchResources { if in == nil { return nil } out := new(MatchResources) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MutatingWebhook) DeepCopyInto(out *MutatingWebhook) { *out = *in in.ClientConfig.DeepCopyInto(&out.ClientConfig) if in.Rules != nil { in, out := &in.Rules, &out.Rules *out = make([]admissionregistrationv1.RuleWithOperations, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.FailurePolicy != nil { in, out := &in.FailurePolicy, &out.FailurePolicy *out = new(FailurePolicyType) **out = **in } if in.MatchPolicy != nil { in, out := &in.MatchPolicy, &out.MatchPolicy *out = new(MatchPolicyType) **out = **in } if in.NamespaceSelector != nil { in, out := &in.NamespaceSelector, &out.NamespaceSelector *out = new(v1.LabelSelector) (*in).DeepCopyInto(*out) } if in.ObjectSelector != nil { in, out := &in.ObjectSelector, &out.ObjectSelector *out = new(v1.LabelSelector) (*in).DeepCopyInto(*out) } if in.SideEffects != nil { in, out := &in.SideEffects, &out.SideEffects *out = new(SideEffectClass) **out = **in } if in.TimeoutSeconds != nil { in, out := &in.TimeoutSeconds, &out.TimeoutSeconds *out = new(int32) **out = **in } if in.AdmissionReviewVersions != nil { in, out := &in.AdmissionReviewVersions, &out.AdmissionReviewVersions *out = make([]string, len(*in)) copy(*out, *in) } if in.ReinvocationPolicy != nil { in, out := &in.ReinvocationPolicy, &out.ReinvocationPolicy *out = new(ReinvocationPolicyType) **out = **in } if in.MatchConditions != nil { in, out := &in.MatchConditions, &out.MatchConditions *out = make([]MatchCondition, len(*in)) copy(*out, *in) } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MutatingWebhook. func (in *MutatingWebhook) DeepCopy() *MutatingWebhook { if in == nil { return nil } out := new(MutatingWebhook) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MutatingWebhookConfiguration) DeepCopyInto(out *MutatingWebhookConfiguration) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) if in.Webhooks != nil { in, out := &in.Webhooks, &out.Webhooks *out = make([]MutatingWebhook, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MutatingWebhookConfiguration. func (in *MutatingWebhookConfiguration) DeepCopy() *MutatingWebhookConfiguration { if in == nil { return nil } out := new(MutatingWebhookConfiguration) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. func (in *MutatingWebhookConfiguration) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MutatingWebhookConfigurationList) DeepCopyInto(out *MutatingWebhookConfigurationList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]MutatingWebhookConfiguration, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MutatingWebhookConfigurationList. func (in *MutatingWebhookConfigurationList) DeepCopy() *MutatingWebhookConfigurationList { if in == nil { return nil } out := new(MutatingWebhookConfigurationList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. func (in *MutatingWebhookConfigurationList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NamedRuleWithOperations) DeepCopyInto(out *NamedRuleWithOperations) { *out = *in if in.ResourceNames != nil { in, out := &in.ResourceNames, &out.ResourceNames *out = make([]string, len(*in)) copy(*out, *in) } in.RuleWithOperations.DeepCopyInto(&out.RuleWithOperations) return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedRuleWithOperations. func (in *NamedRuleWithOperations) DeepCopy() *NamedRuleWithOperations { if in == nil { return nil } out := new(NamedRuleWithOperations) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ParamKind) DeepCopyInto(out *ParamKind) { *out = *in return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParamKind. func (in *ParamKind) DeepCopy() *ParamKind { if in == nil { return nil } out := new(ParamKind) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ParamRef) DeepCopyInto(out *ParamRef) { *out = *in if in.Selector != nil { in, out := &in.Selector, &out.Selector *out = new(v1.LabelSelector) (*in).DeepCopyInto(*out) } if in.ParameterNotFoundAction != nil { in, out := &in.ParameterNotFoundAction, &out.ParameterNotFoundAction *out = new(ParameterNotFoundActionType) **out = **in } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParamRef. func (in *ParamRef) DeepCopy() *ParamRef { if in == nil { return nil } out := new(ParamRef) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ServiceReference) DeepCopyInto(out *ServiceReference) { *out = *in if in.Path != nil { in, out := &in.Path, &out.Path *out = new(string) **out = **in } if in.Port != nil { in, out := &in.Port, &out.Port *out = new(int32) **out = **in } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceReference. func (in *ServiceReference) DeepCopy() *ServiceReference { if in == nil { return nil } out := new(ServiceReference) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TypeChecking) DeepCopyInto(out *TypeChecking) { *out = *in if in.ExpressionWarnings != nil { in, out := &in.ExpressionWarnings, &out.ExpressionWarnings *out = make([]ExpressionWarning, len(*in)) copy(*out, *in) } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TypeChecking. func (in *TypeChecking) DeepCopy() *TypeChecking { if in == nil { return nil } out := new(TypeChecking) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ValidatingAdmissionPolicy) DeepCopyInto(out *ValidatingAdmissionPolicy) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) in.Status.DeepCopyInto(&out.Status) return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatingAdmissionPolicy. func (in *ValidatingAdmissionPolicy) DeepCopy() *ValidatingAdmissionPolicy { if in == nil { return nil } out := new(ValidatingAdmissionPolicy) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. func (in *ValidatingAdmissionPolicy) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ValidatingAdmissionPolicyBinding) DeepCopyInto(out *ValidatingAdmissionPolicyBinding) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatingAdmissionPolicyBinding. func (in *ValidatingAdmissionPolicyBinding) DeepCopy() *ValidatingAdmissionPolicyBinding { if in == nil { return nil } out := new(ValidatingAdmissionPolicyBinding) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. func (in *ValidatingAdmissionPolicyBinding) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ValidatingAdmissionPolicyBindingList) DeepCopyInto(out *ValidatingAdmissionPolicyBindingList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]ValidatingAdmissionPolicyBinding, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatingAdmissionPolicyBindingList. func (in *ValidatingAdmissionPolicyBindingList) DeepCopy() *ValidatingAdmissionPolicyBindingList { if in == nil { return nil } out := new(ValidatingAdmissionPolicyBindingList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. func (in *ValidatingAdmissionPolicyBindingList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ValidatingAdmissionPolicyBindingSpec) DeepCopyInto(out *ValidatingAdmissionPolicyBindingSpec) { *out = *in if in.ParamRef != nil { in, out := &in.ParamRef, &out.ParamRef *out = new(ParamRef) (*in).DeepCopyInto(*out) } if in.MatchResources != nil { in, out := &in.MatchResources, &out.MatchResources *out = new(MatchResources) (*in).DeepCopyInto(*out) } if in.ValidationActions != nil { in, out := &in.ValidationActions, &out.ValidationActions *out = make([]ValidationAction, len(*in)) copy(*out, *in) } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatingAdmissionPolicyBindingSpec. func (in *ValidatingAdmissionPolicyBindingSpec) DeepCopy() *ValidatingAdmissionPolicyBindingSpec { if in == nil { return nil } out := new(ValidatingAdmissionPolicyBindingSpec) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ValidatingAdmissionPolicyList) DeepCopyInto(out *ValidatingAdmissionPolicyList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]ValidatingAdmissionPolicy, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatingAdmissionPolicyList. func (in *ValidatingAdmissionPolicyList) DeepCopy() *ValidatingAdmissionPolicyList { if in == nil { return nil } out := new(ValidatingAdmissionPolicyList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. func (in *ValidatingAdmissionPolicyList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ValidatingAdmissionPolicySpec) DeepCopyInto(out *ValidatingAdmissionPolicySpec) { *out = *in if in.ParamKind != nil { in, out := &in.ParamKind, &out.ParamKind *out = new(ParamKind) **out = **in } if in.MatchConstraints != nil { in, out := &in.MatchConstraints, &out.MatchConstraints *out = new(MatchResources) (*in).DeepCopyInto(*out) } if in.Validations != nil { in, out := &in.Validations, &out.Validations *out = make([]Validation, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.FailurePolicy != nil { in, out := &in.FailurePolicy, &out.FailurePolicy *out = new(FailurePolicyType) **out = **in } if in.AuditAnnotations != nil { in, out := &in.AuditAnnotations, &out.AuditAnnotations *out = make([]AuditAnnotation, len(*in)) copy(*out, *in) } if in.MatchConditions != nil { in, out := &in.MatchConditions, &out.MatchConditions *out = make([]MatchCondition, len(*in)) copy(*out, *in) } if in.Variables != nil { in, out := &in.Variables, &out.Variables *out = make([]Variable, len(*in)) copy(*out, *in) } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatingAdmissionPolicySpec. func (in *ValidatingAdmissionPolicySpec) DeepCopy() *ValidatingAdmissionPolicySpec { if in == nil { return nil } out := new(ValidatingAdmissionPolicySpec) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ValidatingAdmissionPolicyStatus) DeepCopyInto(out *ValidatingAdmissionPolicyStatus) { *out = *in if in.TypeChecking != nil { in, out := &in.TypeChecking, &out.TypeChecking *out = new(TypeChecking) (*in).DeepCopyInto(*out) } if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions *out = make([]v1.Condition, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatingAdmissionPolicyStatus. func (in *ValidatingAdmissionPolicyStatus) DeepCopy() *ValidatingAdmissionPolicyStatus { if in == nil { return nil } out := new(ValidatingAdmissionPolicyStatus) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ValidatingWebhook) DeepCopyInto(out *ValidatingWebhook) { *out = *in in.ClientConfig.DeepCopyInto(&out.ClientConfig) if in.Rules != nil { in, out := &in.Rules, &out.Rules *out = make([]admissionregistrationv1.RuleWithOperations, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } if in.FailurePolicy != nil { in, out := &in.FailurePolicy, &out.FailurePolicy *out = new(FailurePolicyType) **out = **in } if in.MatchPolicy != nil { in, out := &in.MatchPolicy, &out.MatchPolicy *out = new(MatchPolicyType) **out = **in } if in.NamespaceSelector != nil { in, out := &in.NamespaceSelector, &out.NamespaceSelector *out = new(v1.LabelSelector) (*in).DeepCopyInto(*out) } if in.ObjectSelector != nil { in, out := &in.ObjectSelector, &out.ObjectSelector *out = new(v1.LabelSelector) (*in).DeepCopyInto(*out) } if in.SideEffects != nil { in, out := &in.SideEffects, &out.SideEffects *out = new(SideEffectClass) **out = **in } if in.TimeoutSeconds != nil { in, out := &in.TimeoutSeconds, &out.TimeoutSeconds *out = new(int32) **out = **in } if in.AdmissionReviewVersions != nil { in, out := &in.AdmissionReviewVersions, &out.AdmissionReviewVersions *out = make([]string, len(*in)) copy(*out, *in) } if in.MatchConditions != nil { in, out := &in.MatchConditions, &out.MatchConditions *out = make([]MatchCondition, len(*in)) copy(*out, *in) } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatingWebhook. func (in *ValidatingWebhook) DeepCopy() *ValidatingWebhook { if in == nil { return nil } out := new(ValidatingWebhook) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ValidatingWebhookConfiguration) DeepCopyInto(out *ValidatingWebhookConfiguration) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) if in.Webhooks != nil { in, out := &in.Webhooks, &out.Webhooks *out = make([]ValidatingWebhook, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatingWebhookConfiguration. func (in *ValidatingWebhookConfiguration) DeepCopy() *ValidatingWebhookConfiguration { if in == nil { return nil } out := new(ValidatingWebhookConfiguration) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. func (in *ValidatingWebhookConfiguration) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ValidatingWebhookConfigurationList) DeepCopyInto(out *ValidatingWebhookConfigurationList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]ValidatingWebhookConfiguration, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidatingWebhookConfigurationList. func (in *ValidatingWebhookConfigurationList) DeepCopy() *ValidatingWebhookConfigurationList { if in == nil { return nil } out := new(ValidatingWebhookConfigurationList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. func (in *ValidatingWebhookConfigurationList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Validation) DeepCopyInto(out *Validation) { *out = *in if in.Reason != nil { in, out := &in.Reason, &out.Reason *out = new(v1.StatusReason) **out = **in } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Validation. func (in *Validation) DeepCopy() *Validation { if in == nil { return nil } out := new(Validation) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Variable) DeepCopyInto(out *Variable) { *out = *in return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Variable. func (in *Variable) DeepCopy() *Variable { if in == nil { return nil } out := new(Variable) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *WebhookClientConfig) DeepCopyInto(out *WebhookClientConfig) { *out = *in if in.URL != nil { in, out := &in.URL, &out.URL *out = new(string) **out = **in } if in.Service != nil { in, out := &in.Service, &out.Service *out = new(ServiceReference) (*in).DeepCopyInto(*out) } if in.CABundle != nil { in, out := &in.CABundle, &out.CABundle *out = make([]byte, len(*in)) copy(*out, *in) } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebhookClientConfig. func (in *WebhookClientConfig) DeepCopy() *WebhookClientConfig { if in == nil { return nil } out := new(WebhookClientConfig) in.DeepCopyInto(out) return out }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/admissionregistration/v1beta1/types.go
vendor/k8s.io/api/admissionregistration/v1beta1/types.go
/* Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package v1beta1 import ( v1 "k8s.io/api/admissionregistration/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // Rule is a tuple of APIGroups, APIVersion, and Resources.It is recommended // to make sure that all the tuple expansions are valid. type Rule = v1.Rule // ScopeType specifies a scope for a Rule. type ScopeType = v1.ScopeType const ( // ClusterScope means that scope is limited to cluster-scoped objects. // Namespace objects are cluster-scoped. ClusterScope ScopeType = v1.ClusterScope // NamespacedScope means that scope is limited to namespaced objects. NamespacedScope ScopeType = v1.NamespacedScope // AllScopes means that all scopes are included. AllScopes ScopeType = v1.AllScopes ) // ParameterNotFoundActionType specifies a failure policy that defines how a binding // is evaluated when the param referred by its perNamespaceParamRef is not found. type ParameterNotFoundActionType string const ( // Allow means all requests will be admitted if no param resources // could be found. AllowAction ParameterNotFoundActionType = "Allow" // Deny means all requests will be denied if no param resources are found. DenyAction ParameterNotFoundActionType = "Deny" ) // FailurePolicyType specifies a failure policy that defines how unrecognized errors from the admission endpoint are handled. type FailurePolicyType string const ( // Ignore means that an error calling the webhook is ignored. Ignore FailurePolicyType = "Ignore" // Fail means that an error calling the webhook causes the admission to fail. Fail FailurePolicyType = "Fail" ) // MatchPolicyType specifies the type of match policy type MatchPolicyType string const ( // Exact means requests should only be sent to the webhook if they exactly match a given rule Exact MatchPolicyType = "Exact" // Equivalent means requests should be sent to the webhook if they modify a resource listed in rules via another API group or version. Equivalent MatchPolicyType = "Equivalent" ) // SideEffectClass specifies the types of side effects a webhook may have. type SideEffectClass string const ( // SideEffectClassUnknown means that no information is known about the side effects of calling the webhook. // If a request with the dry-run attribute would trigger a call to this webhook, the request will instead fail. SideEffectClassUnknown SideEffectClass = "Unknown" // SideEffectClassNone means that calling the webhook will have no side effects. SideEffectClassNone SideEffectClass = "None" // SideEffectClassSome means that calling the webhook will possibly have side effects. // If a request with the dry-run attribute would trigger a call to this webhook, the request will instead fail. SideEffectClassSome SideEffectClass = "Some" // SideEffectClassNoneOnDryRun means that calling the webhook will possibly have side effects, but if the // request being reviewed has the dry-run attribute, the side effects will be suppressed. SideEffectClassNoneOnDryRun SideEffectClass = "NoneOnDryRun" ) // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +genclient // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.28 // ValidatingAdmissionPolicy describes the definition of an admission validation policy that accepts or rejects an object without changing it. type ValidatingAdmissionPolicy struct { metav1.TypeMeta `json:",inline"` // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Specification of the desired behavior of the ValidatingAdmissionPolicy. Spec ValidatingAdmissionPolicySpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` // The status of the ValidatingAdmissionPolicy, including warnings that are useful to determine if the policy // behaves in the expected way. // Populated by the system. // Read-only. // +optional Status ValidatingAdmissionPolicyStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` } // ValidatingAdmissionPolicyStatus represents the status of an admission validation policy. type ValidatingAdmissionPolicyStatus struct { // The generation observed by the controller. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"` // The results of type checking for each expression. // Presence of this field indicates the completion of the type checking. // +optional TypeChecking *TypeChecking `json:"typeChecking,omitempty" protobuf:"bytes,2,opt,name=typeChecking"` // The conditions represent the latest available observations of a policy's current state. // +optional // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:"conditions,omitempty" protobuf:"bytes,3,rep,name=conditions"` } // ValidatingAdmissionPolicyConditionType is the condition type of admission validation policy. type ValidatingAdmissionPolicyConditionType string // TypeChecking contains results of type checking the expressions in the // ValidatingAdmissionPolicy type TypeChecking struct { // The type checking warnings for each expression. // +optional // +listType=atomic ExpressionWarnings []ExpressionWarning `json:"expressionWarnings,omitempty" protobuf:"bytes,1,rep,name=expressionWarnings"` } // ExpressionWarning is a warning information that targets a specific expression. type ExpressionWarning struct { // The path to the field that refers the expression. // For example, the reference to the expression of the first item of // validations is "spec.validations[0].expression" FieldRef string `json:"fieldRef" protobuf:"bytes,2,opt,name=fieldRef"` // The content of type checking information in a human-readable form. // Each line of the warning contains the type that the expression is checked // against, followed by the type check error from the compiler. Warning string `json:"warning" protobuf:"bytes,3,opt,name=warning"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.28 // ValidatingAdmissionPolicyList is a list of ValidatingAdmissionPolicy. type ValidatingAdmissionPolicyList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // List of ValidatingAdmissionPolicy. Items []ValidatingAdmissionPolicy `json:"items" protobuf:"bytes,2,rep,name=items"` } // ValidatingAdmissionPolicySpec is the specification of the desired behavior of the AdmissionPolicy. type ValidatingAdmissionPolicySpec struct { // ParamKind specifies the kind of resources used to parameterize this policy. // If absent, there are no parameters for this policy and the param CEL variable will not be provided to validation expressions. // If ParamKind refers to a non-existent kind, this policy definition is mis-configured and the FailurePolicy is applied. // If paramKind is specified but paramRef is unset in ValidatingAdmissionPolicyBinding, the params variable will be null. // +optional ParamKind *ParamKind `json:"paramKind,omitempty" protobuf:"bytes,1,rep,name=paramKind"` // MatchConstraints specifies what resources this policy is designed to validate. // The AdmissionPolicy cares about a request if it matches _all_ Constraints. // However, in order to prevent clusters from being put into an unstable state that cannot be recovered from via the API // ValidatingAdmissionPolicy cannot match ValidatingAdmissionPolicy and ValidatingAdmissionPolicyBinding. // Required. MatchConstraints *MatchResources `json:"matchConstraints,omitempty" protobuf:"bytes,2,rep,name=matchConstraints"` // Validations contain CEL expressions which is used to apply the validation. // Validations and AuditAnnotations may not both be empty; a minimum of one Validations or AuditAnnotations is // required. // +listType=atomic // +optional Validations []Validation `json:"validations,omitempty" protobuf:"bytes,3,rep,name=validations"` // failurePolicy defines how to handle failures for the admission policy. Failures can // occur from CEL expression parse errors, type check errors, runtime errors and invalid // or mis-configured policy definitions or bindings. // // A policy is invalid if spec.paramKind refers to a non-existent Kind. // A binding is invalid if spec.paramRef.name refers to a non-existent resource. // // failurePolicy does not define how validations that evaluate to false are handled. // // When failurePolicy is set to Fail, ValidatingAdmissionPolicyBinding validationActions // define how failures are enforced. // // Allowed values are Ignore or Fail. Defaults to Fail. // +optional FailurePolicy *FailurePolicyType `json:"failurePolicy,omitempty" protobuf:"bytes,4,opt,name=failurePolicy,casttype=FailurePolicyType"` // auditAnnotations contains CEL expressions which are used to produce audit // annotations for the audit event of the API request. // validations and auditAnnotations may not both be empty; a least one of validations or auditAnnotations is // required. // +listType=atomic // +optional AuditAnnotations []AuditAnnotation `json:"auditAnnotations,omitempty" protobuf:"bytes,5,rep,name=auditAnnotations"` // MatchConditions is a list of conditions that must be met for a request to be validated. // Match conditions filter requests that have already been matched by the rules, // namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. // There are a maximum of 64 match conditions allowed. // // If a parameter object is provided, it can be accessed via the `params` handle in the same // manner as validation expressions. // // The exact matching logic is (in order): // 1. If ANY matchCondition evaluates to FALSE, the policy is skipped. // 2. If ALL matchConditions evaluate to TRUE, the policy is evaluated. // 3. If any matchCondition evaluates to an error (but none are FALSE): // - If failurePolicy=Fail, reject the request // - If failurePolicy=Ignore, the policy is skipped // // +patchMergeKey=name // +patchStrategy=merge // +listType=map // +listMapKey=name // +optional MatchConditions []MatchCondition `json:"matchConditions,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,6,rep,name=matchConditions"` // Variables contain definitions of variables that can be used in composition of other expressions. // Each variable is defined as a named CEL expression. // The variables defined here will be available under `variables` in other expressions of the policy // except MatchConditions because MatchConditions are evaluated before the rest of the policy. // // The expression of a variable can refer to other variables defined earlier in the list but not those after. // Thus, Variables must be sorted by the order of first appearance and acyclic. // +patchMergeKey=name // +patchStrategy=merge // +listType=map // +listMapKey=name // +optional Variables []Variable `json:"variables,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,7,rep,name=variables"` } // ParamKind is a tuple of Group Kind and Version. // +structType=atomic type ParamKind struct { // APIVersion is the API group version the resources belong to. // In format of "group/version". // Required. APIVersion string `json:"apiVersion,omitempty" protobuf:"bytes,1,rep,name=apiVersion"` // Kind is the API kind the resources belong to. // Required. Kind string `json:"kind,omitempty" protobuf:"bytes,2,rep,name=kind"` } // Validation specifies the CEL expression which is used to apply the validation. type Validation struct { // Expression represents the expression which will be evaluated by CEL. // ref: https://github.com/google/cel-spec // CEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables: // // - 'object' - The object from the incoming request. The value is null for DELETE requests. // - 'oldObject' - The existing object. The value is null for CREATE requests. // - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). // - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. // - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. // - 'variables' - Map of composited variables, from its name to its lazily evaluated value. // For example, a variable named 'foo' can be accessed as 'variables.foo'. // - 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. // See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz // - 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the // request resource. // // The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the // object. No other metadata properties are accessible. // // Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. // Accessible property names are escaped according to the following rules when accessed in the expression: // - '__' escapes to '__underscores__' // - '.' escapes to '__dot__' // - '-' escapes to '__dash__' // - '/' escapes to '__slash__' // - Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are: // "true", "false", "null", "in", "as", "break", "const", "continue", "else", "for", "function", "if", // "import", "let", "loop", "package", "namespace", "return". // Examples: // - Expression accessing a property named "namespace": {"Expression": "object.__namespace__ > 0"} // - Expression accessing a property named "x-prop": {"Expression": "object.x__dash__prop > 0"} // - Expression accessing a property named "redact__d": {"Expression": "object.redact__underscores__d > 0"} // // Equality on arrays with list type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1]. // Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type: // - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and // non-intersecting elements in `Y` are appended, retaining their partial order. // - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values // are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with // non-intersecting keys are appended, retaining their partial order. // Required. Expression string `json:"expression" protobuf:"bytes,1,opt,name=Expression"` // Message represents the message displayed when validation fails. The message is required if the Expression contains // line breaks. The message must not contain line breaks. // If unset, the message is "failed rule: {Rule}". // e.g. "must be a URL with the host matching spec.host" // If the Expression contains line breaks. Message is required. // The message must not contain line breaks. // If unset, the message is "failed Expression: {Expression}". // +optional Message string `json:"message,omitempty" protobuf:"bytes,2,opt,name=message"` // Reason represents a machine-readable description of why this validation failed. // If this is the first validation in the list to fail, this reason, as well as the // corresponding HTTP response code, are used in the // HTTP response to the client. // The currently supported reasons are: "Unauthorized", "Forbidden", "Invalid", "RequestEntityTooLarge". // If not set, StatusReasonInvalid is used in the response to the client. // +optional Reason *metav1.StatusReason `json:"reason,omitempty" protobuf:"bytes,3,opt,name=reason"` // messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. // Since messageExpression is used as a failure message, it must evaluate to a string. // If both message and messageExpression are present on a validation, then messageExpression will be used if validation fails. // If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced // as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string // that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and // the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged. // messageExpression has access to all the same variables as the `expression` except for 'authorizer' and 'authorizer.requestResource'. // Example: // "object.x must be less than max ("+string(params.max)+")" // +optional MessageExpression string `json:"messageExpression,omitempty" protobuf:"bytes,4,opt,name=messageExpression"` } // Variable is the definition of a variable that is used for composition. A variable is defined as a named expression. // +structType=atomic type Variable struct { // Name is the name of the variable. The name must be a valid CEL identifier and unique among all variables. // The variable can be accessed in other expressions through `variables` // For example, if name is "foo", the variable will be available as `variables.foo` Name string `json:"name" protobuf:"bytes,1,opt,name=Name"` // Expression is the expression that will be evaluated as the value of the variable. // The CEL expression has access to the same identifiers as the CEL expressions in Validation. Expression string `json:"expression" protobuf:"bytes,2,opt,name=Expression"` } // AuditAnnotation describes how to produce an audit annotation for an API request. type AuditAnnotation struct { // key specifies the audit annotation key. The audit annotation keys of // a ValidatingAdmissionPolicy must be unique. The key must be a qualified // name ([A-Za-z0-9][-A-Za-z0-9_.]*) no more than 63 bytes in length. // // The key is combined with the resource name of the // ValidatingAdmissionPolicy to construct an audit annotation key: // "{ValidatingAdmissionPolicy name}/{key}". // // If an admission webhook uses the same resource name as this ValidatingAdmissionPolicy // and the same audit annotation key, the annotation key will be identical. // In this case, the first annotation written with the key will be included // in the audit event and all subsequent annotations with the same key // will be discarded. // // Required. Key string `json:"key" protobuf:"bytes,1,opt,name=key"` // valueExpression represents the expression which is evaluated by CEL to // produce an audit annotation value. The expression must evaluate to either // a string or null value. If the expression evaluates to a string, the // audit annotation is included with the string value. If the expression // evaluates to null or empty string the audit annotation will be omitted. // The valueExpression may be no longer than 5kb in length. // If the result of the valueExpression is more than 10kb in length, it // will be truncated to 10kb. // // If multiple ValidatingAdmissionPolicyBinding resources match an // API request, then the valueExpression will be evaluated for // each binding. All unique values produced by the valueExpressions // will be joined together in a comma-separated list. // // Required. ValueExpression string `json:"valueExpression" protobuf:"bytes,2,opt,name=valueExpression"` } // +genclient // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.28 // ValidatingAdmissionPolicyBinding binds the ValidatingAdmissionPolicy with paramerized resources. // ValidatingAdmissionPolicyBinding and parameter CRDs together define how cluster administrators configure policies for clusters. // // For a given admission request, each binding will cause its policy to be // evaluated N times, where N is 1 for policies/bindings that don't use // params, otherwise N is the number of parameters selected by the binding. // // The CEL expressions of a policy must have a computed CEL cost below the maximum // CEL budget. Each evaluation of the policy is given an independent CEL cost budget. // Adding/removing policies, bindings, or params can not affect whether a // given (policy, binding, param) combination is within its own CEL budget. type ValidatingAdmissionPolicyBinding struct { metav1.TypeMeta `json:",inline"` // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Specification of the desired behavior of the ValidatingAdmissionPolicyBinding. Spec ValidatingAdmissionPolicyBindingSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.28 // ValidatingAdmissionPolicyBindingList is a list of ValidatingAdmissionPolicyBinding. type ValidatingAdmissionPolicyBindingList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // List of PolicyBinding. Items []ValidatingAdmissionPolicyBinding `json:"items" protobuf:"bytes,2,rep,name=items"` } // ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding. type ValidatingAdmissionPolicyBindingSpec struct { // PolicyName references a ValidatingAdmissionPolicy name which the ValidatingAdmissionPolicyBinding binds to. // If the referenced resource does not exist, this binding is considered invalid and will be ignored // Required. PolicyName string `json:"policyName,omitempty" protobuf:"bytes,1,rep,name=policyName"` // paramRef specifies the parameter resource used to configure the admission control policy. // It should point to a resource of the type specified in ParamKind of the bound ValidatingAdmissionPolicy. // If the policy specifies a ParamKind and the resource referred to by ParamRef does not exist, this binding is considered mis-configured and the FailurePolicy of the ValidatingAdmissionPolicy applied. // If the policy does not specify a ParamKind then this field is ignored, and the rules are evaluated without a param. // +optional ParamRef *ParamRef `json:"paramRef,omitempty" protobuf:"bytes,2,rep,name=paramRef"` // MatchResources declares what resources match this binding and will be validated by it. // Note that this is intersected with the policy's matchConstraints, so only requests that are matched by the policy can be selected by this. // If this is unset, all resources matched by the policy are validated by this binding // When resourceRules is unset, it does not constrain resource matching. If a resource is matched by the other fields of this object, it will be validated. // Note that this is differs from ValidatingAdmissionPolicy matchConstraints, where resourceRules are required. // +optional MatchResources *MatchResources `json:"matchResources,omitempty" protobuf:"bytes,3,rep,name=matchResources"` // validationActions declares how Validations of the referenced ValidatingAdmissionPolicy are enforced. // If a validation evaluates to false it is always enforced according to these actions. // // Failures defined by the ValidatingAdmissionPolicy's FailurePolicy are enforced according // to these actions only if the FailurePolicy is set to Fail, otherwise the failures are // ignored. This includes compilation errors, runtime errors and misconfigurations of the policy. // // validationActions is declared as a set of action values. Order does // not matter. validationActions may not contain duplicates of the same action. // // The supported actions values are: // // "Deny" specifies that a validation failure results in a denied request. // // "Warn" specifies that a validation failure is reported to the request client // in HTTP Warning headers, with a warning code of 299. Warnings can be sent // both for allowed or denied admission responses. // // "Audit" specifies that a validation failure is included in the published // audit event for the request. The audit event will contain a // `validation.policy.admission.k8s.io/validation_failure` audit annotation // with a value containing the details of the validation failures, formatted as // a JSON list of objects, each with the following fields: // - message: The validation failure message string // - policy: The resource name of the ValidatingAdmissionPolicy // - binding: The resource name of the ValidatingAdmissionPolicyBinding // - expressionIndex: The index of the failed validations in the ValidatingAdmissionPolicy // - validationActions: The enforcement actions enacted for the validation failure // Example audit annotation: // `"validation.policy.admission.k8s.io/validation_failure": "[{\"message\": \"Invalid value\", {\"policy\": \"policy.example.com\", {\"binding\": \"policybinding.example.com\", {\"expressionIndex\": \"1\", {\"validationActions\": [\"Audit\"]}]"` // // Clients should expect to handle additional values by ignoring // any values not recognized. // // "Deny" and "Warn" may not be used together since this combination // needlessly duplicates the validation failure both in the // API response body and the HTTP warning headers. // // Required. // +listType=set ValidationActions []ValidationAction `json:"validationActions,omitempty" protobuf:"bytes,4,rep,name=validationActions"` } // ParamRef describes how to locate the params to be used as input to // expressions of rules applied by a policy binding. // +structType=atomic type ParamRef struct { // name is the name of the resource being referenced. // // One of `name` or `selector` must be set, but `name` and `selector` are // mutually exclusive properties. If one is set, the other must be unset. // // A single parameter used for all admission requests can be configured // by setting the `name` field, leaving `selector` blank, and setting namespace // if `paramKind` is namespace-scoped. // Name string `json:"name,omitempty" protobuf:"bytes,1,rep,name=name"` // namespace is the namespace of the referenced resource. Allows limiting // the search for params to a specific namespace. Applies to both `name` and // `selector` fields. // // A per-namespace parameter may be used by specifying a namespace-scoped // `paramKind` in the policy and leaving this field empty. // // - If `paramKind` is cluster-scoped, this field MUST be unset. Setting this // field results in a configuration error. // // - If `paramKind` is namespace-scoped, the namespace of the object being // evaluated for admission will be used when this field is left unset. Take // care that if this is left empty the binding must not match any cluster-scoped // resources, which will result in an error. // // +optional Namespace string `json:"namespace,omitempty" protobuf:"bytes,2,rep,name=namespace"` // selector can be used to match multiple param objects based on their labels. // Supply selector: {} to match all resources of the ParamKind. // // If multiple params are found, they are all evaluated with the policy expressions // and the results are ANDed together. // // One of `name` or `selector` must be set, but `name` and `selector` are // mutually exclusive properties. If one is set, the other must be unset. // // +optional Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,3,rep,name=selector"` // `parameterNotFoundAction` controls the behavior of the binding when the resource // exists, and name or selector is valid, but there are no parameters // matched by the binding. If the value is set to `Allow`, then no // matched parameters will be treated as successful validation by the binding. // If set to `Deny`, then no matched parameters will be subject to the // `failurePolicy` of the policy. // // Allowed values are `Allow` or `Deny` // // Required ParameterNotFoundAction *ParameterNotFoundActionType `json:"parameterNotFoundAction,omitempty" protobuf:"bytes,4,rep,name=parameterNotFoundAction"` } // MatchResources decides whether to run the admission control policy on an object based // on whether it meets the match criteria. // The exclude rules take precedence over include rules (if a resource matches both, it is excluded) // +structType=atomic type MatchResources struct { // NamespaceSelector decides whether to run the admission control policy on an object based // on whether the namespace for that object matches the selector. If the // object itself is a namespace, the matching is performed on // object.metadata.labels. If the object is another cluster scoped resource, // it never skips the policy. // // For example, to run the webhook on any objects whose namespace is not // associated with "runlevel" of "0" or "1"; you will set the selector as // follows: // "namespaceSelector": { // "matchExpressions": [ // { // "key": "runlevel", // "operator": "NotIn", // "values": [ // "0", // "1" // ] // } // ] // } // // If instead you want to only run the policy on any objects whose // namespace is associated with the "environment" of "prod" or "staging"; // you will set the selector as follows: // "namespaceSelector": { // "matchExpressions": [ // { // "key": "environment", // "operator": "In", // "values": [ // "prod", // "staging" // ] // } // ] // } // // See // https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ // for more examples of label selectors. // // Default to the empty LabelSelector, which matches everything. // +optional NamespaceSelector *metav1.LabelSelector `json:"namespaceSelector,omitempty" protobuf:"bytes,1,opt,name=namespaceSelector"` // ObjectSelector decides whether to run the validation based on if the // object has matching labels. objectSelector is evaluated against both // the oldObject and newObject that would be sent to the cel validation, and // is considered to match if either object matches the selector. A null // object (oldObject in the case of create, or newObject in the case of // delete) or an object that cannot have labels (like a // DeploymentRollback or a PodProxyOptions object) is not considered to // match. // Use the object selector only if the webhook is opt-in, because end // users may skip the admission webhook by setting the labels. // Default to the empty LabelSelector, which matches everything. // +optional ObjectSelector *metav1.LabelSelector `json:"objectSelector,omitempty" protobuf:"bytes,2,opt,name=objectSelector"` // ResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy matches. // The policy cares about an operation if it matches _any_ Rule. // +listType=atomic // +optional ResourceRules []NamedRuleWithOperations `json:"resourceRules,omitempty" protobuf:"bytes,3,rep,name=resourceRules"` // ExcludeResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy should not care about.
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
true
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/admissionregistration/v1beta1/register.go
vendor/k8s.io/api/admissionregistration/v1beta1/register.go
/* Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package v1beta1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" ) // GroupName is the group name for this API. const GroupName = "admissionregistration.k8s.io" // SchemeGroupVersion is group version used to register these objects var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"} // Resource takes an unqualified resource and returns a Group qualified GroupResource func Resource(resource string) schema.GroupResource { return SchemeGroupVersion.WithResource(resource).GroupResource() } // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api. // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes. var ( // SchemeBuilder points to a list of functions added to Scheme. SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) localSchemeBuilder = &SchemeBuilder // AddToScheme is a common registration function for mapping packaged scoped group & version keys to a scheme. AddToScheme = localSchemeBuilder.AddToScheme ) // Adds the list of known types to scheme. func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &ValidatingWebhookConfiguration{}, &ValidatingWebhookConfigurationList{}, &MutatingWebhookConfiguration{}, &MutatingWebhookConfigurationList{}, &ValidatingAdmissionPolicy{}, &ValidatingAdmissionPolicyList{}, &ValidatingAdmissionPolicyBinding{}, &ValidatingAdmissionPolicyBindingList{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/admissionregistration/v1beta1/zz_generated.prerelease-lifecycle.go
vendor/k8s.io/api/admissionregistration/v1beta1/zz_generated.prerelease-lifecycle.go
//go:build !ignore_autogenerated // +build !ignore_autogenerated /* Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Code generated by prerelease-lifecycle-gen. DO NOT EDIT. package v1beta1 import ( schema "k8s.io/apimachinery/pkg/runtime/schema" ) // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *MutatingWebhookConfiguration) APILifecycleIntroduced() (major, minor int) { return 1, 9 } // APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. func (in *MutatingWebhookConfiguration) APILifecycleDeprecated() (major, minor int) { return 1, 16 } // APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. // It is controlled by "k8s:prerelease-lifecycle-gen:replacement=<group>,<version>,<kind>" tags in types.go. func (in *MutatingWebhookConfiguration) APILifecycleReplacement() schema.GroupVersionKind { return schema.GroupVersionKind{Group: "admissionregistration.k8s.io", Version: "v1", Kind: "MutatingWebhookConfiguration"} } // APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. func (in *MutatingWebhookConfiguration) APILifecycleRemoved() (major, minor int) { return 1, 22 } // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *MutatingWebhookConfigurationList) APILifecycleIntroduced() (major, minor int) { return 1, 9 } // APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. func (in *MutatingWebhookConfigurationList) APILifecycleDeprecated() (major, minor int) { return 1, 16 } // APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. // It is controlled by "k8s:prerelease-lifecycle-gen:replacement=<group>,<version>,<kind>" tags in types.go. func (in *MutatingWebhookConfigurationList) APILifecycleReplacement() schema.GroupVersionKind { return schema.GroupVersionKind{Group: "admissionregistration.k8s.io", Version: "v1", Kind: "MutatingWebhookConfigurationList"} } // APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. func (in *MutatingWebhookConfigurationList) APILifecycleRemoved() (major, minor int) { return 1, 22 } // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *ValidatingAdmissionPolicy) APILifecycleIntroduced() (major, minor int) { return 1, 28 } // APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. func (in *ValidatingAdmissionPolicy) APILifecycleDeprecated() (major, minor int) { return 1, 31 } // APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. func (in *ValidatingAdmissionPolicy) APILifecycleRemoved() (major, minor int) { return 1, 34 } // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *ValidatingAdmissionPolicyBinding) APILifecycleIntroduced() (major, minor int) { return 1, 28 } // APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. func (in *ValidatingAdmissionPolicyBinding) APILifecycleDeprecated() (major, minor int) { return 1, 31 } // APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. func (in *ValidatingAdmissionPolicyBinding) APILifecycleRemoved() (major, minor int) { return 1, 34 } // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *ValidatingAdmissionPolicyBindingList) APILifecycleIntroduced() (major, minor int) { return 1, 28 } // APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. func (in *ValidatingAdmissionPolicyBindingList) APILifecycleDeprecated() (major, minor int) { return 1, 31 } // APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. func (in *ValidatingAdmissionPolicyBindingList) APILifecycleRemoved() (major, minor int) { return 1, 34 } // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *ValidatingAdmissionPolicyList) APILifecycleIntroduced() (major, minor int) { return 1, 28 } // APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. func (in *ValidatingAdmissionPolicyList) APILifecycleDeprecated() (major, minor int) { return 1, 31 } // APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. func (in *ValidatingAdmissionPolicyList) APILifecycleRemoved() (major, minor int) { return 1, 34 } // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *ValidatingWebhookConfiguration) APILifecycleIntroduced() (major, minor int) { return 1, 9 } // APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. func (in *ValidatingWebhookConfiguration) APILifecycleDeprecated() (major, minor int) { return 1, 16 } // APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. // It is controlled by "k8s:prerelease-lifecycle-gen:replacement=<group>,<version>,<kind>" tags in types.go. func (in *ValidatingWebhookConfiguration) APILifecycleReplacement() schema.GroupVersionKind { return schema.GroupVersionKind{Group: "admissionregistration.k8s.io", Version: "v1", Kind: "ValidatingWebhookConfiguration"} } // APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. func (in *ValidatingWebhookConfiguration) APILifecycleRemoved() (major, minor int) { return 1, 22 } // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *ValidatingWebhookConfigurationList) APILifecycleIntroduced() (major, minor int) { return 1, 9 } // APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. func (in *ValidatingWebhookConfigurationList) APILifecycleDeprecated() (major, minor int) { return 1, 16 } // APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. // It is controlled by "k8s:prerelease-lifecycle-gen:replacement=<group>,<version>,<kind>" tags in types.go. func (in *ValidatingWebhookConfigurationList) APILifecycleReplacement() schema.GroupVersionKind { return schema.GroupVersionKind{Group: "admissionregistration.k8s.io", Version: "v1", Kind: "ValidatingWebhookConfigurationList"} } // APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. func (in *ValidatingWebhookConfigurationList) APILifecycleRemoved() (major, minor int) { return 1, 22 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/admissionregistration/v1beta1/doc.go
vendor/k8s.io/api/admissionregistration/v1beta1/doc.go
/* Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // +k8s:deepcopy-gen=package // +k8s:protobuf-gen=package // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true // +groupName=admissionregistration.k8s.io // Package v1beta1 is the v1beta1 version of the API. // AdmissionConfiguration and AdmissionPluginConfiguration are legacy static admission plugin configuration // MutatingWebhookConfiguration and ValidatingWebhookConfiguration are for the // new dynamic admission controller configuration. package v1beta1 // import "k8s.io/api/admissionregistration/v1beta1"
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/admissionregistration/v1beta1/generated.pb.go
vendor/k8s.io/api/admissionregistration/v1beta1/generated.pb.go
/* Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: k8s.io/api/admissionregistration/v1beta1/generated.proto package v1beta1 import ( fmt "fmt" io "io" proto "github.com/gogo/protobuf/proto" v11 "k8s.io/api/admissionregistration/v1" k8s_io_apimachinery_pkg_apis_meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *AuditAnnotation) Reset() { *m = AuditAnnotation{} } func (*AuditAnnotation) ProtoMessage() {} func (*AuditAnnotation) Descriptor() ([]byte, []int) { return fileDescriptor_7f7c65a4f012fb19, []int{0} } func (m *AuditAnnotation) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *AuditAnnotation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *AuditAnnotation) XXX_Merge(src proto.Message) { xxx_messageInfo_AuditAnnotation.Merge(m, src) } func (m *AuditAnnotation) XXX_Size() int { return m.Size() } func (m *AuditAnnotation) XXX_DiscardUnknown() { xxx_messageInfo_AuditAnnotation.DiscardUnknown(m) } var xxx_messageInfo_AuditAnnotation proto.InternalMessageInfo func (m *ExpressionWarning) Reset() { *m = ExpressionWarning{} } func (*ExpressionWarning) ProtoMessage() {} func (*ExpressionWarning) Descriptor() ([]byte, []int) { return fileDescriptor_7f7c65a4f012fb19, []int{1} } func (m *ExpressionWarning) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ExpressionWarning) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ExpressionWarning) XXX_Merge(src proto.Message) { xxx_messageInfo_ExpressionWarning.Merge(m, src) } func (m *ExpressionWarning) XXX_Size() int { return m.Size() } func (m *ExpressionWarning) XXX_DiscardUnknown() { xxx_messageInfo_ExpressionWarning.DiscardUnknown(m) } var xxx_messageInfo_ExpressionWarning proto.InternalMessageInfo func (m *MatchCondition) Reset() { *m = MatchCondition{} } func (*MatchCondition) ProtoMessage() {} func (*MatchCondition) Descriptor() ([]byte, []int) { return fileDescriptor_7f7c65a4f012fb19, []int{2} } func (m *MatchCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MatchCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *MatchCondition) XXX_Merge(src proto.Message) { xxx_messageInfo_MatchCondition.Merge(m, src) } func (m *MatchCondition) XXX_Size() int { return m.Size() } func (m *MatchCondition) XXX_DiscardUnknown() { xxx_messageInfo_MatchCondition.DiscardUnknown(m) } var xxx_messageInfo_MatchCondition proto.InternalMessageInfo func (m *MatchResources) Reset() { *m = MatchResources{} } func (*MatchResources) ProtoMessage() {} func (*MatchResources) Descriptor() ([]byte, []int) { return fileDescriptor_7f7c65a4f012fb19, []int{3} } func (m *MatchResources) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MatchResources) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *MatchResources) XXX_Merge(src proto.Message) { xxx_messageInfo_MatchResources.Merge(m, src) } func (m *MatchResources) XXX_Size() int { return m.Size() } func (m *MatchResources) XXX_DiscardUnknown() { xxx_messageInfo_MatchResources.DiscardUnknown(m) } var xxx_messageInfo_MatchResources proto.InternalMessageInfo func (m *MutatingWebhook) Reset() { *m = MutatingWebhook{} } func (*MutatingWebhook) ProtoMessage() {} func (*MutatingWebhook) Descriptor() ([]byte, []int) { return fileDescriptor_7f7c65a4f012fb19, []int{4} } func (m *MutatingWebhook) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MutatingWebhook) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *MutatingWebhook) XXX_Merge(src proto.Message) { xxx_messageInfo_MutatingWebhook.Merge(m, src) } func (m *MutatingWebhook) XXX_Size() int { return m.Size() } func (m *MutatingWebhook) XXX_DiscardUnknown() { xxx_messageInfo_MutatingWebhook.DiscardUnknown(m) } var xxx_messageInfo_MutatingWebhook proto.InternalMessageInfo func (m *MutatingWebhookConfiguration) Reset() { *m = MutatingWebhookConfiguration{} } func (*MutatingWebhookConfiguration) ProtoMessage() {} func (*MutatingWebhookConfiguration) Descriptor() ([]byte, []int) { return fileDescriptor_7f7c65a4f012fb19, []int{5} } func (m *MutatingWebhookConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MutatingWebhookConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *MutatingWebhookConfiguration) XXX_Merge(src proto.Message) { xxx_messageInfo_MutatingWebhookConfiguration.Merge(m, src) } func (m *MutatingWebhookConfiguration) XXX_Size() int { return m.Size() } func (m *MutatingWebhookConfiguration) XXX_DiscardUnknown() { xxx_messageInfo_MutatingWebhookConfiguration.DiscardUnknown(m) } var xxx_messageInfo_MutatingWebhookConfiguration proto.InternalMessageInfo func (m *MutatingWebhookConfigurationList) Reset() { *m = MutatingWebhookConfigurationList{} } func (*MutatingWebhookConfigurationList) ProtoMessage() {} func (*MutatingWebhookConfigurationList) Descriptor() ([]byte, []int) { return fileDescriptor_7f7c65a4f012fb19, []int{6} } func (m *MutatingWebhookConfigurationList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MutatingWebhookConfigurationList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *MutatingWebhookConfigurationList) XXX_Merge(src proto.Message) { xxx_messageInfo_MutatingWebhookConfigurationList.Merge(m, src) } func (m *MutatingWebhookConfigurationList) XXX_Size() int { return m.Size() } func (m *MutatingWebhookConfigurationList) XXX_DiscardUnknown() { xxx_messageInfo_MutatingWebhookConfigurationList.DiscardUnknown(m) } var xxx_messageInfo_MutatingWebhookConfigurationList proto.InternalMessageInfo func (m *NamedRuleWithOperations) Reset() { *m = NamedRuleWithOperations{} } func (*NamedRuleWithOperations) ProtoMessage() {} func (*NamedRuleWithOperations) Descriptor() ([]byte, []int) { return fileDescriptor_7f7c65a4f012fb19, []int{7} } func (m *NamedRuleWithOperations) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *NamedRuleWithOperations) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *NamedRuleWithOperations) XXX_Merge(src proto.Message) { xxx_messageInfo_NamedRuleWithOperations.Merge(m, src) } func (m *NamedRuleWithOperations) XXX_Size() int { return m.Size() } func (m *NamedRuleWithOperations) XXX_DiscardUnknown() { xxx_messageInfo_NamedRuleWithOperations.DiscardUnknown(m) } var xxx_messageInfo_NamedRuleWithOperations proto.InternalMessageInfo func (m *ParamKind) Reset() { *m = ParamKind{} } func (*ParamKind) ProtoMessage() {} func (*ParamKind) Descriptor() ([]byte, []int) { return fileDescriptor_7f7c65a4f012fb19, []int{8} } func (m *ParamKind) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ParamKind) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ParamKind) XXX_Merge(src proto.Message) { xxx_messageInfo_ParamKind.Merge(m, src) } func (m *ParamKind) XXX_Size() int { return m.Size() } func (m *ParamKind) XXX_DiscardUnknown() { xxx_messageInfo_ParamKind.DiscardUnknown(m) } var xxx_messageInfo_ParamKind proto.InternalMessageInfo func (m *ParamRef) Reset() { *m = ParamRef{} } func (*ParamRef) ProtoMessage() {} func (*ParamRef) Descriptor() ([]byte, []int) { return fileDescriptor_7f7c65a4f012fb19, []int{9} } func (m *ParamRef) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ParamRef) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ParamRef) XXX_Merge(src proto.Message) { xxx_messageInfo_ParamRef.Merge(m, src) } func (m *ParamRef) XXX_Size() int { return m.Size() } func (m *ParamRef) XXX_DiscardUnknown() { xxx_messageInfo_ParamRef.DiscardUnknown(m) } var xxx_messageInfo_ParamRef proto.InternalMessageInfo func (m *ServiceReference) Reset() { *m = ServiceReference{} } func (*ServiceReference) ProtoMessage() {} func (*ServiceReference) Descriptor() ([]byte, []int) { return fileDescriptor_7f7c65a4f012fb19, []int{10} } func (m *ServiceReference) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ServiceReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ServiceReference) XXX_Merge(src proto.Message) { xxx_messageInfo_ServiceReference.Merge(m, src) } func (m *ServiceReference) XXX_Size() int { return m.Size() } func (m *ServiceReference) XXX_DiscardUnknown() { xxx_messageInfo_ServiceReference.DiscardUnknown(m) } var xxx_messageInfo_ServiceReference proto.InternalMessageInfo func (m *TypeChecking) Reset() { *m = TypeChecking{} } func (*TypeChecking) ProtoMessage() {} func (*TypeChecking) Descriptor() ([]byte, []int) { return fileDescriptor_7f7c65a4f012fb19, []int{11} } func (m *TypeChecking) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *TypeChecking) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *TypeChecking) XXX_Merge(src proto.Message) { xxx_messageInfo_TypeChecking.Merge(m, src) } func (m *TypeChecking) XXX_Size() int { return m.Size() } func (m *TypeChecking) XXX_DiscardUnknown() { xxx_messageInfo_TypeChecking.DiscardUnknown(m) } var xxx_messageInfo_TypeChecking proto.InternalMessageInfo func (m *ValidatingAdmissionPolicy) Reset() { *m = ValidatingAdmissionPolicy{} } func (*ValidatingAdmissionPolicy) ProtoMessage() {} func (*ValidatingAdmissionPolicy) Descriptor() ([]byte, []int) { return fileDescriptor_7f7c65a4f012fb19, []int{12} } func (m *ValidatingAdmissionPolicy) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ValidatingAdmissionPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ValidatingAdmissionPolicy) XXX_Merge(src proto.Message) { xxx_messageInfo_ValidatingAdmissionPolicy.Merge(m, src) } func (m *ValidatingAdmissionPolicy) XXX_Size() int { return m.Size() } func (m *ValidatingAdmissionPolicy) XXX_DiscardUnknown() { xxx_messageInfo_ValidatingAdmissionPolicy.DiscardUnknown(m) } var xxx_messageInfo_ValidatingAdmissionPolicy proto.InternalMessageInfo func (m *ValidatingAdmissionPolicyBinding) Reset() { *m = ValidatingAdmissionPolicyBinding{} } func (*ValidatingAdmissionPolicyBinding) ProtoMessage() {} func (*ValidatingAdmissionPolicyBinding) Descriptor() ([]byte, []int) { return fileDescriptor_7f7c65a4f012fb19, []int{13} } func (m *ValidatingAdmissionPolicyBinding) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ValidatingAdmissionPolicyBinding) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ValidatingAdmissionPolicyBinding) XXX_Merge(src proto.Message) { xxx_messageInfo_ValidatingAdmissionPolicyBinding.Merge(m, src) } func (m *ValidatingAdmissionPolicyBinding) XXX_Size() int { return m.Size() } func (m *ValidatingAdmissionPolicyBinding) XXX_DiscardUnknown() { xxx_messageInfo_ValidatingAdmissionPolicyBinding.DiscardUnknown(m) } var xxx_messageInfo_ValidatingAdmissionPolicyBinding proto.InternalMessageInfo func (m *ValidatingAdmissionPolicyBindingList) Reset() { *m = ValidatingAdmissionPolicyBindingList{} } func (*ValidatingAdmissionPolicyBindingList) ProtoMessage() {} func (*ValidatingAdmissionPolicyBindingList) Descriptor() ([]byte, []int) { return fileDescriptor_7f7c65a4f012fb19, []int{14} } func (m *ValidatingAdmissionPolicyBindingList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ValidatingAdmissionPolicyBindingList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ValidatingAdmissionPolicyBindingList) XXX_Merge(src proto.Message) { xxx_messageInfo_ValidatingAdmissionPolicyBindingList.Merge(m, src) } func (m *ValidatingAdmissionPolicyBindingList) XXX_Size() int { return m.Size() } func (m *ValidatingAdmissionPolicyBindingList) XXX_DiscardUnknown() { xxx_messageInfo_ValidatingAdmissionPolicyBindingList.DiscardUnknown(m) } var xxx_messageInfo_ValidatingAdmissionPolicyBindingList proto.InternalMessageInfo func (m *ValidatingAdmissionPolicyBindingSpec) Reset() { *m = ValidatingAdmissionPolicyBindingSpec{} } func (*ValidatingAdmissionPolicyBindingSpec) ProtoMessage() {} func (*ValidatingAdmissionPolicyBindingSpec) Descriptor() ([]byte, []int) { return fileDescriptor_7f7c65a4f012fb19, []int{15} } func (m *ValidatingAdmissionPolicyBindingSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ValidatingAdmissionPolicyBindingSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ValidatingAdmissionPolicyBindingSpec) XXX_Merge(src proto.Message) { xxx_messageInfo_ValidatingAdmissionPolicyBindingSpec.Merge(m, src) } func (m *ValidatingAdmissionPolicyBindingSpec) XXX_Size() int { return m.Size() } func (m *ValidatingAdmissionPolicyBindingSpec) XXX_DiscardUnknown() { xxx_messageInfo_ValidatingAdmissionPolicyBindingSpec.DiscardUnknown(m) } var xxx_messageInfo_ValidatingAdmissionPolicyBindingSpec proto.InternalMessageInfo func (m *ValidatingAdmissionPolicyList) Reset() { *m = ValidatingAdmissionPolicyList{} } func (*ValidatingAdmissionPolicyList) ProtoMessage() {} func (*ValidatingAdmissionPolicyList) Descriptor() ([]byte, []int) { return fileDescriptor_7f7c65a4f012fb19, []int{16} } func (m *ValidatingAdmissionPolicyList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ValidatingAdmissionPolicyList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ValidatingAdmissionPolicyList) XXX_Merge(src proto.Message) { xxx_messageInfo_ValidatingAdmissionPolicyList.Merge(m, src) } func (m *ValidatingAdmissionPolicyList) XXX_Size() int { return m.Size() } func (m *ValidatingAdmissionPolicyList) XXX_DiscardUnknown() { xxx_messageInfo_ValidatingAdmissionPolicyList.DiscardUnknown(m) } var xxx_messageInfo_ValidatingAdmissionPolicyList proto.InternalMessageInfo func (m *ValidatingAdmissionPolicySpec) Reset() { *m = ValidatingAdmissionPolicySpec{} } func (*ValidatingAdmissionPolicySpec) ProtoMessage() {} func (*ValidatingAdmissionPolicySpec) Descriptor() ([]byte, []int) { return fileDescriptor_7f7c65a4f012fb19, []int{17} } func (m *ValidatingAdmissionPolicySpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ValidatingAdmissionPolicySpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ValidatingAdmissionPolicySpec) XXX_Merge(src proto.Message) { xxx_messageInfo_ValidatingAdmissionPolicySpec.Merge(m, src) } func (m *ValidatingAdmissionPolicySpec) XXX_Size() int { return m.Size() } func (m *ValidatingAdmissionPolicySpec) XXX_DiscardUnknown() { xxx_messageInfo_ValidatingAdmissionPolicySpec.DiscardUnknown(m) } var xxx_messageInfo_ValidatingAdmissionPolicySpec proto.InternalMessageInfo func (m *ValidatingAdmissionPolicyStatus) Reset() { *m = ValidatingAdmissionPolicyStatus{} } func (*ValidatingAdmissionPolicyStatus) ProtoMessage() {} func (*ValidatingAdmissionPolicyStatus) Descriptor() ([]byte, []int) { return fileDescriptor_7f7c65a4f012fb19, []int{18} } func (m *ValidatingAdmissionPolicyStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ValidatingAdmissionPolicyStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ValidatingAdmissionPolicyStatus) XXX_Merge(src proto.Message) { xxx_messageInfo_ValidatingAdmissionPolicyStatus.Merge(m, src) } func (m *ValidatingAdmissionPolicyStatus) XXX_Size() int { return m.Size() } func (m *ValidatingAdmissionPolicyStatus) XXX_DiscardUnknown() { xxx_messageInfo_ValidatingAdmissionPolicyStatus.DiscardUnknown(m) } var xxx_messageInfo_ValidatingAdmissionPolicyStatus proto.InternalMessageInfo func (m *ValidatingWebhook) Reset() { *m = ValidatingWebhook{} } func (*ValidatingWebhook) ProtoMessage() {} func (*ValidatingWebhook) Descriptor() ([]byte, []int) { return fileDescriptor_7f7c65a4f012fb19, []int{19} } func (m *ValidatingWebhook) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ValidatingWebhook) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ValidatingWebhook) XXX_Merge(src proto.Message) { xxx_messageInfo_ValidatingWebhook.Merge(m, src) } func (m *ValidatingWebhook) XXX_Size() int { return m.Size() } func (m *ValidatingWebhook) XXX_DiscardUnknown() { xxx_messageInfo_ValidatingWebhook.DiscardUnknown(m) } var xxx_messageInfo_ValidatingWebhook proto.InternalMessageInfo func (m *ValidatingWebhookConfiguration) Reset() { *m = ValidatingWebhookConfiguration{} } func (*ValidatingWebhookConfiguration) ProtoMessage() {} func (*ValidatingWebhookConfiguration) Descriptor() ([]byte, []int) { return fileDescriptor_7f7c65a4f012fb19, []int{20} } func (m *ValidatingWebhookConfiguration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ValidatingWebhookConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ValidatingWebhookConfiguration) XXX_Merge(src proto.Message) { xxx_messageInfo_ValidatingWebhookConfiguration.Merge(m, src) } func (m *ValidatingWebhookConfiguration) XXX_Size() int { return m.Size() } func (m *ValidatingWebhookConfiguration) XXX_DiscardUnknown() { xxx_messageInfo_ValidatingWebhookConfiguration.DiscardUnknown(m) } var xxx_messageInfo_ValidatingWebhookConfiguration proto.InternalMessageInfo func (m *ValidatingWebhookConfigurationList) Reset() { *m = ValidatingWebhookConfigurationList{} } func (*ValidatingWebhookConfigurationList) ProtoMessage() {} func (*ValidatingWebhookConfigurationList) Descriptor() ([]byte, []int) { return fileDescriptor_7f7c65a4f012fb19, []int{21} } func (m *ValidatingWebhookConfigurationList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *ValidatingWebhookConfigurationList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *ValidatingWebhookConfigurationList) XXX_Merge(src proto.Message) { xxx_messageInfo_ValidatingWebhookConfigurationList.Merge(m, src) } func (m *ValidatingWebhookConfigurationList) XXX_Size() int { return m.Size() } func (m *ValidatingWebhookConfigurationList) XXX_DiscardUnknown() { xxx_messageInfo_ValidatingWebhookConfigurationList.DiscardUnknown(m) } var xxx_messageInfo_ValidatingWebhookConfigurationList proto.InternalMessageInfo func (m *Validation) Reset() { *m = Validation{} } func (*Validation) ProtoMessage() {} func (*Validation) Descriptor() ([]byte, []int) { return fileDescriptor_7f7c65a4f012fb19, []int{22} } func (m *Validation) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *Validation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *Validation) XXX_Merge(src proto.Message) { xxx_messageInfo_Validation.Merge(m, src) } func (m *Validation) XXX_Size() int { return m.Size() } func (m *Validation) XXX_DiscardUnknown() { xxx_messageInfo_Validation.DiscardUnknown(m) } var xxx_messageInfo_Validation proto.InternalMessageInfo func (m *Variable) Reset() { *m = Variable{} } func (*Variable) ProtoMessage() {} func (*Variable) Descriptor() ([]byte, []int) { return fileDescriptor_7f7c65a4f012fb19, []int{23} } func (m *Variable) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *Variable) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *Variable) XXX_Merge(src proto.Message) { xxx_messageInfo_Variable.Merge(m, src) } func (m *Variable) XXX_Size() int { return m.Size() } func (m *Variable) XXX_DiscardUnknown() { xxx_messageInfo_Variable.DiscardUnknown(m) } var xxx_messageInfo_Variable proto.InternalMessageInfo func (m *WebhookClientConfig) Reset() { *m = WebhookClientConfig{} } func (*WebhookClientConfig) ProtoMessage() {} func (*WebhookClientConfig) Descriptor() ([]byte, []int) { return fileDescriptor_7f7c65a4f012fb19, []int{24} } func (m *WebhookClientConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *WebhookClientConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *WebhookClientConfig) XXX_Merge(src proto.Message) { xxx_messageInfo_WebhookClientConfig.Merge(m, src) } func (m *WebhookClientConfig) XXX_Size() int { return m.Size() } func (m *WebhookClientConfig) XXX_DiscardUnknown() { xxx_messageInfo_WebhookClientConfig.DiscardUnknown(m) } var xxx_messageInfo_WebhookClientConfig proto.InternalMessageInfo func init() { proto.RegisterType((*AuditAnnotation)(nil), "k8s.io.api.admissionregistration.v1beta1.AuditAnnotation") proto.RegisterType((*ExpressionWarning)(nil), "k8s.io.api.admissionregistration.v1beta1.ExpressionWarning") proto.RegisterType((*MatchCondition)(nil), "k8s.io.api.admissionregistration.v1beta1.MatchCondition") proto.RegisterType((*MatchResources)(nil), "k8s.io.api.admissionregistration.v1beta1.MatchResources") proto.RegisterType((*MutatingWebhook)(nil), "k8s.io.api.admissionregistration.v1beta1.MutatingWebhook") proto.RegisterType((*MutatingWebhookConfiguration)(nil), "k8s.io.api.admissionregistration.v1beta1.MutatingWebhookConfiguration") proto.RegisterType((*MutatingWebhookConfigurationList)(nil), "k8s.io.api.admissionregistration.v1beta1.MutatingWebhookConfigurationList") proto.RegisterType((*NamedRuleWithOperations)(nil), "k8s.io.api.admissionregistration.v1beta1.NamedRuleWithOperations") proto.RegisterType((*ParamKind)(nil), "k8s.io.api.admissionregistration.v1beta1.ParamKind") proto.RegisterType((*ParamRef)(nil), "k8s.io.api.admissionregistration.v1beta1.ParamRef") proto.RegisterType((*ServiceReference)(nil), "k8s.io.api.admissionregistration.v1beta1.ServiceReference") proto.RegisterType((*TypeChecking)(nil), "k8s.io.api.admissionregistration.v1beta1.TypeChecking") proto.RegisterType((*ValidatingAdmissionPolicy)(nil), "k8s.io.api.admissionregistration.v1beta1.ValidatingAdmissionPolicy") proto.RegisterType((*ValidatingAdmissionPolicyBinding)(nil), "k8s.io.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyBinding") proto.RegisterType((*ValidatingAdmissionPolicyBindingList)(nil), "k8s.io.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyBindingList") proto.RegisterType((*ValidatingAdmissionPolicyBindingSpec)(nil), "k8s.io.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyBindingSpec") proto.RegisterType((*ValidatingAdmissionPolicyList)(nil), "k8s.io.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyList") proto.RegisterType((*ValidatingAdmissionPolicySpec)(nil), "k8s.io.api.admissionregistration.v1beta1.ValidatingAdmissionPolicySpec") proto.RegisterType((*ValidatingAdmissionPolicyStatus)(nil), "k8s.io.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyStatus") proto.RegisterType((*ValidatingWebhook)(nil), "k8s.io.api.admissionregistration.v1beta1.ValidatingWebhook") proto.RegisterType((*ValidatingWebhookConfiguration)(nil), "k8s.io.api.admissionregistration.v1beta1.ValidatingWebhookConfiguration") proto.RegisterType((*ValidatingWebhookConfigurationList)(nil), "k8s.io.api.admissionregistration.v1beta1.ValidatingWebhookConfigurationList") proto.RegisterType((*Validation)(nil), "k8s.io.api.admissionregistration.v1beta1.Validation") proto.RegisterType((*Variable)(nil), "k8s.io.api.admissionregistration.v1beta1.Variable") proto.RegisterType((*WebhookClientConfig)(nil), "k8s.io.api.admissionregistration.v1beta1.WebhookClientConfig") } func init() { proto.RegisterFile("k8s.io/api/admissionregistration/v1beta1/generated.proto", fileDescriptor_7f7c65a4f012fb19) } var fileDescriptor_7f7c65a4f012fb19 = []byte{ // 1957 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x1a, 0x4d, 0x6f, 0x1b, 0xc7, 0xd5, 0x2b, 0x52, 0x12, 0xf9, 0xa8, 0x2f, 0x4e, 0x9c, 0x8a, 0x76, 0x1c, 0x52, 0x58, 0x04, 0x85, 0x0c, 0xb4, 0x64, 0xac, 0x04, 0x89, 0xeb, 0xa0, 0x28, 0x44, 0xc5, 0x76, 0xed, 0x58, 0xb2, 0x30, 0x4a, 0x24, 0xa0, 0x4d, 0x00, 0x8f, 0x76, 0x87, 0xe4, 0x96, 0xe4, 0xee, 0x76, 0x67, 0x49, 0x5b, 0x2d, 0xd0, 0x16, 0xe8, 0x21, 0xd7, 0x02, 0xbd, 0x14, 0xe8, 0xa9, 0x7f, 0xa1, 0xf7, 0x02, 0xed, 0xcd, 0xc7, 0xdc, 0x6a, 0xa0, 0x28, 0x51, 0xb1, 0x87, 0x9e, 0x7a, 0xe8, 0xa1, 0x3d, 0xe8, 0xd2, 0x62, 0x66, 0x67, 0x3f, 0xb9, 0xb4, 0x56, 0xaa, 0xac, 0x5c, 0x7c, 0xd3, 0xbe, 0xcf, 0x79, 0x6f, 0xde, 0xd7, 0x3c, 0x0a, 0x6e, 0x77, 0x6f, 0xb3, 0xba, 0x61, 0x35, 0x88, 0x6d, 0x34, 0x88, 0xde, 0x37, 0x18, 0x33, 0x2c, 0xd3, 0xa1, 0x6d, 0x83, 0xb9, 0x0e, 0x71, 0x0d, 0xcb, 0x6c, 0x0c, 0x6f, 0x1d, 0x52, 0x97, 0xdc, 0x6a, 0xb4, 0xa9, 0x49, 0x1d, 0xe2, 0x52, 0xbd, 0x6e, 0x3b, 0x96, 0x6b, 0xa1, 0x75, 0x8f, 0xb3, 0x4e, 0x6c, 0xa3, 0x9e, 0xca, 0x59, 0x97, 0x9c, 0xd7, 0xbf, 0xdd, 0x36, 0xdc, 0xce, 0xe0, 0xb0, 0xae, 0x59, 0xfd, 0x46, 0xdb, 0x6a, 0x5b, 0x0d, 0x21, 0xe0, 0x70, 0xd0, 0x12, 0x5f, 0xe2, 0x43, 0xfc, 0xe5, 0x09, 0xbe, 0xfe, 0x5e, 0x86, 0x23, 0x25, 0x4f, 0x73, 0xfd, 0xfd, 0x90, 0xa9, 0x4f, 0xb4, 0x8e, 0x61, 0x52, 0xe7, 0xa8, 0x61, 0x77, 0xdb, 0x1c, 0xc0, 0x1a, 0x7d, 0xea, 0x92, 0x34, 0xae, 0xc6, 0x34, 0x2e, 0x67, 0x60, 0xba, 0x46, 0x9f, 0x4e, 0x30, 0x7c, 0x70, 0x1a, 0x03, 0xd3, 0x3a, 0xb4, 0x4f, 0x92, 0x7c, 0x2a, 0x83, 0xe5, 0xcd, 0x81, 0x6e, 0xb8, 0x9b, 0xa6, 0x69, 0xb9, 0xc2, 0x08, 0xf4, 0x36, 0xe4, 0xba, 0xf4, 0xa8, 0xa2, 0xac, 0x29, 0xeb, 0xc5, 0x66, 0xe9, 0xf9, 0xa8, 0x76, 0x65, 0x3c, 0xaa, 0xe5, 0x3e, 0xa1, 0x47, 0x98, 0xc3, 0xd1, 0x26, 0x2c, 0x0f, 0x49, 0x6f, 0x40, 0xef, 0x3e, 0xb3, 0x1d, 0x2a, 0x5c, 0x50, 0x99, 0x11, 0xa4, 0xab, 0x92, 0x74, 0x79, 0x3f, 0x8e, 0xc6, 0x49, 0x7a, 0xb5, 0x07, 0xe5, 0xf0, 0xeb, 0x80, 0x38, 0xa6, 0x61, 0xb6, 0xd1, 0xb7, 0xa0, 0xd0, 0x32, 0x68, 0x4f, 0xc7, 0xb4, 0x25, 0x05, 0xae, 0x48, 0x81, 0x85, 0x7b, 0x12, 0x8e, 0x03, 0x0a, 0x74, 0x13, 0xe6, 0x9f, 0x7a, 0x8c, 0x95, 0x9c, 0x20, 0x5e, 0x96, 0xc4, 0xf3, 0x52, 0x1e, 0xf6, 0xf1, 0x6a, 0x0b, 0x96, 0xb6, 0x89, 0xab, 0x75, 0xb6, 0x2c, 0x53, 0x37, 0x84, 0x85, 0x6b, 0x90, 0x37, 0x49, 0x9f, 0x4a, 0x13, 0x17, 0x24, 0x67, 0x7e, 0x87, 0xf4, 0x29, 0x16, 0x18, 0xb4, 0x01, 0x40, 0x93, 0xf6, 0x21, 0x49, 0x07, 0x11, 0xd3, 0x22, 0x54, 0xea, 0x9f, 0xf3, 0x52, 0x11, 0xa6, 0xcc, 0x1a, 0x38, 0x1a, 0x65, 0xe8, 0x19, 0x94, 0xb9, 0x38, 0x66, 0x13, 0x8d, 0xee, 0xd1, 0x1e, 0xd5, 0x5c, 0xcb, 0x11, 0x5a, 0x4b, 0x1b, 0xef, 0xd5, 0xc3, 0x30, 0x0d, 0x6e, 0xac, 0x6e, 0x77, 0xdb, 0x1c, 0xc0, 0xea, 0x3c, 0x30, 0xea, 0xc3, 0x5b, 0xf5, 0x47, 0xe4, 0x90, 0xf6, 0x7c, 0xd6, 0xe6, 0x9b, 0xe3, 0x51, 0xad, 0xbc, 0x93, 0x94, 0x88, 0x27, 0x95, 0x20, 0x0b, 0x96, 0xac, 0xc3, 0x1f, 0x51, 0xcd, 0x0d, 0xd4, 0xce, 0x9c, 0x5f, 0x2d, 0x1a, 0x8f, 0x6a, 0x4b, 0x8f, 0x63, 0xe2, 0x70, 0x42, 0x3c, 0xfa, 0x19, 0x2c, 0x3a, 0xd2, 0x6e, 0x3c, 0xe8, 0x51, 0x56, 0xc9, 0xad, 0xe5, 0xd6, 0x4b, 0x1b, 0x9b, 0xf5, 0xac, 0xd9, 0x58, 0xe7, 0x76, 0xe9, 0x9c, 0xf7, 0xc0, 0x70, 0x3b, 0x8f, 0x6d, 0xea, 0xa1, 0x59, 0xf3, 0x4d, 0xe9, 0xf7, 0x45, 0x1c, 0x95, 0x8f, 0xe3, 0xea, 0xd0, 0xaf, 0x15, 0xb8, 0x4a, 0x9f, 0x69, 0xbd, 0x81, 0x4e, 0x63, 0x74, 0x95, 0xfc, 0x45, 0x9d, 0xe3, 0x86, 0x3c, 0xc7, 0xd5, 0xbb, 0x29, 0x6a, 0x70, 0xaa, 0x72, 0xf4, 0x31, 0x94, 0xfa, 0x3c, 0x24, 0x76, 0xad, 0x9e, 0xa1, 0x1d, 0x55, 0xe6, 0x45, 0x20, 0xa9, 0xe3, 0x51, 0xad, 0xb4, 0x1d, 0x82, 0x4f, 0x46, 0xb5, 0xe5, 0xc8, 0xe7, 0xa7, 0x47, 0x36, 0xc5, 0x51, 0x36, 0xf5, 0x4f, 0x05, 0x58, 0xde, 0x1e, 0xf0, 0xf4, 0x34, 0xdb, 0x07, 0xf4, 0xb0, 0x63, 0x59, 0xdd, 0x0c, 0x31, 0xfc, 0x14, 0x16, 0xb4, 0x9e, 0x41, 0x4d, 0x77, 0xcb, 0x32, 0x5b, 0x46, 0x5b, 0x06, 0xc0, 0x77, 0xb3, 0x3b, 0x42, 0xaa, 0xda, 0x8a, 0x08, 0x69, 0x5e, 0x95, 0x8a, 0x16, 0xa2, 0x50, 0x1c, 0x53, 0x84, 0x3e, 0x87, 0x59, 0x27, 0x12, 0x02, 0x1f, 0x66, 0xd1, 0x58, 0x4f, 0x71, 0xf8, 0xa2, 0xd4, 0x35, 0xeb, 0x79, 0xd8, 0x13, 0x8a, 0x1e, 0xc1, 0x62, 0x8b, 0x18, 0xbd, 0x81, 0x43, 0xa5, 0x53, 0xf3, 0xc2, 0x03, 0xdf, 0xe4, 0x11, 0x72, 0x2f, 0x8a, 0x38, 0x19, 0xd5, 0xca, 0x31, 0x80, 0x70, 0x6c, 0x9c, 0x39, 0x79, 0x41, 0xc5, 0x73, 0x5d, 0x50, 0x7a, 0x9e, 0xcf, 0x7e, 0x3d, 0x79, 0x5e, 0x7a, 0xb5, 0x79, 0xfe, 0x31, 0x94, 0x98, 0xa1, 0xd3, 0xbb, 0xad, 0x16, 0xd5, 0x5c, 0x56, 0x99, 0x0b, 0x1d, 0xb6, 0x17, 0x82, 0xb9, 0xc3, 0xc2, 0xcf, 0xad, 0x1e, 0x61, 0x0c, 0x47, 0xd9, 0xd0, 0x1d, 0x58, 0xe2, 0x5d, 0xc9, 0x1a, 0xb8, 0x7b, 0x54, 0xb3, 0x4c, 0x9d, 0x89, 0xd4, 0x98, 0xf5, 0x4e, 0xf0, 0x69, 0x0c, 0x83, 0x13, 0x94, 0xe8, 0x33, 0x58, 0x0d, 0xa2, 0x08, 0xd3, 0xa1, 0x41, 0x9f, 0xee, 0x53, 0x87, 0x7f, 0xb0, 0x4a, 0x61, 0x2d, 0xb7, 0x5e, 0x6c, 0xbe, 0x35, 0x1e, 0xd5, 0x56, 0x37, 0xd3, 0x49, 0xf0, 0x34, 0x5e, 0xf4, 0x04, 0x90, 0x43, 0x0d, 0x73, 0x68, 0x69, 0x22, 0xfc, 0x64, 0x40, 0x80, 0xb0, 0xef, 0xdd, 0xf1, 0xa8, 0x86, 0xf0, 0x04, 0xf6, 0x64, 0x54, 0xfb, 0xc6, 0x24, 0x54, 0x84, 0x47, 0x8a, 0x2c, 0xf4, 0x53, 0x58, 0xee, 0xc7, 0x1a, 0x11, 0xab, 0x2c, 0x88, 0x0c, 0xb9, 0x9d, 0x3d, 0x27, 0xe3, 0x9d, 0x2c, 0xec, 0xb9, 0x71, 0x38, 0xc3, 0x49, 0x4d, 0xea, 0x5f, 0x15, 0xb8, 0x91, 0xa8, 0x21, 0x5e, 0xba, 0x0e, 0x3c, 0x0d, 0xe8, 0x09, 0x14, 0x78, 0x54, 0xe8, 0xc4, 0x25, 0xb2, 0x45, 0xbd, 0x9b, 0x2d, 0x86, 0xbc,
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
true
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/storagemigration/v1alpha1/types_swagger_doc_generated.go
vendor/k8s.io/api/storagemigration/v1alpha1/types_swagger_doc_generated.go
/* Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package v1alpha1 // This file contains a collection of methods that can be used from go-restful to // generate Swagger API documentation for its models. Please read this PR for more // information on the implementation: https://github.com/emicklei/go-restful/pull/215 // // TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if // they are on one line! For multiple line or blocks that you want to ignore use ---. // Any context after a --- is ignored. // // Those methods can be generated by using hack/update-codegen.sh // AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_GroupVersionResource = map[string]string{ "": "The names of the group, the version, and the resource.", "group": "The name of the group.", "version": "The name of the version.", "resource": "The name of the resource.", } func (GroupVersionResource) SwaggerDoc() map[string]string { return map_GroupVersionResource } var map_MigrationCondition = map[string]string{ "": "Describes the state of a migration at a certain point.", "type": "Type of the condition.", "status": "Status of the condition, one of True, False, Unknown.", "lastUpdateTime": "The last time this condition was updated.", "reason": "The reason for the condition's last transition.", "message": "A human readable message indicating details about the transition.", } func (MigrationCondition) SwaggerDoc() map[string]string { return map_MigrationCondition } var map_StorageVersionMigration = map[string]string{ "": "StorageVersionMigration represents a migration of stored data to the latest storage version.", "metadata": "Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "spec": "Specification of the migration.", "status": "Status of the migration.", } func (StorageVersionMigration) SwaggerDoc() map[string]string { return map_StorageVersionMigration } var map_StorageVersionMigrationList = map[string]string{ "": "StorageVersionMigrationList is a collection of storage version migrations.", "metadata": "Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "items": "Items is the list of StorageVersionMigration", } func (StorageVersionMigrationList) SwaggerDoc() map[string]string { return map_StorageVersionMigrationList } var map_StorageVersionMigrationSpec = map[string]string{ "": "Spec of the storage version migration.", "resource": "The resource that is being migrated. The migrator sends requests to the endpoint serving the resource. Immutable.", "continueToken": "The token used in the list options to get the next chunk of objects to migrate. When the .status.conditions indicates the migration is \"Running\", users can use this token to check the progress of the migration.", } func (StorageVersionMigrationSpec) SwaggerDoc() map[string]string { return map_StorageVersionMigrationSpec } var map_StorageVersionMigrationStatus = map[string]string{ "": "Status of the storage version migration.", "conditions": "The latest available observations of the migration's current state.", "resourceVersion": "ResourceVersion to compare with the GC cache for performing the migration. This is the current resource version of given group, version and resource when kube-controller-manager first observes this StorageVersionMigration resource.", } func (StorageVersionMigrationStatus) SwaggerDoc() map[string]string { return map_StorageVersionMigrationStatus } // AUTO-GENERATED FUNCTIONS END HERE
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/storagemigration/v1alpha1/zz_generated.deepcopy.go
vendor/k8s.io/api/storagemigration/v1alpha1/zz_generated.deepcopy.go
//go:build !ignore_autogenerated // +build !ignore_autogenerated /* Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Code generated by deepcopy-gen. DO NOT EDIT. package v1alpha1 import ( runtime "k8s.io/apimachinery/pkg/runtime" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *GroupVersionResource) DeepCopyInto(out *GroupVersionResource) { *out = *in return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupVersionResource. func (in *GroupVersionResource) DeepCopy() *GroupVersionResource { if in == nil { return nil } out := new(GroupVersionResource) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MigrationCondition) DeepCopyInto(out *MigrationCondition) { *out = *in in.LastUpdateTime.DeepCopyInto(&out.LastUpdateTime) return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MigrationCondition. func (in *MigrationCondition) DeepCopy() *MigrationCondition { if in == nil { return nil } out := new(MigrationCondition) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *StorageVersionMigration) DeepCopyInto(out *StorageVersionMigration) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) out.Spec = in.Spec in.Status.DeepCopyInto(&out.Status) return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageVersionMigration. func (in *StorageVersionMigration) DeepCopy() *StorageVersionMigration { if in == nil { return nil } out := new(StorageVersionMigration) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. func (in *StorageVersionMigration) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *StorageVersionMigrationList) DeepCopyInto(out *StorageVersionMigrationList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]StorageVersionMigration, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageVersionMigrationList. func (in *StorageVersionMigrationList) DeepCopy() *StorageVersionMigrationList { if in == nil { return nil } out := new(StorageVersionMigrationList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. func (in *StorageVersionMigrationList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *StorageVersionMigrationSpec) DeepCopyInto(out *StorageVersionMigrationSpec) { *out = *in out.Resource = in.Resource return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageVersionMigrationSpec. func (in *StorageVersionMigrationSpec) DeepCopy() *StorageVersionMigrationSpec { if in == nil { return nil } out := new(StorageVersionMigrationSpec) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *StorageVersionMigrationStatus) DeepCopyInto(out *StorageVersionMigrationStatus) { *out = *in if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions *out = make([]MigrationCondition, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageVersionMigrationStatus. func (in *StorageVersionMigrationStatus) DeepCopy() *StorageVersionMigrationStatus { if in == nil { return nil } out := new(StorageVersionMigrationStatus) in.DeepCopyInto(out) return out }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/storagemigration/v1alpha1/types.go
vendor/k8s.io/api/storagemigration/v1alpha1/types.go
/* Copyright 2024 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package v1alpha1 import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // +genclient // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.30 // StorageVersionMigration represents a migration of stored data to the latest // storage version. type StorageVersionMigration struct { metav1.TypeMeta `json:",inline"` // Standard object metadata. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Specification of the migration. // +optional Spec StorageVersionMigrationSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` // Status of the migration. // +optional Status StorageVersionMigrationStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` } // Spec of the storage version migration. type StorageVersionMigrationSpec struct { // The resource that is being migrated. The migrator sends requests to // the endpoint serving the resource. // Immutable. Resource GroupVersionResource `json:"resource" protobuf:"bytes,1,opt,name=resource"` // The token used in the list options to get the next chunk of objects // to migrate. When the .status.conditions indicates the migration is // "Running", users can use this token to check the progress of the // migration. // +optional ContinueToken string `json:"continueToken,omitempty" protobuf:"bytes,2,opt,name=continueToken"` // TODO: consider recording the storage version hash when the migration // is created. It can avoid races. } // The names of the group, the version, and the resource. type GroupVersionResource struct { // The name of the group. Group string `json:"group,omitempty" protobuf:"bytes,1,opt,name=group"` // The name of the version. Version string `json:"version,omitempty" protobuf:"bytes,2,opt,name=version"` // The name of the resource. Resource string `json:"resource,omitempty" protobuf:"bytes,3,opt,name=resource"` } type MigrationConditionType string const ( // Indicates that the migration is running. MigrationRunning MigrationConditionType = "Running" // Indicates that the migration has completed successfully. MigrationSucceeded MigrationConditionType = "Succeeded" // Indicates that the migration has failed. MigrationFailed MigrationConditionType = "Failed" ) // Describes the state of a migration at a certain point. type MigrationCondition struct { // Type of the condition. Type MigrationConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=MigrationConditionType"` // Status of the condition, one of True, False, Unknown. Status corev1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/api/core/v1.ConditionStatus"` // The last time this condition was updated. // +optional LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty" protobuf:"bytes,3,opt,name=lastUpdateTime"` // The reason for the condition's last transition. // +optional Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"` // A human readable message indicating details about the transition. // +optional Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"` } // Status of the storage version migration. type StorageVersionMigrationStatus struct { // The latest available observations of the migration's current state. // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type // +optional Conditions []MigrationCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` // ResourceVersion to compare with the GC cache for performing the migration. // This is the current resource version of given group, version and resource when // kube-controller-manager first observes this StorageVersionMigration resource. ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,2,opt,name=resourceVersion"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.30 // StorageVersionMigrationList is a collection of storage version migrations. type StorageVersionMigrationList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Items is the list of StorageVersionMigration // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Items []StorageVersionMigration `json:"items" listType:"map" listMapKey:"type" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,2,rep,name=items"` }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/storagemigration/v1alpha1/register.go
vendor/k8s.io/api/storagemigration/v1alpha1/register.go
/* Copyright 2024 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package v1alpha1 import ( "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // GroupName is the group name use in this package const GroupName = "storagemigration.k8s.io" // SchemeGroupVersion is group version used to register these objects var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} // Kind takes an unqualified kind and returns a Group qualified GroupKind func Kind(kind string) schema.GroupKind { return SchemeGroupVersion.WithKind(kind).GroupKind() } // Resource takes an unqualified resource and returns a Group qualified GroupResource func Resource(resource string) schema.GroupResource { return SchemeGroupVersion.WithResource(resource).GroupResource() } var ( SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) localSchemeBuilder = &SchemeBuilder AddToScheme = localSchemeBuilder.AddToScheme ) // Adds the list of known types to the given scheme. func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &StorageVersionMigration{}, &StorageVersionMigrationList{}, ) // Add the watch version that applies metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/storagemigration/v1alpha1/zz_generated.prerelease-lifecycle.go
vendor/k8s.io/api/storagemigration/v1alpha1/zz_generated.prerelease-lifecycle.go
//go:build !ignore_autogenerated // +build !ignore_autogenerated /* Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Code generated by prerelease-lifecycle-gen. DO NOT EDIT. package v1alpha1 // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *StorageVersionMigration) APILifecycleIntroduced() (major, minor int) { return 1, 30 } // APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. func (in *StorageVersionMigration) APILifecycleDeprecated() (major, minor int) { return 1, 33 } // APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. func (in *StorageVersionMigration) APILifecycleRemoved() (major, minor int) { return 1, 36 } // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *StorageVersionMigrationList) APILifecycleIntroduced() (major, minor int) { return 1, 30 } // APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. func (in *StorageVersionMigrationList) APILifecycleDeprecated() (major, minor int) { return 1, 33 } // APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. func (in *StorageVersionMigrationList) APILifecycleRemoved() (major, minor int) { return 1, 36 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/storagemigration/v1alpha1/doc.go
vendor/k8s.io/api/storagemigration/v1alpha1/doc.go
/* Copyright 2024 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // +k8s:deepcopy-gen=package // +k8s:protobuf-gen=package // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true // +groupName=storagemigration.k8s.io package v1alpha1 // import "k8s.io/api/storagemigration/v1alpha1"
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/storagemigration/v1alpha1/generated.pb.go
vendor/k8s.io/api/storagemigration/v1alpha1/generated.pb.go
/* Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: k8s.io/api/storagemigration/v1alpha1/generated.proto package v1alpha1 import ( fmt "fmt" io "io" proto "github.com/gogo/protobuf/proto" k8s_io_api_core_v1 "k8s.io/api/core/v1" math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *GroupVersionResource) Reset() { *m = GroupVersionResource{} } func (*GroupVersionResource) ProtoMessage() {} func (*GroupVersionResource) Descriptor() ([]byte, []int) { return fileDescriptor_0117377a57b172b9, []int{0} } func (m *GroupVersionResource) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *GroupVersionResource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *GroupVersionResource) XXX_Merge(src proto.Message) { xxx_messageInfo_GroupVersionResource.Merge(m, src) } func (m *GroupVersionResource) XXX_Size() int { return m.Size() } func (m *GroupVersionResource) XXX_DiscardUnknown() { xxx_messageInfo_GroupVersionResource.DiscardUnknown(m) } var xxx_messageInfo_GroupVersionResource proto.InternalMessageInfo func (m *MigrationCondition) Reset() { *m = MigrationCondition{} } func (*MigrationCondition) ProtoMessage() {} func (*MigrationCondition) Descriptor() ([]byte, []int) { return fileDescriptor_0117377a57b172b9, []int{1} } func (m *MigrationCondition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *MigrationCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *MigrationCondition) XXX_Merge(src proto.Message) { xxx_messageInfo_MigrationCondition.Merge(m, src) } func (m *MigrationCondition) XXX_Size() int { return m.Size() } func (m *MigrationCondition) XXX_DiscardUnknown() { xxx_messageInfo_MigrationCondition.DiscardUnknown(m) } var xxx_messageInfo_MigrationCondition proto.InternalMessageInfo func (m *StorageVersionMigration) Reset() { *m = StorageVersionMigration{} } func (*StorageVersionMigration) ProtoMessage() {} func (*StorageVersionMigration) Descriptor() ([]byte, []int) { return fileDescriptor_0117377a57b172b9, []int{2} } func (m *StorageVersionMigration) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *StorageVersionMigration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *StorageVersionMigration) XXX_Merge(src proto.Message) { xxx_messageInfo_StorageVersionMigration.Merge(m, src) } func (m *StorageVersionMigration) XXX_Size() int { return m.Size() } func (m *StorageVersionMigration) XXX_DiscardUnknown() { xxx_messageInfo_StorageVersionMigration.DiscardUnknown(m) } var xxx_messageInfo_StorageVersionMigration proto.InternalMessageInfo func (m *StorageVersionMigrationList) Reset() { *m = StorageVersionMigrationList{} } func (*StorageVersionMigrationList) ProtoMessage() {} func (*StorageVersionMigrationList) Descriptor() ([]byte, []int) { return fileDescriptor_0117377a57b172b9, []int{3} } func (m *StorageVersionMigrationList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *StorageVersionMigrationList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *StorageVersionMigrationList) XXX_Merge(src proto.Message) { xxx_messageInfo_StorageVersionMigrationList.Merge(m, src) } func (m *StorageVersionMigrationList) XXX_Size() int { return m.Size() } func (m *StorageVersionMigrationList) XXX_DiscardUnknown() { xxx_messageInfo_StorageVersionMigrationList.DiscardUnknown(m) } var xxx_messageInfo_StorageVersionMigrationList proto.InternalMessageInfo func (m *StorageVersionMigrationSpec) Reset() { *m = StorageVersionMigrationSpec{} } func (*StorageVersionMigrationSpec) ProtoMessage() {} func (*StorageVersionMigrationSpec) Descriptor() ([]byte, []int) { return fileDescriptor_0117377a57b172b9, []int{4} } func (m *StorageVersionMigrationSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *StorageVersionMigrationSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *StorageVersionMigrationSpec) XXX_Merge(src proto.Message) { xxx_messageInfo_StorageVersionMigrationSpec.Merge(m, src) } func (m *StorageVersionMigrationSpec) XXX_Size() int { return m.Size() } func (m *StorageVersionMigrationSpec) XXX_DiscardUnknown() { xxx_messageInfo_StorageVersionMigrationSpec.DiscardUnknown(m) } var xxx_messageInfo_StorageVersionMigrationSpec proto.InternalMessageInfo func (m *StorageVersionMigrationStatus) Reset() { *m = StorageVersionMigrationStatus{} } func (*StorageVersionMigrationStatus) ProtoMessage() {} func (*StorageVersionMigrationStatus) Descriptor() ([]byte, []int) { return fileDescriptor_0117377a57b172b9, []int{5} } func (m *StorageVersionMigrationStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *StorageVersionMigrationStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *StorageVersionMigrationStatus) XXX_Merge(src proto.Message) { xxx_messageInfo_StorageVersionMigrationStatus.Merge(m, src) } func (m *StorageVersionMigrationStatus) XXX_Size() int { return m.Size() } func (m *StorageVersionMigrationStatus) XXX_DiscardUnknown() { xxx_messageInfo_StorageVersionMigrationStatus.DiscardUnknown(m) } var xxx_messageInfo_StorageVersionMigrationStatus proto.InternalMessageInfo func init() { proto.RegisterType((*GroupVersionResource)(nil), "k8s.io.api.storagemigration.v1alpha1.GroupVersionResource") proto.RegisterType((*MigrationCondition)(nil), "k8s.io.api.storagemigration.v1alpha1.MigrationCondition") proto.RegisterType((*StorageVersionMigration)(nil), "k8s.io.api.storagemigration.v1alpha1.StorageVersionMigration") proto.RegisterType((*StorageVersionMigrationList)(nil), "k8s.io.api.storagemigration.v1alpha1.StorageVersionMigrationList") proto.RegisterType((*StorageVersionMigrationSpec)(nil), "k8s.io.api.storagemigration.v1alpha1.StorageVersionMigrationSpec") proto.RegisterType((*StorageVersionMigrationStatus)(nil), "k8s.io.api.storagemigration.v1alpha1.StorageVersionMigrationStatus") } func init() { proto.RegisterFile("k8s.io/api/storagemigration/v1alpha1/generated.proto", fileDescriptor_0117377a57b172b9) } var fileDescriptor_0117377a57b172b9 = []byte{ // 719 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0xcf, 0x4f, 0x13, 0x4f, 0x14, 0xef, 0x42, 0x0b, 0x7c, 0xa7, 0x5f, 0xc0, 0x4c, 0x14, 0x1a, 0x8c, 0x5b, 0x53, 0x09, 0x41, 0xa3, 0xb3, 0xd2, 0x10, 0x43, 0x30, 0x1e, 0x28, 0x07, 0xa3, 0x81, 0x98, 0x0c, 0xc8, 0xc1, 0x78, 0x70, 0xba, 0x1d, 0xb7, 0x43, 0xd9, 0x9d, 0xcd, 0xce, 0x6c, 0x13, 0x6e, 0xfe, 0x09, 0x1e, 0xfc, 0x93, 0x3c, 0x70, 0x31, 0xe1, 0xc8, 0xc5, 0x2a, 0xf5, 0xbf, 0xe0, 0x64, 0x66, 0x76, 0x76, 0xfb, 0x8b, 0x62, 0x13, 0x6e, 0x3b, 0xef, 0xbd, 0xcf, 0x67, 0xde, 0x7b, 0x9f, 0x79, 0x6f, 0xc1, 0x66, 0x6b, 0x4b, 0x20, 0xc6, 0x1d, 0x12, 0x32, 0x47, 0x48, 0x1e, 0x11, 0x8f, 0xfa, 0xcc, 0x8b, 0x88, 0x64, 0x3c, 0x70, 0xda, 0x1b, 0xe4, 0x24, 0x6c, 0x92, 0x0d, 0xc7, 0xa3, 0x01, 0x8d, 0x88, 0xa4, 0x0d, 0x14, 0x46, 0x5c, 0x72, 0xb8, 0x9a, 0xa0, 0x10, 0x09, 0x19, 0x1a, 0x46, 0xa1, 0x14, 0xb5, 0xf2, 0xcc, 0x63, 0xb2, 0x19, 0xd7, 0x91, 0xcb, 0x7d, 0xc7, 0xe3, 0x1e, 0x77, 0x34, 0xb8, 0x1e, 0x7f, 0xd6, 0x27, 0x7d, 0xd0, 0x5f, 0x09, 0xe9, 0x4a, 0xa5, 0x2f, 0x15, 0x97, 0x47, 0xd4, 0x69, 0x8f, 0x5c, 0xbc, 0xd2, 0x97, 0xae, 0x4f, 0xdc, 0x26, 0x0b, 0x68, 0x74, 0xea, 0x84, 0x2d, 0x4f, 0x19, 0x84, 0xe3, 0x53, 0x49, 0xae, 0x43, 0x39, 0xe3, 0x50, 0x51, 0x1c, 0x48, 0xe6, 0xd3, 0x11, 0xc0, 0x8b, 0x7f, 0x01, 0x84, 0xdb, 0xa4, 0x3e, 0x19, 0xc6, 0x55, 0xbe, 0x59, 0xe0, 0xee, 0xeb, 0x88, 0xc7, 0xe1, 0x11, 0x8d, 0x04, 0xe3, 0x01, 0xa6, 0x82, 0xc7, 0x91, 0x4b, 0xe1, 0x23, 0x50, 0xf0, 0x94, 0xbd, 0x64, 0x3d, 0xb4, 0xd6, 0xff, 0xab, 0xcd, 0x9f, 0x75, 0xca, 0xb9, 0x6e, 0xa7, 0x5c, 0xd0, 0xc1, 0x38, 0xf1, 0xc1, 0xc7, 0x60, 0xb6, 0x9d, 0xe0, 0x4a, 0x53, 0x3a, 0x6c, 0xd1, 0x84, 0xcd, 0xa6, 0x74, 0xa9, 0x1f, 0x3e, 0x05, 0x73, 0x91, 0xe1, 0x2e, 0x4d, 0xeb, 0xd8, 0x3b, 0x26, 0x76, 0x2e, 0xbd, 0x13, 0x67, 0x11, 0x95, 0x9f, 0x53, 0x00, 0xee, 0xa7, 0xfa, 0xec, 0xf2, 0xa0, 0xc1, 0xd4, 0x07, 0xdc, 0x06, 0x79, 0x79, 0x1a, 0x52, 0x93, 0xd3, 0x9a, 0x21, 0xc8, 0x1f, 0x9e, 0x86, 0xf4, 0xaa, 0x53, 0x5e, 0x1a, 0x45, 0x28, 0x0f, 0xd6, 0x18, 0xb8, 0x07, 0x66, 0x84, 0x24, 0x32, 0x16, 0x26, 0xd5, 0x4d, 0x83, 0x9e, 0x39, 0xd0, 0xd6, 0xab, 0x4e, 0xf9, 0x1a, 0x39, 0x51, 0xc6, 0x94, 0x44, 0x61, 0xc3, 0x01, 0x8f, 0xc1, 0xc2, 0x09, 0x11, 0xf2, 0x7d, 0xd8, 0x20, 0x92, 0x1e, 0x32, 0x3f, 0x29, 0xaa, 0x58, 0x7d, 0x82, 0x7a, 0x0f, 0x2d, 0x13, 0x02, 0x85, 0x2d, 0x4f, 0x19, 0x04, 0x52, 0x7a, 0xa3, 0xf6, 0x06, 0x52, 0x88, 0xda, 0x92, 0xc9, 0x60, 0x61, 0x6f, 0x80, 0x09, 0x0f, 0x31, 0xc3, 0x35, 0x30, 0x13, 0x51, 0x22, 0x78, 0x50, 0xca, 0xeb, 0xcc, 0x17, 0xd2, 0xcc, 0xb1, 0xb6, 0x62, 0xe3, 0x55, 0x6a, 0xf8, 0x54, 0x08, 0xe2, 0xd1, 0x52, 0x61, 0x50, 0x8d, 0xfd, 0xc4, 0x8c, 0x53, 0x7f, 0xe5, 0xc7, 0x14, 0x58, 0x3e, 0x48, 0xc6, 0xc0, 0x28, 0x95, 0xf5, 0x0e, 0x7e, 0x02, 0x73, 0x2a, 0xcd, 0x06, 0x91, 0x44, 0x37, 0xba, 0x58, 0x7d, 0x3e, 0x59, 0x51, 0xef, 0xea, 0xc7, 0xd4, 0x95, 0xfb, 0x54, 0x92, 0x1a, 0x34, 0x37, 0x83, 0x9e, 0x0d, 0x67, 0xac, 0xd0, 0x05, 0x79, 0x11, 0x52, 0x57, 0x0b, 0x51, 0xac, 0xee, 0xa0, 0x49, 0x66, 0x13, 0x8d, 0x49, 0xf7, 0x20, 0xa4, 0x6e, 0xed, 0xff, 0xf4, 0x25, 0xa8, 0x13, 0xd6, 0xe4, 0xb0, 0x95, 0xe9, 0x9d, 0x28, 0xb3, 0x7b, 0xbb, 0x6b, 0x34, 0x55, 0xaf, 0xf5, 0x83, 0xcf, 0xa1, 0xf2, 0xcb, 0x02, 0xf7, 0xc7, 0x20, 0xf7, 0x98, 0x90, 0xf0, 0xe3, 0x48, 0x4f, 0xd1, 0x64, 0x3d, 0x55, 0x68, 0xdd, 0xd1, 0x6c, 0x5a, 0x52, 0x4b, 0x5f, 0x3f, 0xeb, 0xa0, 0xc0, 0x24, 0xf5, 0xd5, 0xcb, 0x9e, 0x5e, 0x2f, 0x56, 0x5f, 0xdd, 0xaa, 0xd2, 0xde, 0xa8, 0xbf, 0x51, 0x9c, 0x38, 0xa1, 0xae, 0x7c, 0x1f, 0x5f, 0xa1, 0x6a, 0x3a, 0x6c, 0xf6, 0xcd, 0x77, 0x52, 0xe1, 0xf6, 0x64, 0x69, 0x5c, 0xb7, 0x7d, 0x6e, 0xda, 0x0d, 0xf0, 0x25, 0x98, 0x77, 0x79, 0x20, 0x59, 0x10, 0xd3, 0x43, 0xde, 0xa2, 0xe9, 0xea, 0xb9, 0x67, 0x20, 0xf3, 0xbb, 0xfd, 0x4e, 0x3c, 0x18, 0x5b, 0x39, 0xb7, 0xc0, 0x83, 0x1b, 0x25, 0x86, 0x27, 0x00, 0xb8, 0xe9, 0xd0, 0x8b, 0x92, 0xa5, 0x3b, 0xba, 0x35, 0x59, 0x29, 0xa3, 0xfb, 0xa7, 0x37, 0x08, 0x99, 0x49, 0xe0, 0x3e, 0x7e, 0xb8, 0x03, 0x16, 0xd3, 0xc2, 0x8e, 0x06, 0x36, 0xe9, 0xb2, 0x01, 0x2e, 0xe2, 0x41, 0x37, 0x1e, 0x8e, 0xaf, 0xbd, 0x3d, 0xbb, 0xb4, 0x73, 0xe7, 0x97, 0x76, 0xee, 0xe2, 0xd2, 0xce, 0x7d, 0xe9, 0xda, 0xd6, 0x59, 0xd7, 0xb6, 0xce, 0xbb, 0xb6, 0x75, 0xd1, 0xb5, 0xad, 0xdf, 0x5d, 0xdb, 0xfa, 0xfa, 0xc7, 0xce, 0x7d, 0x58, 0x9d, 0xe4, 0xb7, 0xf9, 0x37, 0x00, 0x00, 0xff, 0xff, 0x01, 0xc1, 0xb1, 0xd8, 0x5d, 0x07, 0x00, 0x00, } func (m *GroupVersionResource) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *GroupVersionResource) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *GroupVersionResource) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l i -= len(m.Resource) copy(dAtA[i:], m.Resource) i = encodeVarintGenerated(dAtA, i, uint64(len(m.Resource))) i-- dAtA[i] = 0x1a i -= len(m.Version) copy(dAtA[i:], m.Version) i = encodeVarintGenerated(dAtA, i, uint64(len(m.Version))) i-- dAtA[i] = 0x12 i -= len(m.Group) copy(dAtA[i:], m.Group) i = encodeVarintGenerated(dAtA, i, uint64(len(m.Group))) i-- dAtA[i] = 0xa return len(dAtA) - i, nil } func (m *MigrationCondition) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *MigrationCondition) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *MigrationCondition) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l i -= len(m.Message) copy(dAtA[i:], m.Message) i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message))) i-- dAtA[i] = 0x2a i -= len(m.Reason) copy(dAtA[i:], m.Reason) i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason))) i-- dAtA[i] = 0x22 { size, err := m.LastUpdateTime.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a i -= len(m.Status) copy(dAtA[i:], m.Status) i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status))) i-- dAtA[i] = 0x12 i -= len(m.Type) copy(dAtA[i:], m.Type) i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) i-- dAtA[i] = 0xa return len(dAtA) - i, nil } func (m *StorageVersionMigration) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *StorageVersionMigration) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *StorageVersionMigration) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l { size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a { size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 { size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa return len(dAtA) - i, nil } func (m *StorageVersionMigrationList) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *StorageVersionMigrationList) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *StorageVersionMigrationList) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.Items) > 0 { for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 } } { size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa return len(dAtA) - i, nil } func (m *StorageVersionMigrationSpec) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *StorageVersionMigrationSpec) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *StorageVersionMigrationSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l i -= len(m.ContinueToken) copy(dAtA[i:], m.ContinueToken) i = encodeVarintGenerated(dAtA, i, uint64(len(m.ContinueToken))) i-- dAtA[i] = 0x12 { size, err := m.Resource.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa return len(dAtA) - i, nil } func (m *StorageVersionMigrationStatus) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *StorageVersionMigrationStatus) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *StorageVersionMigrationStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l i -= len(m.ResourceVersion) copy(dAtA[i:], m.ResourceVersion) i = encodeVarintGenerated(dAtA, i, uint64(len(m.ResourceVersion))) i-- dAtA[i] = 0x12 if len(m.Conditions) > 0 { for iNdEx := len(m.Conditions) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.Conditions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa } } return len(dAtA) - i, nil } func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { offset -= sovGenerated(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return base } func (m *GroupVersionResource) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Group) n += 1 + l + sovGenerated(uint64(l)) l = len(m.Version) n += 1 + l + sovGenerated(uint64(l)) l = len(m.Resource) n += 1 + l + sovGenerated(uint64(l)) return n } func (m *MigrationCondition) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Type) n += 1 + l + sovGenerated(uint64(l)) l = len(m.Status) n += 1 + l + sovGenerated(uint64(l)) l = m.LastUpdateTime.Size() n += 1 + l + sovGenerated(uint64(l)) l = len(m.Reason) n += 1 + l + sovGenerated(uint64(l)) l = len(m.Message) n += 1 + l + sovGenerated(uint64(l)) return n } func (m *StorageVersionMigration) Size() (n int) { if m == nil { return 0 } var l int _ = l l = m.ObjectMeta.Size() n += 1 + l + sovGenerated(uint64(l)) l = m.Spec.Size() n += 1 + l + sovGenerated(uint64(l)) l = m.Status.Size() n += 1 + l + sovGenerated(uint64(l)) return n } func (m *StorageVersionMigrationList) Size() (n int) { if m == nil { return 0 } var l int _ = l l = m.ListMeta.Size() n += 1 + l + sovGenerated(uint64(l)) if len(m.Items) > 0 { for _, e := range m.Items { l = e.Size() n += 1 + l + sovGenerated(uint64(l)) } } return n } func (m *StorageVersionMigrationSpec) Size() (n int) { if m == nil { return 0 } var l int _ = l l = m.Resource.Size() n += 1 + l + sovGenerated(uint64(l)) l = len(m.ContinueToken) n += 1 + l + sovGenerated(uint64(l)) return n } func (m *StorageVersionMigrationStatus) Size() (n int) { if m == nil { return 0 } var l int _ = l if len(m.Conditions) > 0 { for _, e := range m.Conditions { l = e.Size() n += 1 + l + sovGenerated(uint64(l)) } } l = len(m.ResourceVersion) n += 1 + l + sovGenerated(uint64(l)) return n } func sovGenerated(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } func sozGenerated(x uint64) (n int) { return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (this *GroupVersionResource) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&GroupVersionResource{`, `Group:` + fmt.Sprintf("%v", this.Group) + `,`, `Version:` + fmt.Sprintf("%v", this.Version) + `,`, `Resource:` + fmt.Sprintf("%v", this.Resource) + `,`, `}`, }, "") return s } func (this *MigrationCondition) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&MigrationCondition{`, `Type:` + fmt.Sprintf("%v", this.Type) + `,`, `Status:` + fmt.Sprintf("%v", this.Status) + `,`, `LastUpdateTime:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.LastUpdateTime), "Time", "v1.Time", 1), `&`, ``, 1) + `,`, `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, `Message:` + fmt.Sprintf("%v", this.Message) + `,`, `}`, }, "") return s } func (this *StorageVersionMigration) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&StorageVersionMigration{`, `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "StorageVersionMigrationSpec", "StorageVersionMigrationSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "StorageVersionMigrationStatus", "StorageVersionMigrationStatus", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } func (this *StorageVersionMigrationList) String() string { if this == nil { return "nil" } repeatedStringForItems := "[]StorageVersionMigration{" for _, f := range this.Items { repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "StorageVersionMigration", "StorageVersionMigration", 1), `&`, ``, 1) + "," } repeatedStringForItems += "}" s := strings.Join([]string{`&StorageVersionMigrationList{`, `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, `Items:` + repeatedStringForItems + `,`, `}`, }, "") return s } func (this *StorageVersionMigrationSpec) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&StorageVersionMigrationSpec{`, `Resource:` + strings.Replace(strings.Replace(this.Resource.String(), "GroupVersionResource", "GroupVersionResource", 1), `&`, ``, 1) + `,`, `ContinueToken:` + fmt.Sprintf("%v", this.ContinueToken) + `,`, `}`, }, "") return s } func (this *StorageVersionMigrationStatus) String() string { if this == nil { return "nil" } repeatedStringForConditions := "[]MigrationCondition{" for _, f := range this.Conditions { repeatedStringForConditions += strings.Replace(strings.Replace(f.String(), "MigrationCondition", "MigrationCondition", 1), `&`, ``, 1) + "," } repeatedStringForConditions += "}" s := strings.Join([]string{`&StorageVersionMigrationStatus{`, `Conditions:` + repeatedStringForConditions + `,`, `ResourceVersion:` + fmt.Sprintf("%v", this.ResourceVersion) + `,`, `}`, }, "") return s } func valueToStringGenerated(v interface{}) string { rv := reflect.ValueOf(v) if rv.IsNil() { return "nil" } pv := reflect.Indirect(rv).Interface() return fmt.Sprintf("*%v", pv) } func (m *GroupVersionResource) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: GroupVersionResource: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: GroupVersionResource: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } m.Group = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } m.Version = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } m.Resource = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthGenerated } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *MigrationCondition) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: MigrationCondition: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: MigrationCondition: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } m.Type = MigrationConditionType(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } m.Status = k8s_io_api_core_v1.ConditionStatus(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field LastUpdateTime", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } if err := m.LastUpdateTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } m.Reason = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } m.Message = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthGenerated } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *StorageVersionMigration) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: StorageVersionMigration: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: StorageVersionMigration: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) } var msglen int
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
true
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/coordination/v1/types_swagger_doc_generated.go
vendor/k8s.io/api/coordination/v1/types_swagger_doc_generated.go
/* Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package v1 // This file contains a collection of methods that can be used from go-restful to // generate Swagger API documentation for its models. Please read this PR for more // information on the implementation: https://github.com/emicklei/go-restful/pull/215 // // TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if // they are on one line! For multiple line or blocks that you want to ignore use ---. // Any context after a --- is ignored. // // Those methods can be generated by using hack/update-codegen.sh // AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_Lease = map[string]string{ "": "Lease defines a lease concept.", "metadata": "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "spec": "spec contains the specification of the Lease. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", } func (Lease) SwaggerDoc() map[string]string { return map_Lease } var map_LeaseList = map[string]string{ "": "LeaseList is a list of Lease objects.", "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "items": "items is a list of schema objects.", } func (LeaseList) SwaggerDoc() map[string]string { return map_LeaseList } var map_LeaseSpec = map[string]string{ "": "LeaseSpec is a specification of a Lease.", "holderIdentity": "holderIdentity contains the identity of the holder of a current lease. If Coordinated Leader Election is used, the holder identity must be equal to the elected LeaseCandidate.metadata.name field.", "leaseDurationSeconds": "leaseDurationSeconds is a duration that candidates for a lease need to wait to force acquire it. This is measured against the time of last observed renewTime.", "acquireTime": "acquireTime is a time when the current lease was acquired.", "renewTime": "renewTime is a time when the current holder of a lease has last updated the lease.", "leaseTransitions": "leaseTransitions is the number of transitions of a lease between holders.", "strategy": "Strategy indicates the strategy for picking the leader for coordinated leader election. If the field is not specified, there is no active coordination for this lease. (Alpha) Using this field requires the CoordinatedLeaderElection feature gate to be enabled.", "preferredHolder": "PreferredHolder signals to a lease holder that the lease has a more optimal holder and should be given up. This field can only be set if Strategy is also set.", } func (LeaseSpec) SwaggerDoc() map[string]string { return map_LeaseSpec } // AUTO-GENERATED FUNCTIONS END HERE
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/coordination/v1/zz_generated.deepcopy.go
vendor/k8s.io/api/coordination/v1/zz_generated.deepcopy.go
//go:build !ignore_autogenerated // +build !ignore_autogenerated /* Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Code generated by deepcopy-gen. DO NOT EDIT. package v1 import ( runtime "k8s.io/apimachinery/pkg/runtime" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Lease) DeepCopyInto(out *Lease) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Lease. func (in *Lease) DeepCopy() *Lease { if in == nil { return nil } out := new(Lease) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. func (in *Lease) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *LeaseList) DeepCopyInto(out *LeaseList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]Lease, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LeaseList. func (in *LeaseList) DeepCopy() *LeaseList { if in == nil { return nil } out := new(LeaseList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. func (in *LeaseList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *LeaseSpec) DeepCopyInto(out *LeaseSpec) { *out = *in if in.HolderIdentity != nil { in, out := &in.HolderIdentity, &out.HolderIdentity *out = new(string) **out = **in } if in.LeaseDurationSeconds != nil { in, out := &in.LeaseDurationSeconds, &out.LeaseDurationSeconds *out = new(int32) **out = **in } if in.AcquireTime != nil { in, out := &in.AcquireTime, &out.AcquireTime *out = (*in).DeepCopy() } if in.RenewTime != nil { in, out := &in.RenewTime, &out.RenewTime *out = (*in).DeepCopy() } if in.LeaseTransitions != nil { in, out := &in.LeaseTransitions, &out.LeaseTransitions *out = new(int32) **out = **in } if in.Strategy != nil { in, out := &in.Strategy, &out.Strategy *out = new(CoordinatedLeaseStrategy) **out = **in } if in.PreferredHolder != nil { in, out := &in.PreferredHolder, &out.PreferredHolder *out = new(string) **out = **in } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LeaseSpec. func (in *LeaseSpec) DeepCopy() *LeaseSpec { if in == nil { return nil } out := new(LeaseSpec) in.DeepCopyInto(out) return out }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/coordination/v1/types.go
vendor/k8s.io/api/coordination/v1/types.go
/* Copyright 2018 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package v1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) type CoordinatedLeaseStrategy string // CoordinatedLeaseStrategy defines the strategy for picking the leader for coordinated leader election. const ( // OldestEmulationVersion picks the oldest LeaseCandidate, where "oldest" is defined as follows // 1) Select the candidate(s) with the lowest emulation version // 2) If multiple candidates have the same emulation version, select the candidate(s) with the lowest binary version. (Note that binary version must be greater or equal to emulation version) // 3) If multiple candidates have the same binary version, select the candidate with the oldest creationTimestamp. // If a candidate does not specify the emulationVersion and binaryVersion fields, it will not be considered a candidate for the lease. OldestEmulationVersion CoordinatedLeaseStrategy = "OldestEmulationVersion" ) // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.14 // Lease defines a lease concept. type Lease struct { metav1.TypeMeta `json:",inline"` // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // 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 Spec LeaseSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` } // LeaseSpec is a specification of a Lease. type LeaseSpec struct { // holderIdentity contains the identity of the holder of a current lease. // If Coordinated Leader Election is used, the holder identity must be // equal to the elected LeaseCandidate.metadata.name field. // +optional HolderIdentity *string `json:"holderIdentity,omitempty" protobuf:"bytes,1,opt,name=holderIdentity"` // leaseDurationSeconds is a duration that candidates for a lease need // to wait to force acquire it. This is measured against the time of last // observed renewTime. // +optional LeaseDurationSeconds *int32 `json:"leaseDurationSeconds,omitempty" protobuf:"varint,2,opt,name=leaseDurationSeconds"` // acquireTime is a time when the current lease was acquired. // +optional AcquireTime *metav1.MicroTime `json:"acquireTime,omitempty" protobuf:"bytes,3,opt,name=acquireTime"` // renewTime is a time when the current holder of a lease has last // updated the lease. // +optional RenewTime *metav1.MicroTime `json:"renewTime,omitempty" protobuf:"bytes,4,opt,name=renewTime"` // leaseTransitions is the number of transitions of a lease between // holders. // +optional LeaseTransitions *int32 `json:"leaseTransitions,omitempty" protobuf:"varint,5,opt,name=leaseTransitions"` // Strategy indicates the strategy for picking the leader for coordinated leader election. // If the field is not specified, there is no active coordination for this lease. // (Alpha) Using this field requires the CoordinatedLeaderElection feature gate to be enabled. // +featureGate=CoordinatedLeaderElection // +optional Strategy *CoordinatedLeaseStrategy `json:"strategy,omitempty" protobuf:"bytes,6,opt,name=strategy"` // PreferredHolder signals to a lease holder that the lease has a // more optimal holder and should be given up. // This field can only be set if Strategy is also set. // +featureGate=CoordinatedLeaderElection // +optional PreferredHolder *string `json:"preferredHolder,omitempty" protobuf:"bytes,7,opt,name=preferredHolder"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.19 // LeaseList is a list of Lease objects. type LeaseList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // items is a list of schema objects. Items []Lease `json:"items" protobuf:"bytes,2,rep,name=items"` }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/coordination/v1/register.go
vendor/k8s.io/api/coordination/v1/register.go
/* Copyright 2018 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package v1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" ) // GroupName is the group name use in this package const GroupName = "coordination.k8s.io" // SchemeGroupVersion is group version used to register these objects var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} // Resource takes an unqualified resource and returns a Group qualified GroupResource func Resource(resource string) schema.GroupResource { return SchemeGroupVersion.WithResource(resource).GroupResource() } var ( // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api. // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes. SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) localSchemeBuilder = &SchemeBuilder AddToScheme = localSchemeBuilder.AddToScheme ) // Adds the list of known types to api.Scheme. func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &Lease{}, &LeaseList{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/coordination/v1/zz_generated.prerelease-lifecycle.go
vendor/k8s.io/api/coordination/v1/zz_generated.prerelease-lifecycle.go
//go:build !ignore_autogenerated // +build !ignore_autogenerated /* Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Code generated by prerelease-lifecycle-gen. DO NOT EDIT. package v1 // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *Lease) APILifecycleIntroduced() (major, minor int) { return 1, 14 } // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *LeaseList) APILifecycleIntroduced() (major, minor int) { return 1, 19 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/coordination/v1/doc.go
vendor/k8s.io/api/coordination/v1/doc.go
/* Copyright 2018 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // +k8s:deepcopy-gen=package // +k8s:protobuf-gen=package // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true // +groupName=coordination.k8s.io package v1 // import "k8s.io/api/coordination/v1"
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/coordination/v1/generated.pb.go
vendor/k8s.io/api/coordination/v1/generated.pb.go
/* Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: k8s.io/api/coordination/v1/generated.proto package v1 import ( fmt "fmt" io "io" proto "github.com/gogo/protobuf/proto" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *Lease) Reset() { *m = Lease{} } func (*Lease) ProtoMessage() {} func (*Lease) Descriptor() ([]byte, []int) { return fileDescriptor_239d5a4df3139dce, []int{0} } func (m *Lease) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *Lease) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *Lease) XXX_Merge(src proto.Message) { xxx_messageInfo_Lease.Merge(m, src) } func (m *Lease) XXX_Size() int { return m.Size() } func (m *Lease) XXX_DiscardUnknown() { xxx_messageInfo_Lease.DiscardUnknown(m) } var xxx_messageInfo_Lease proto.InternalMessageInfo func (m *LeaseList) Reset() { *m = LeaseList{} } func (*LeaseList) ProtoMessage() {} func (*LeaseList) Descriptor() ([]byte, []int) { return fileDescriptor_239d5a4df3139dce, []int{1} } func (m *LeaseList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *LeaseList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *LeaseList) XXX_Merge(src proto.Message) { xxx_messageInfo_LeaseList.Merge(m, src) } func (m *LeaseList) XXX_Size() int { return m.Size() } func (m *LeaseList) XXX_DiscardUnknown() { xxx_messageInfo_LeaseList.DiscardUnknown(m) } var xxx_messageInfo_LeaseList proto.InternalMessageInfo func (m *LeaseSpec) Reset() { *m = LeaseSpec{} } func (*LeaseSpec) ProtoMessage() {} func (*LeaseSpec) Descriptor() ([]byte, []int) { return fileDescriptor_239d5a4df3139dce, []int{2} } func (m *LeaseSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *LeaseSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *LeaseSpec) XXX_Merge(src proto.Message) { xxx_messageInfo_LeaseSpec.Merge(m, src) } func (m *LeaseSpec) XXX_Size() int { return m.Size() } func (m *LeaseSpec) XXX_DiscardUnknown() { xxx_messageInfo_LeaseSpec.DiscardUnknown(m) } var xxx_messageInfo_LeaseSpec proto.InternalMessageInfo func init() { proto.RegisterType((*Lease)(nil), "k8s.io.api.coordination.v1.Lease") proto.RegisterType((*LeaseList)(nil), "k8s.io.api.coordination.v1.LeaseList") proto.RegisterType((*LeaseSpec)(nil), "k8s.io.api.coordination.v1.LeaseSpec") } func init() { proto.RegisterFile("k8s.io/api/coordination/v1/generated.proto", fileDescriptor_239d5a4df3139dce) } var fileDescriptor_239d5a4df3139dce = []byte{ // 588 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0xdf, 0x4e, 0xd4, 0x40, 0x14, 0xc6, 0xb7, 0xb0, 0xab, 0xec, 0xac, 0xfc, 0xc9, 0xc8, 0x45, 0xb3, 0x17, 0x2d, 0x92, 0x98, 0x10, 0x13, 0xa7, 0x42, 0x8c, 0x31, 0x26, 0x26, 0x58, 0x89, 0x4a, 0xb2, 0x44, 0x53, 0xb8, 0x32, 0x5c, 0x38, 0xdb, 0x1e, 0xba, 0x23, 0xb4, 0x53, 0x67, 0x66, 0x31, 0xdc, 0xf9, 0x08, 0x3e, 0x81, 0xef, 0xa0, 0x4f, 0xc1, 0x25, 0x97, 0x5c, 0x35, 0x32, 0xbe, 0x85, 0x57, 0x66, 0x66, 0x0b, 0x0b, 0xcb, 0x6e, 0x20, 0xde, 0x75, 0xce, 0x39, 0xdf, 0xef, 0x7c, 0x73, 0x4e, 0x5b, 0xf4, 0x68, 0xff, 0xb9, 0x24, 0x8c, 0x07, 0xb4, 0x60, 0x41, 0xcc, 0xb9, 0x48, 0x58, 0x4e, 0x15, 0xe3, 0x79, 0x70, 0xb8, 0x1a, 0xa4, 0x90, 0x83, 0xa0, 0x0a, 0x12, 0x52, 0x08, 0xae, 0x38, 0x6e, 0x0f, 0x6a, 0x09, 0x2d, 0x18, 0xb9, 0x5c, 0x4b, 0x0e, 0x57, 0xdb, 0x8f, 0x53, 0xa6, 0x7a, 0xfd, 0x2e, 0x89, 0x79, 0x16, 0xa4, 0x3c, 0xe5, 0x81, 0x95, 0x74, 0xfb, 0x7b, 0xf6, 0x64, 0x0f, 0xf6, 0x69, 0x80, 0x6a, 0x3f, 0x1d, 0xb6, 0xcd, 0x68, 0xdc, 0x63, 0x39, 0x88, 0xa3, 0xa0, 0xd8, 0x4f, 0x4d, 0x40, 0x06, 0x19, 0x28, 0x3a, 0xc6, 0x40, 0x3b, 0x98, 0xa4, 0x12, 0xfd, 0x5c, 0xb1, 0x0c, 0xae, 0x09, 0x9e, 0xdd, 0x24, 0x90, 0x71, 0x0f, 0x32, 0x3a, 0xaa, 0x5b, 0xfe, 0xe5, 0xa0, 0x46, 0x07, 0xa8, 0x04, 0xfc, 0x09, 0xcd, 0x18, 0x37, 0x09, 0x55, 0xd4, 0x75, 0x96, 0x9c, 0x95, 0xd6, 0xda, 0x13, 0x32, 0x1c, 0xc3, 0x05, 0x94, 0x14, 0xfb, 0xa9, 0x09, 0x48, 0x62, 0xaa, 0xc9, 0xe1, 0x2a, 0x79, 0xdf, 0xfd, 0x0c, 0xb1, 0xda, 0x02, 0x45, 0x43, 0x7c, 0x5c, 0xfa, 0x35, 0x5d, 0xfa, 0x68, 0x18, 0x8b, 0x2e, 0xa8, 0xf8, 0x2d, 0xaa, 0xcb, 0x02, 0x62, 0x77, 0xca, 0xd2, 0x1f, 0x92, 0xc9, 0x43, 0x26, 0xd6, 0xd2, 0x76, 0x01, 0x71, 0x78, 0xaf, 0x42, 0xd6, 0xcd, 0x29, 0xb2, 0x80, 0xe5, 0x9f, 0x0e, 0x6a, 0xda, 0x8a, 0x0e, 0x93, 0x0a, 0xef, 0x5e, 0x33, 0x4e, 0x6e, 0x67, 0xdc, 0xa8, 0xad, 0xed, 0x85, 0xaa, 0xc7, 0xcc, 0x79, 0xe4, 0x92, 0xe9, 0x37, 0xa8, 0xc1, 0x14, 0x64, 0xd2, 0x9d, 0x5a, 0x9a, 0x5e, 0x69, 0xad, 0x3d, 0xb8, 0xd1, 0x75, 0x38, 0x5b, 0xd1, 0x1a, 0x9b, 0x46, 0x17, 0x0d, 0xe4, 0xcb, 0x3f, 0xea, 0x95, 0x67, 0x73, 0x0f, 0xfc, 0x02, 0xcd, 0xf5, 0xf8, 0x41, 0x02, 0x62, 0x33, 0x81, 0x5c, 0x31, 0x75, 0x64, 0x9d, 0x37, 0x43, 0xac, 0x4b, 0x7f, 0xee, 0xdd, 0x95, 0x4c, 0x34, 0x52, 0x89, 0x3b, 0x68, 0xf1, 0xc0, 0x80, 0x36, 0xfa, 0xc2, 0x76, 0xde, 0x86, 0x98, 0xe7, 0x89, 0xb4, 0x63, 0x6d, 0x84, 0xae, 0x2e, 0xfd, 0xc5, 0xce, 0x98, 0x7c, 0x34, 0x56, 0x85, 0xbb, 0xa8, 0x45, 0xe3, 0x2f, 0x7d, 0x26, 0x60, 0x87, 0x65, 0xe0, 0x4e, 0xdb, 0x01, 0x06, 0xb7, 0x1b, 0xe0, 0x16, 0x8b, 0x05, 0x37, 0xb2, 0x70, 0x5e, 0x97, 0x7e, 0xeb, 0xd5, 0x90, 0x13, 0x5d, 0x86, 0xe2, 0x5d, 0xd4, 0x14, 0x90, 0xc3, 0x57, 0xdb, 0xa1, 0xfe, 0x7f, 0x1d, 0x66, 0x75, 0xe9, 0x37, 0xa3, 0x73, 0x4a, 0x34, 0x04, 0xe2, 0x75, 0xb4, 0x60, 0x6f, 0xb6, 0x23, 0x68, 0x2e, 0x99, 0xb9, 0x9b, 0x74, 0x1b, 0x76, 0x16, 0x8b, 0xba, 0xf4, 0x17, 0x3a, 0x23, 0xb9, 0xe8, 0x5a, 0x35, 0xde, 0x40, 0x33, 0x52, 0x99, 0xaf, 0x22, 0x3d, 0x72, 0xef, 0xd8, 0x3d, 0xac, 0x98, 0xb7, 0x61, 0xbb, 0x8a, 0xfd, 0x2d, 0x7d, 0xf7, 0xf5, 0xf9, 0xaa, 0x21, 0x19, 0x6c, 0xb1, 0xca, 0x45, 0x17, 0x4a, 0xfc, 0x12, 0xcd, 0x17, 0x02, 0xf6, 0x40, 0x08, 0x48, 0x06, 0x2b, 0x74, 0xef, 0x5a, 0xd8, 0x7d, 0x5d, 0xfa, 0xf3, 0x1f, 0xae, 0xa6, 0xa2, 0xd1, 0xda, 0x70, 0xfd, 0xf8, 0xcc, 0xab, 0x9d, 0x9c, 0x79, 0xb5, 0xd3, 0x33, 0xaf, 0xf6, 0x4d, 0x7b, 0xce, 0xb1, 0xf6, 0x9c, 0x13, 0xed, 0x39, 0xa7, 0xda, 0x73, 0x7e, 0x6b, 0xcf, 0xf9, 0xfe, 0xc7, 0xab, 0x7d, 0x6c, 0x4f, 0xfe, 0x8b, 0xfd, 0x0b, 0x00, 0x00, 0xff, 0xff, 0xf8, 0xf4, 0xd4, 0x78, 0xe2, 0x04, 0x00, 0x00, } func (m *Lease) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Lease) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *Lease) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l { size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 { size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa return len(dAtA) - i, nil } func (m *LeaseList) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *LeaseList) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *LeaseList) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.Items) > 0 { for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 } } { size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa return len(dAtA) - i, nil } func (m *LeaseSpec) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *LeaseSpec) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *LeaseSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.PreferredHolder != nil { i -= len(*m.PreferredHolder) copy(dAtA[i:], *m.PreferredHolder) i = encodeVarintGenerated(dAtA, i, uint64(len(*m.PreferredHolder))) i-- dAtA[i] = 0x3a } if m.Strategy != nil { i -= len(*m.Strategy) copy(dAtA[i:], *m.Strategy) i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Strategy))) i-- dAtA[i] = 0x32 } if m.LeaseTransitions != nil { i = encodeVarintGenerated(dAtA, i, uint64(*m.LeaseTransitions)) i-- dAtA[i] = 0x28 } if m.RenewTime != nil { { size, err := m.RenewTime.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x22 } if m.AcquireTime != nil { { size, err := m.AcquireTime.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a } if m.LeaseDurationSeconds != nil { i = encodeVarintGenerated(dAtA, i, uint64(*m.LeaseDurationSeconds)) i-- dAtA[i] = 0x10 } if m.HolderIdentity != nil { i -= len(*m.HolderIdentity) copy(dAtA[i:], *m.HolderIdentity) i = encodeVarintGenerated(dAtA, i, uint64(len(*m.HolderIdentity))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { offset -= sovGenerated(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return base } func (m *Lease) Size() (n int) { if m == nil { return 0 } var l int _ = l l = m.ObjectMeta.Size() n += 1 + l + sovGenerated(uint64(l)) l = m.Spec.Size() n += 1 + l + sovGenerated(uint64(l)) return n } func (m *LeaseList) Size() (n int) { if m == nil { return 0 } var l int _ = l l = m.ListMeta.Size() n += 1 + l + sovGenerated(uint64(l)) if len(m.Items) > 0 { for _, e := range m.Items { l = e.Size() n += 1 + l + sovGenerated(uint64(l)) } } return n } func (m *LeaseSpec) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.HolderIdentity != nil { l = len(*m.HolderIdentity) n += 1 + l + sovGenerated(uint64(l)) } if m.LeaseDurationSeconds != nil { n += 1 + sovGenerated(uint64(*m.LeaseDurationSeconds)) } if m.AcquireTime != nil { l = m.AcquireTime.Size() n += 1 + l + sovGenerated(uint64(l)) } if m.RenewTime != nil { l = m.RenewTime.Size() n += 1 + l + sovGenerated(uint64(l)) } if m.LeaseTransitions != nil { n += 1 + sovGenerated(uint64(*m.LeaseTransitions)) } if m.Strategy != nil { l = len(*m.Strategy) n += 1 + l + sovGenerated(uint64(l)) } if m.PreferredHolder != nil { l = len(*m.PreferredHolder) n += 1 + l + sovGenerated(uint64(l)) } return n } func sovGenerated(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } func sozGenerated(x uint64) (n int) { return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (this *Lease) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&Lease{`, `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "LeaseSpec", "LeaseSpec", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } func (this *LeaseList) String() string { if this == nil { return "nil" } repeatedStringForItems := "[]Lease{" for _, f := range this.Items { repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "Lease", "Lease", 1), `&`, ``, 1) + "," } repeatedStringForItems += "}" s := strings.Join([]string{`&LeaseList{`, `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, `Items:` + repeatedStringForItems + `,`, `}`, }, "") return s } func (this *LeaseSpec) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&LeaseSpec{`, `HolderIdentity:` + valueToStringGenerated(this.HolderIdentity) + `,`, `LeaseDurationSeconds:` + valueToStringGenerated(this.LeaseDurationSeconds) + `,`, `AcquireTime:` + strings.Replace(fmt.Sprintf("%v", this.AcquireTime), "MicroTime", "v1.MicroTime", 1) + `,`, `RenewTime:` + strings.Replace(fmt.Sprintf("%v", this.RenewTime), "MicroTime", "v1.MicroTime", 1) + `,`, `LeaseTransitions:` + valueToStringGenerated(this.LeaseTransitions) + `,`, `Strategy:` + valueToStringGenerated(this.Strategy) + `,`, `PreferredHolder:` + valueToStringGenerated(this.PreferredHolder) + `,`, `}`, }, "") return s } func valueToStringGenerated(v interface{}) string { rv := reflect.ValueOf(v) if rv.IsNil() { return "nil" } pv := reflect.Indirect(rv).Interface() return fmt.Sprintf("*%v", pv) } func (m *Lease) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Lease: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Lease: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthGenerated } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *LeaseList) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: LeaseList: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: LeaseList: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } m.Items = append(m.Items, Lease{}) if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthGenerated } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *LeaseSpec) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: LeaseSpec: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: LeaseSpec: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field HolderIdentity", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } s := string(dAtA[iNdEx:postIndex]) m.HolderIdentity = &s iNdEx = postIndex case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field LeaseDurationSeconds", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.LeaseDurationSeconds = &v case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field AcquireTime", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } if m.AcquireTime == nil { m.AcquireTime = &v1.MicroTime{} } if err := m.AcquireTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RenewTime", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } if m.RenewTime == nil { m.RenewTime = &v1.MicroTime{} } if err := m.RenewTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 5: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field LeaseTransitions", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.LeaseTransitions = &v case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Strategy", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } s := CoordinatedLeaseStrategy(dAtA[iNdEx:postIndex]) m.Strategy = &s iNdEx = postIndex case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PreferredHolder", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } s := string(dAtA[iNdEx:postIndex]) m.PreferredHolder = &s iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthGenerated } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipGenerated(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowGenerated } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } wireType := int(wire & 0x7) switch wireType { case 0: for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowGenerated } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } iNdEx++ if dAtA[iNdEx-1] < 0x80 { break } } case 1: iNdEx += 8 case 2: var length int for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowGenerated } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ length |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if length < 0 { return 0, ErrInvalidLengthGenerated } iNdEx += length case 3: depth++ case 4: if depth == 0 { return 0, ErrUnexpectedEndOfGroupGenerated } depth-- case 5: iNdEx += 4 default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } if iNdEx < 0 { return 0, ErrInvalidLengthGenerated } if depth == 0 { return iNdEx, nil } } return 0, io.ErrUnexpectedEOF } var ( ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") )
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/coordination/v1beta1/types_swagger_doc_generated.go
vendor/k8s.io/api/coordination/v1beta1/types_swagger_doc_generated.go
/* Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package v1beta1 // This file contains a collection of methods that can be used from go-restful to // generate Swagger API documentation for its models. Please read this PR for more // information on the implementation: https://github.com/emicklei/go-restful/pull/215 // // TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if // they are on one line! For multiple line or blocks that you want to ignore use ---. // Any context after a --- is ignored. // // Those methods can be generated by using hack/update-codegen.sh // AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_Lease = map[string]string{ "": "Lease defines a lease concept.", "metadata": "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "spec": "spec contains the specification of the Lease. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", } func (Lease) SwaggerDoc() map[string]string { return map_Lease } var map_LeaseList = map[string]string{ "": "LeaseList is a list of Lease objects.", "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "items": "items is a list of schema objects.", } func (LeaseList) SwaggerDoc() map[string]string { return map_LeaseList } var map_LeaseSpec = map[string]string{ "": "LeaseSpec is a specification of a Lease.", "holderIdentity": "holderIdentity contains the identity of the holder of a current lease. If Coordinated Leader Election is used, the holder identity must be equal to the elected LeaseCandidate.metadata.name field.", "leaseDurationSeconds": "leaseDurationSeconds is a duration that candidates for a lease need to wait to force acquire it. This is measure against time of last observed renewTime.", "acquireTime": "acquireTime is a time when the current lease was acquired.", "renewTime": "renewTime is a time when the current holder of a lease has last updated the lease.", "leaseTransitions": "leaseTransitions is the number of transitions of a lease between holders.", "strategy": "Strategy indicates the strategy for picking the leader for coordinated leader election (Alpha) Using this field requires the CoordinatedLeaderElection feature gate to be enabled.", "preferredHolder": "PreferredHolder signals to a lease holder that the lease has a more optimal holder and should be given up.", } func (LeaseSpec) SwaggerDoc() map[string]string { return map_LeaseSpec } // AUTO-GENERATED FUNCTIONS END HERE
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/coordination/v1beta1/zz_generated.deepcopy.go
vendor/k8s.io/api/coordination/v1beta1/zz_generated.deepcopy.go
//go:build !ignore_autogenerated // +build !ignore_autogenerated /* Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Code generated by deepcopy-gen. DO NOT EDIT. package v1beta1 import ( v1 "k8s.io/api/coordination/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Lease) DeepCopyInto(out *Lease) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Lease. func (in *Lease) DeepCopy() *Lease { if in == nil { return nil } out := new(Lease) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. func (in *Lease) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *LeaseList) DeepCopyInto(out *LeaseList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]Lease, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LeaseList. func (in *LeaseList) DeepCopy() *LeaseList { if in == nil { return nil } out := new(LeaseList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. func (in *LeaseList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *LeaseSpec) DeepCopyInto(out *LeaseSpec) { *out = *in if in.HolderIdentity != nil { in, out := &in.HolderIdentity, &out.HolderIdentity *out = new(string) **out = **in } if in.LeaseDurationSeconds != nil { in, out := &in.LeaseDurationSeconds, &out.LeaseDurationSeconds *out = new(int32) **out = **in } if in.AcquireTime != nil { in, out := &in.AcquireTime, &out.AcquireTime *out = (*in).DeepCopy() } if in.RenewTime != nil { in, out := &in.RenewTime, &out.RenewTime *out = (*in).DeepCopy() } if in.LeaseTransitions != nil { in, out := &in.LeaseTransitions, &out.LeaseTransitions *out = new(int32) **out = **in } if in.Strategy != nil { in, out := &in.Strategy, &out.Strategy *out = new(v1.CoordinatedLeaseStrategy) **out = **in } if in.PreferredHolder != nil { in, out := &in.PreferredHolder, &out.PreferredHolder *out = new(string) **out = **in } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LeaseSpec. func (in *LeaseSpec) DeepCopy() *LeaseSpec { if in == nil { return nil } out := new(LeaseSpec) in.DeepCopyInto(out) return out }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/coordination/v1beta1/types.go
vendor/k8s.io/api/coordination/v1beta1/types.go
/* Copyright 2018 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package v1beta1 import ( v1 "k8s.io/api/coordination/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.12 // +k8s:prerelease-lifecycle-gen:deprecated=1.19 // +k8s:prerelease-lifecycle-gen:replacement=coordination.k8s.io,v1,Lease // Lease defines a lease concept. type Lease struct { metav1.TypeMeta `json:",inline"` // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // 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 Spec LeaseSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` } // LeaseSpec is a specification of a Lease. type LeaseSpec struct { // holderIdentity contains the identity of the holder of a current lease. // If Coordinated Leader Election is used, the holder identity must be // equal to the elected LeaseCandidate.metadata.name field. // +optional HolderIdentity *string `json:"holderIdentity,omitempty" protobuf:"bytes,1,opt,name=holderIdentity"` // leaseDurationSeconds is a duration that candidates for a lease need // to wait to force acquire it. This is measure against time of last // observed renewTime. // +optional LeaseDurationSeconds *int32 `json:"leaseDurationSeconds,omitempty" protobuf:"varint,2,opt,name=leaseDurationSeconds"` // acquireTime is a time when the current lease was acquired. // +optional AcquireTime *metav1.MicroTime `json:"acquireTime,omitempty" protobuf:"bytes,3,opt,name=acquireTime"` // renewTime is a time when the current holder of a lease has last // updated the lease. // +optional RenewTime *metav1.MicroTime `json:"renewTime,omitempty" protobuf:"bytes,4,opt,name=renewTime"` // leaseTransitions is the number of transitions of a lease between // holders. // +optional LeaseTransitions *int32 `json:"leaseTransitions,omitempty" protobuf:"varint,5,opt,name=leaseTransitions"` // Strategy indicates the strategy for picking the leader for coordinated leader election // (Alpha) Using this field requires the CoordinatedLeaderElection feature gate to be enabled. // +featureGate=CoordinatedLeaderElection // +optional Strategy *v1.CoordinatedLeaseStrategy `json:"strategy,omitempty" protobuf:"bytes,6,opt,name=strategy"` // PreferredHolder signals to a lease holder that the lease has a // more optimal holder and should be given up. // +featureGate=CoordinatedLeaderElection // +optional PreferredHolder *string `json:"preferredHolder,omitempty" protobuf:"bytes,7,opt,name=preferredHolder"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.12 // +k8s:prerelease-lifecycle-gen:deprecated=1.19 // +k8s:prerelease-lifecycle-gen:replacement=coordination.k8s.io,v1,LeaseList // LeaseList is a list of Lease objects. type LeaseList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // items is a list of schema objects. Items []Lease `json:"items" protobuf:"bytes,2,rep,name=items"` }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/coordination/v1beta1/register.go
vendor/k8s.io/api/coordination/v1beta1/register.go
/* Copyright 2018 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package v1beta1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" ) // GroupName is the group name use in this package const GroupName = "coordination.k8s.io" // SchemeGroupVersion is group version used to register these objects var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"} // Resource takes an unqualified resource and returns a Group qualified GroupResource func Resource(resource string) schema.GroupResource { return SchemeGroupVersion.WithResource(resource).GroupResource() } var ( // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api. // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes. SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) localSchemeBuilder = &SchemeBuilder AddToScheme = localSchemeBuilder.AddToScheme ) // Adds the list of known types to api.Scheme. func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &Lease{}, &LeaseList{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/coordination/v1beta1/zz_generated.prerelease-lifecycle.go
vendor/k8s.io/api/coordination/v1beta1/zz_generated.prerelease-lifecycle.go
//go:build !ignore_autogenerated // +build !ignore_autogenerated /* Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Code generated by prerelease-lifecycle-gen. DO NOT EDIT. package v1beta1 import ( schema "k8s.io/apimachinery/pkg/runtime/schema" ) // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *Lease) APILifecycleIntroduced() (major, minor int) { return 1, 12 } // APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. func (in *Lease) APILifecycleDeprecated() (major, minor int) { return 1, 19 } // APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. // It is controlled by "k8s:prerelease-lifecycle-gen:replacement=<group>,<version>,<kind>" tags in types.go. func (in *Lease) APILifecycleReplacement() schema.GroupVersionKind { return schema.GroupVersionKind{Group: "coordination.k8s.io", Version: "v1", Kind: "Lease"} } // APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. func (in *Lease) APILifecycleRemoved() (major, minor int) { return 1, 22 } // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *LeaseList) APILifecycleIntroduced() (major, minor int) { return 1, 12 } // APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. func (in *LeaseList) APILifecycleDeprecated() (major, minor int) { return 1, 19 } // APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. // It is controlled by "k8s:prerelease-lifecycle-gen:replacement=<group>,<version>,<kind>" tags in types.go. func (in *LeaseList) APILifecycleReplacement() schema.GroupVersionKind { return schema.GroupVersionKind{Group: "coordination.k8s.io", Version: "v1", Kind: "LeaseList"} } // APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. func (in *LeaseList) APILifecycleRemoved() (major, minor int) { return 1, 22 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/coordination/v1beta1/doc.go
vendor/k8s.io/api/coordination/v1beta1/doc.go
/* Copyright 2018 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // +k8s:deepcopy-gen=package // +k8s:protobuf-gen=package // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true // +groupName=coordination.k8s.io package v1beta1 // import "k8s.io/api/coordination/v1beta1"
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/coordination/v1beta1/generated.pb.go
vendor/k8s.io/api/coordination/v1beta1/generated.pb.go
/* Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: k8s.io/api/coordination/v1beta1/generated.proto package v1beta1 import ( fmt "fmt" io "io" proto "github.com/gogo/protobuf/proto" k8s_io_api_coordination_v1 "k8s.io/api/coordination/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *Lease) Reset() { *m = Lease{} } func (*Lease) ProtoMessage() {} func (*Lease) Descriptor() ([]byte, []int) { return fileDescriptor_8d4e223b8bb23da3, []int{0} } func (m *Lease) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *Lease) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *Lease) XXX_Merge(src proto.Message) { xxx_messageInfo_Lease.Merge(m, src) } func (m *Lease) XXX_Size() int { return m.Size() } func (m *Lease) XXX_DiscardUnknown() { xxx_messageInfo_Lease.DiscardUnknown(m) } var xxx_messageInfo_Lease proto.InternalMessageInfo func (m *LeaseList) Reset() { *m = LeaseList{} } func (*LeaseList) ProtoMessage() {} func (*LeaseList) Descriptor() ([]byte, []int) { return fileDescriptor_8d4e223b8bb23da3, []int{1} } func (m *LeaseList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *LeaseList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *LeaseList) XXX_Merge(src proto.Message) { xxx_messageInfo_LeaseList.Merge(m, src) } func (m *LeaseList) XXX_Size() int { return m.Size() } func (m *LeaseList) XXX_DiscardUnknown() { xxx_messageInfo_LeaseList.DiscardUnknown(m) } var xxx_messageInfo_LeaseList proto.InternalMessageInfo func (m *LeaseSpec) Reset() { *m = LeaseSpec{} } func (*LeaseSpec) ProtoMessage() {} func (*LeaseSpec) Descriptor() ([]byte, []int) { return fileDescriptor_8d4e223b8bb23da3, []int{2} } func (m *LeaseSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *LeaseSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *LeaseSpec) XXX_Merge(src proto.Message) { xxx_messageInfo_LeaseSpec.Merge(m, src) } func (m *LeaseSpec) XXX_Size() int { return m.Size() } func (m *LeaseSpec) XXX_DiscardUnknown() { xxx_messageInfo_LeaseSpec.DiscardUnknown(m) } var xxx_messageInfo_LeaseSpec proto.InternalMessageInfo func init() { proto.RegisterType((*Lease)(nil), "k8s.io.api.coordination.v1beta1.Lease") proto.RegisterType((*LeaseList)(nil), "k8s.io.api.coordination.v1beta1.LeaseList") proto.RegisterType((*LeaseSpec)(nil), "k8s.io.api.coordination.v1beta1.LeaseSpec") } func init() { proto.RegisterFile("k8s.io/api/coordination/v1beta1/generated.proto", fileDescriptor_8d4e223b8bb23da3) } var fileDescriptor_8d4e223b8bb23da3 = []byte{ // 600 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0xdf, 0x4e, 0xd4, 0x4e, 0x14, 0xc7, 0xb7, 0xb0, 0xfb, 0xfb, 0xb1, 0xb3, 0xf2, 0x27, 0x23, 0x17, 0x0d, 0x17, 0x2d, 0xe1, 0xc2, 0x10, 0x12, 0xa7, 0x82, 0xc6, 0x18, 0x13, 0x13, 0x2d, 0x9a, 0x48, 0x2c, 0xd1, 0x14, 0xae, 0x0c, 0x89, 0xce, 0xb6, 0x87, 0xee, 0x08, 0xed, 0xd4, 0x99, 0x59, 0x0c, 0x77, 0x3e, 0x82, 0x4f, 0xa3, 0xf1, 0x0d, 0xb8, 0xe4, 0x92, 0xab, 0x46, 0xc6, 0xb7, 0xf0, 0xca, 0xcc, 0x6c, 0x61, 0x61, 0x81, 0xb0, 0xf1, 0x6e, 0xe7, 0x9c, 0xf3, 0xfd, 0x9c, 0xef, 0x9c, 0xb3, 0x53, 0x14, 0xec, 0x3d, 0x91, 0x84, 0xf1, 0x80, 0x96, 0x2c, 0x48, 0x38, 0x17, 0x29, 0x2b, 0xa8, 0x62, 0xbc, 0x08, 0x0e, 0x56, 0xbb, 0xa0, 0xe8, 0x6a, 0x90, 0x41, 0x01, 0x82, 0x2a, 0x48, 0x49, 0x29, 0xb8, 0xe2, 0xd8, 0x1f, 0x08, 0x08, 0x2d, 0x19, 0xb9, 0x28, 0x20, 0xb5, 0x60, 0xe1, 0x7e, 0xc6, 0x54, 0xaf, 0xdf, 0x25, 0x09, 0xcf, 0x83, 0x8c, 0x67, 0x3c, 0xb0, 0xba, 0x6e, 0x7f, 0xd7, 0x9e, 0xec, 0xc1, 0xfe, 0x1a, 0xf0, 0x16, 0x56, 0x6e, 0x36, 0x30, 0xda, 0x7b, 0xe1, 0xd1, 0xb0, 0x36, 0xa7, 0x49, 0x8f, 0x15, 0x20, 0x0e, 0x83, 0x72, 0x2f, 0x33, 0x01, 0x19, 0xe4, 0xa0, 0xe8, 0x75, 0xaa, 0xe0, 0x26, 0x95, 0xe8, 0x17, 0x8a, 0xe5, 0x70, 0x45, 0xf0, 0xf8, 0x36, 0x81, 0x4c, 0x7a, 0x90, 0xd3, 0x51, 0xdd, 0xd2, 0x0f, 0x07, 0xb5, 0x22, 0xa0, 0x12, 0xf0, 0x47, 0x34, 0x65, 0xdc, 0xa4, 0x54, 0x51, 0xd7, 0x59, 0x74, 0x96, 0x3b, 0x6b, 0x0f, 0xc8, 0x70, 0x6e, 0xe7, 0x50, 0x52, 0xee, 0x65, 0x26, 0x20, 0x89, 0xa9, 0x26, 0x07, 0xab, 0xe4, 0x6d, 0xf7, 0x13, 0x24, 0x6a, 0x13, 0x14, 0x0d, 0xf1, 0x51, 0xe5, 0x37, 0x74, 0xe5, 0xa3, 0x61, 0x2c, 0x3e, 0xa7, 0xe2, 0x08, 0x35, 0x65, 0x09, 0x89, 0x3b, 0x61, 0xe9, 0x2b, 0xe4, 0x96, 0xad, 0x10, 0xeb, 0x6b, 0xab, 0x84, 0x24, 0xbc, 0x53, 0x73, 0x9b, 0xe6, 0x14, 0x5b, 0xca, 0xd2, 0x77, 0x07, 0xb5, 0x6d, 0x45, 0xc4, 0xa4, 0xc2, 0x3b, 0x57, 0xdc, 0x93, 0xf1, 0xdc, 0x1b, 0xb5, 0xf5, 0x3e, 0x57, 0xf7, 0x98, 0x3a, 0x8b, 0x5c, 0x70, 0xfe, 0x06, 0xb5, 0x98, 0x82, 0x5c, 0xba, 0x13, 0x8b, 0x93, 0xcb, 0x9d, 0xb5, 0x7b, 0xe3, 0x59, 0x0f, 0xa7, 0x6b, 0x64, 0x6b, 0xc3, 0x88, 0xe3, 0x01, 0x63, 0xe9, 0x67, 0xb3, 0x36, 0x6e, 0x2e, 0x83, 0x9f, 0xa2, 0x99, 0x1e, 0xdf, 0x4f, 0x41, 0x6c, 0xa4, 0x50, 0x28, 0xa6, 0x0e, 0xad, 0xfd, 0x76, 0x88, 0x75, 0xe5, 0xcf, 0xbc, 0xbe, 0x94, 0x89, 0x47, 0x2a, 0x71, 0x84, 0xe6, 0xf7, 0x0d, 0xe8, 0x65, 0x5f, 0xd8, 0xf6, 0x5b, 0x90, 0xf0, 0x22, 0x95, 0x76, 0xc0, 0xad, 0xd0, 0xd5, 0x95, 0x3f, 0x1f, 0x5d, 0x93, 0x8f, 0xaf, 0x55, 0xe1, 0x2e, 0xea, 0xd0, 0xe4, 0x73, 0x9f, 0x09, 0xd8, 0x66, 0x39, 0xb8, 0x93, 0x76, 0x8a, 0xc1, 0x78, 0x53, 0xdc, 0x64, 0x89, 0xe0, 0x46, 0x16, 0xce, 0xea, 0xca, 0xef, 0xbc, 0x18, 0x72, 0xe2, 0x8b, 0x50, 0xbc, 0x83, 0xda, 0x02, 0x0a, 0xf8, 0x62, 0x3b, 0x34, 0xff, 0xad, 0xc3, 0xb4, 0xae, 0xfc, 0x76, 0x7c, 0x46, 0x89, 0x87, 0x40, 0xfc, 0x1c, 0xcd, 0xd9, 0x9b, 0x6d, 0x0b, 0x5a, 0x48, 0x66, 0xee, 0x26, 0xdd, 0x96, 0x9d, 0xc5, 0xbc, 0xae, 0xfc, 0xb9, 0x68, 0x24, 0x17, 0x5f, 0xa9, 0xc6, 0x1f, 0xd0, 0x94, 0x54, 0xe6, 0x7d, 0x64, 0x87, 0xee, 0x7f, 0x76, 0x0f, 0xeb, 0xe6, 0x2f, 0xb1, 0x55, 0xc7, 0xfe, 0x54, 0xfe, 0xc3, 0x9b, 0xdf, 0x3e, 0x59, 0x3f, 0x3b, 0x43, 0x3a, 0x58, 0x70, 0x2d, 0x8b, 0xcf, 0xa1, 0xf8, 0x19, 0x9a, 0x2d, 0x05, 0xec, 0x82, 0x10, 0x90, 0x0e, 0xb6, 0xeb, 0xfe, 0x6f, 0xfb, 0xdc, 0xd5, 0x95, 0x3f, 0xfb, 0xee, 0x72, 0x2a, 0x1e, 0xad, 0x0d, 0x5f, 0x1d, 0x9d, 0x7a, 0x8d, 0xe3, 0x53, 0xaf, 0x71, 0x72, 0xea, 0x35, 0xbe, 0x6a, 0xcf, 0x39, 0xd2, 0x9e, 0x73, 0xac, 0x3d, 0xe7, 0x44, 0x7b, 0xce, 0x2f, 0xed, 0x39, 0xdf, 0x7e, 0x7b, 0x8d, 0xf7, 0xfe, 0x2d, 0x1f, 0xc8, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x57, 0x93, 0xf3, 0xef, 0x42, 0x05, 0x00, 0x00, } func (m *Lease) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Lease) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *Lease) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l { size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 { size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa return len(dAtA) - i, nil } func (m *LeaseList) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *LeaseList) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *LeaseList) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.Items) > 0 { for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 } } { size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa return len(dAtA) - i, nil } func (m *LeaseSpec) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *LeaseSpec) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *LeaseSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.PreferredHolder != nil { i -= len(*m.PreferredHolder) copy(dAtA[i:], *m.PreferredHolder) i = encodeVarintGenerated(dAtA, i, uint64(len(*m.PreferredHolder))) i-- dAtA[i] = 0x3a } if m.Strategy != nil { i -= len(*m.Strategy) copy(dAtA[i:], *m.Strategy) i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Strategy))) i-- dAtA[i] = 0x32 } if m.LeaseTransitions != nil { i = encodeVarintGenerated(dAtA, i, uint64(*m.LeaseTransitions)) i-- dAtA[i] = 0x28 } if m.RenewTime != nil { { size, err := m.RenewTime.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x22 } if m.AcquireTime != nil { { size, err := m.AcquireTime.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a } if m.LeaseDurationSeconds != nil { i = encodeVarintGenerated(dAtA, i, uint64(*m.LeaseDurationSeconds)) i-- dAtA[i] = 0x10 } if m.HolderIdentity != nil { i -= len(*m.HolderIdentity) copy(dAtA[i:], *m.HolderIdentity) i = encodeVarintGenerated(dAtA, i, uint64(len(*m.HolderIdentity))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { offset -= sovGenerated(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return base } func (m *Lease) Size() (n int) { if m == nil { return 0 } var l int _ = l l = m.ObjectMeta.Size() n += 1 + l + sovGenerated(uint64(l)) l = m.Spec.Size() n += 1 + l + sovGenerated(uint64(l)) return n } func (m *LeaseList) Size() (n int) { if m == nil { return 0 } var l int _ = l l = m.ListMeta.Size() n += 1 + l + sovGenerated(uint64(l)) if len(m.Items) > 0 { for _, e := range m.Items { l = e.Size() n += 1 + l + sovGenerated(uint64(l)) } } return n } func (m *LeaseSpec) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.HolderIdentity != nil { l = len(*m.HolderIdentity) n += 1 + l + sovGenerated(uint64(l)) } if m.LeaseDurationSeconds != nil { n += 1 + sovGenerated(uint64(*m.LeaseDurationSeconds)) } if m.AcquireTime != nil { l = m.AcquireTime.Size() n += 1 + l + sovGenerated(uint64(l)) } if m.RenewTime != nil { l = m.RenewTime.Size() n += 1 + l + sovGenerated(uint64(l)) } if m.LeaseTransitions != nil { n += 1 + sovGenerated(uint64(*m.LeaseTransitions)) } if m.Strategy != nil { l = len(*m.Strategy) n += 1 + l + sovGenerated(uint64(l)) } if m.PreferredHolder != nil { l = len(*m.PreferredHolder) n += 1 + l + sovGenerated(uint64(l)) } return n } func sovGenerated(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } func sozGenerated(x uint64) (n int) { return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (this *Lease) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&Lease{`, `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "LeaseSpec", "LeaseSpec", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } func (this *LeaseList) String() string { if this == nil { return "nil" } repeatedStringForItems := "[]Lease{" for _, f := range this.Items { repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "Lease", "Lease", 1), `&`, ``, 1) + "," } repeatedStringForItems += "}" s := strings.Join([]string{`&LeaseList{`, `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, `Items:` + repeatedStringForItems + `,`, `}`, }, "") return s } func (this *LeaseSpec) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&LeaseSpec{`, `HolderIdentity:` + valueToStringGenerated(this.HolderIdentity) + `,`, `LeaseDurationSeconds:` + valueToStringGenerated(this.LeaseDurationSeconds) + `,`, `AcquireTime:` + strings.Replace(fmt.Sprintf("%v", this.AcquireTime), "MicroTime", "v1.MicroTime", 1) + `,`, `RenewTime:` + strings.Replace(fmt.Sprintf("%v", this.RenewTime), "MicroTime", "v1.MicroTime", 1) + `,`, `LeaseTransitions:` + valueToStringGenerated(this.LeaseTransitions) + `,`, `Strategy:` + valueToStringGenerated(this.Strategy) + `,`, `PreferredHolder:` + valueToStringGenerated(this.PreferredHolder) + `,`, `}`, }, "") return s } func valueToStringGenerated(v interface{}) string { rv := reflect.ValueOf(v) if rv.IsNil() { return "nil" } pv := reflect.Indirect(rv).Interface() return fmt.Sprintf("*%v", pv) } func (m *Lease) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Lease: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Lease: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthGenerated } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *LeaseList) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: LeaseList: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: LeaseList: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } m.Items = append(m.Items, Lease{}) if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthGenerated } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *LeaseSpec) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: LeaseSpec: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: LeaseSpec: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field HolderIdentity", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } s := string(dAtA[iNdEx:postIndex]) m.HolderIdentity = &s iNdEx = postIndex case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field LeaseDurationSeconds", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.LeaseDurationSeconds = &v case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field AcquireTime", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } if m.AcquireTime == nil { m.AcquireTime = &v1.MicroTime{} } if err := m.AcquireTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RenewTime", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } if m.RenewTime == nil { m.RenewTime = &v1.MicroTime{} } if err := m.RenewTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 5: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field LeaseTransitions", wireType) } var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ v |= int32(b&0x7F) << shift if b < 0x80 { break } } m.LeaseTransitions = &v case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Strategy", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } s := k8s_io_api_coordination_v1.CoordinatedLeaseStrategy(dAtA[iNdEx:postIndex]) m.Strategy = &s iNdEx = postIndex case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PreferredHolder", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } s := string(dAtA[iNdEx:postIndex]) m.PreferredHolder = &s iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthGenerated } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipGenerated(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowGenerated } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } wireType := int(wire & 0x7) switch wireType { case 0: for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowGenerated } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } iNdEx++ if dAtA[iNdEx-1] < 0x80 { break } } case 1: iNdEx += 8 case 2: var length int for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowGenerated } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ length |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if length < 0 { return 0, ErrInvalidLengthGenerated } iNdEx += length case 3: depth++ case 4: if depth == 0 { return 0, ErrUnexpectedEndOfGroupGenerated } depth-- case 5: iNdEx += 4 default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } if iNdEx < 0 { return 0, ErrInvalidLengthGenerated } if depth == 0 { return iNdEx, nil } } return 0, io.ErrUnexpectedEOF } var ( ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") )
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/coordination/v1alpha2/types_swagger_doc_generated.go
vendor/k8s.io/api/coordination/v1alpha2/types_swagger_doc_generated.go
/* Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package v1alpha2 // This file contains a collection of methods that can be used from go-restful to // generate Swagger API documentation for its models. Please read this PR for more // information on the implementation: https://github.com/emicklei/go-restful/pull/215 // // TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if // they are on one line! For multiple line or blocks that you want to ignore use ---. // Any context after a --- is ignored. // // Those methods can be generated by using hack/update-codegen.sh // AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_LeaseCandidate = map[string]string{ "": "LeaseCandidate defines a candidate for a Lease object. Candidates are created such that coordinated leader election will pick the best leader from the list of candidates.", "metadata": "More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "spec": "spec contains the specification of the Lease. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", } func (LeaseCandidate) SwaggerDoc() map[string]string { return map_LeaseCandidate } var map_LeaseCandidateList = map[string]string{ "": "LeaseCandidateList is a list of Lease objects.", "metadata": "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "items": "items is a list of schema objects.", } func (LeaseCandidateList) SwaggerDoc() map[string]string { return map_LeaseCandidateList } var map_LeaseCandidateSpec = map[string]string{ "": "LeaseCandidateSpec is a specification of a Lease.", "leaseName": "LeaseName is the name of the lease for which this candidate is contending. This field is immutable.", "pingTime": "PingTime is the last time that the server has requested the LeaseCandidate to renew. It is only done during leader election to check if any LeaseCandidates have become ineligible. When PingTime is updated, the LeaseCandidate will respond by updating RenewTime.", "renewTime": "RenewTime is the time that the LeaseCandidate was last updated. Any time a Lease needs to do leader election, the PingTime field is updated to signal to the LeaseCandidate that they should update the RenewTime. Old LeaseCandidate objects are also garbage collected if it has been hours since the last renew. The PingTime field is updated regularly to prevent garbage collection for still active LeaseCandidates.", "binaryVersion": "BinaryVersion is the binary version. It must be in a semver format without leading `v`. This field is required.", "emulationVersion": "EmulationVersion is the emulation version. It must be in a semver format without leading `v`. EmulationVersion must be less than or equal to BinaryVersion. This field is required when strategy is \"OldestEmulationVersion\"", "strategy": "Strategy is the strategy that coordinated leader election will use for picking the leader. If multiple candidates for the same Lease return different strategies, the strategy provided by the candidate with the latest BinaryVersion will be used. If there is still conflict, this is a user error and coordinated leader election will not operate the Lease until resolved. (Alpha) Using this field requires the CoordinatedLeaderElection feature gate to be enabled.", } func (LeaseCandidateSpec) SwaggerDoc() map[string]string { return map_LeaseCandidateSpec } // AUTO-GENERATED FUNCTIONS END HERE
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/coordination/v1alpha2/zz_generated.deepcopy.go
vendor/k8s.io/api/coordination/v1alpha2/zz_generated.deepcopy.go
//go:build !ignore_autogenerated // +build !ignore_autogenerated /* Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Code generated by deepcopy-gen. DO NOT EDIT. package v1alpha2 import ( runtime "k8s.io/apimachinery/pkg/runtime" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *LeaseCandidate) DeepCopyInto(out *LeaseCandidate) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LeaseCandidate. func (in *LeaseCandidate) DeepCopy() *LeaseCandidate { if in == nil { return nil } out := new(LeaseCandidate) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. func (in *LeaseCandidate) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *LeaseCandidateList) DeepCopyInto(out *LeaseCandidateList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]LeaseCandidate, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LeaseCandidateList. func (in *LeaseCandidateList) DeepCopy() *LeaseCandidateList { if in == nil { return nil } out := new(LeaseCandidateList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. func (in *LeaseCandidateList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *LeaseCandidateSpec) DeepCopyInto(out *LeaseCandidateSpec) { *out = *in if in.PingTime != nil { in, out := &in.PingTime, &out.PingTime *out = (*in).DeepCopy() } if in.RenewTime != nil { in, out := &in.RenewTime, &out.RenewTime *out = (*in).DeepCopy() } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LeaseCandidateSpec. func (in *LeaseCandidateSpec) DeepCopy() *LeaseCandidateSpec { if in == nil { return nil } out := new(LeaseCandidateSpec) in.DeepCopyInto(out) return out }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/coordination/v1alpha2/types.go
vendor/k8s.io/api/coordination/v1alpha2/types.go
/* Copyright 2024 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package v1alpha2 import ( v1 "k8s.io/api/coordination/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.32 // LeaseCandidate defines a candidate for a Lease object. // Candidates are created such that coordinated leader election will pick the best leader from the list of candidates. type LeaseCandidate struct { metav1.TypeMeta `json:",inline"` // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // 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 Spec LeaseCandidateSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` } // LeaseCandidateSpec is a specification of a Lease. type LeaseCandidateSpec struct { // LeaseName is the name of the lease for which this candidate is contending. // This field is immutable. // +required LeaseName string `json:"leaseName" protobuf:"bytes,1,name=leaseName"` // PingTime is the last time that the server has requested the LeaseCandidate // to renew. It is only done during leader election to check if any // LeaseCandidates have become ineligible. When PingTime is updated, the // LeaseCandidate will respond by updating RenewTime. // +optional PingTime *metav1.MicroTime `json:"pingTime,omitempty" protobuf:"bytes,2,opt,name=pingTime"` // RenewTime is the time that the LeaseCandidate was last updated. // Any time a Lease needs to do leader election, the PingTime field // is updated to signal to the LeaseCandidate that they should update // the RenewTime. // Old LeaseCandidate objects are also garbage collected if it has been hours // since the last renew. The PingTime field is updated regularly to prevent // garbage collection for still active LeaseCandidates. // +optional RenewTime *metav1.MicroTime `json:"renewTime,omitempty" protobuf:"bytes,3,opt,name=renewTime"` // BinaryVersion is the binary version. It must be in a semver format without leading `v`. // This field is required. // +required BinaryVersion string `json:"binaryVersion" protobuf:"bytes,4,name=binaryVersion"` // EmulationVersion is the emulation version. It must be in a semver format without leading `v`. // EmulationVersion must be less than or equal to BinaryVersion. // This field is required when strategy is "OldestEmulationVersion" // +optional EmulationVersion string `json:"emulationVersion,omitempty" protobuf:"bytes,5,opt,name=emulationVersion"` // Strategy is the strategy that coordinated leader election will use for picking the leader. // If multiple candidates for the same Lease return different strategies, the strategy provided // by the candidate with the latest BinaryVersion will be used. If there is still conflict, // this is a user error and coordinated leader election will not operate the Lease until resolved. // (Alpha) Using this field requires the CoordinatedLeaderElection feature gate to be enabled. // +featureGate=CoordinatedLeaderElection // +required Strategy v1.CoordinatedLeaseStrategy `json:"strategy,omitempty" protobuf:"bytes,6,opt,name=strategy"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.32 // LeaseCandidateList is a list of Lease objects. type LeaseCandidateList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // items is a list of schema objects. Items []LeaseCandidate `json:"items" protobuf:"bytes,2,rep,name=items"` }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/coordination/v1alpha2/register.go
vendor/k8s.io/api/coordination/v1alpha2/register.go
/* Copyright 2024 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package v1alpha2 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" ) // GroupName is the group name use in this package const GroupName = "coordination.k8s.io" // SchemeGroupVersion is group version used to register these objects var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha2"} // Resource takes an unqualified resource and returns a Group qualified GroupResource func Resource(resource string) schema.GroupResource { return SchemeGroupVersion.WithResource(resource).GroupResource() } var ( // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api. // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes. SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) localSchemeBuilder = &SchemeBuilder AddToScheme = localSchemeBuilder.AddToScheme ) // Adds the list of known types to api.Scheme. func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &LeaseCandidate{}, &LeaseCandidateList{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/coordination/v1alpha2/zz_generated.prerelease-lifecycle.go
vendor/k8s.io/api/coordination/v1alpha2/zz_generated.prerelease-lifecycle.go
//go:build !ignore_autogenerated // +build !ignore_autogenerated /* Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Code generated by prerelease-lifecycle-gen. DO NOT EDIT. package v1alpha2 // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *LeaseCandidate) APILifecycleIntroduced() (major, minor int) { return 1, 32 } // APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. func (in *LeaseCandidate) APILifecycleDeprecated() (major, minor int) { return 1, 35 } // APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. func (in *LeaseCandidate) APILifecycleRemoved() (major, minor int) { return 1, 38 } // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *LeaseCandidateList) APILifecycleIntroduced() (major, minor int) { return 1, 32 } // APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. func (in *LeaseCandidateList) APILifecycleDeprecated() (major, minor int) { return 1, 35 } // APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. func (in *LeaseCandidateList) APILifecycleRemoved() (major, minor int) { return 1, 38 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/coordination/v1alpha2/doc.go
vendor/k8s.io/api/coordination/v1alpha2/doc.go
/* Copyright 2024 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // +k8s:deepcopy-gen=package // +k8s:protobuf-gen=package // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true // +groupName=coordination.k8s.io package v1alpha2 // import "k8s.io/api/coordination/v1alpha2"
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/coordination/v1alpha2/generated.pb.go
vendor/k8s.io/api/coordination/v1alpha2/generated.pb.go
/* Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: k8s.io/api/coordination/v1alpha2/generated.proto package v1alpha2 import ( fmt "fmt" io "io" proto "github.com/gogo/protobuf/proto" k8s_io_api_coordination_v1 "k8s.io/api/coordination/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" math "math" math_bits "math/bits" reflect "reflect" strings "strings" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *LeaseCandidate) Reset() { *m = LeaseCandidate{} } func (*LeaseCandidate) ProtoMessage() {} func (*LeaseCandidate) Descriptor() ([]byte, []int) { return fileDescriptor_c1ec5c989d262916, []int{0} } func (m *LeaseCandidate) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *LeaseCandidate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *LeaseCandidate) XXX_Merge(src proto.Message) { xxx_messageInfo_LeaseCandidate.Merge(m, src) } func (m *LeaseCandidate) XXX_Size() int { return m.Size() } func (m *LeaseCandidate) XXX_DiscardUnknown() { xxx_messageInfo_LeaseCandidate.DiscardUnknown(m) } var xxx_messageInfo_LeaseCandidate proto.InternalMessageInfo func (m *LeaseCandidateList) Reset() { *m = LeaseCandidateList{} } func (*LeaseCandidateList) ProtoMessage() {} func (*LeaseCandidateList) Descriptor() ([]byte, []int) { return fileDescriptor_c1ec5c989d262916, []int{1} } func (m *LeaseCandidateList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *LeaseCandidateList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *LeaseCandidateList) XXX_Merge(src proto.Message) { xxx_messageInfo_LeaseCandidateList.Merge(m, src) } func (m *LeaseCandidateList) XXX_Size() int { return m.Size() } func (m *LeaseCandidateList) XXX_DiscardUnknown() { xxx_messageInfo_LeaseCandidateList.DiscardUnknown(m) } var xxx_messageInfo_LeaseCandidateList proto.InternalMessageInfo func (m *LeaseCandidateSpec) Reset() { *m = LeaseCandidateSpec{} } func (*LeaseCandidateSpec) ProtoMessage() {} func (*LeaseCandidateSpec) Descriptor() ([]byte, []int) { return fileDescriptor_c1ec5c989d262916, []int{2} } func (m *LeaseCandidateSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *LeaseCandidateSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *LeaseCandidateSpec) XXX_Merge(src proto.Message) { xxx_messageInfo_LeaseCandidateSpec.Merge(m, src) } func (m *LeaseCandidateSpec) XXX_Size() int { return m.Size() } func (m *LeaseCandidateSpec) XXX_DiscardUnknown() { xxx_messageInfo_LeaseCandidateSpec.DiscardUnknown(m) } var xxx_messageInfo_LeaseCandidateSpec proto.InternalMessageInfo func init() { proto.RegisterType((*LeaseCandidate)(nil), "k8s.io.api.coordination.v1alpha2.LeaseCandidate") proto.RegisterType((*LeaseCandidateList)(nil), "k8s.io.api.coordination.v1alpha2.LeaseCandidateList") proto.RegisterType((*LeaseCandidateSpec)(nil), "k8s.io.api.coordination.v1alpha2.LeaseCandidateSpec") } func init() { proto.RegisterFile("k8s.io/api/coordination/v1alpha2/generated.proto", fileDescriptor_c1ec5c989d262916) } var fileDescriptor_c1ec5c989d262916 = []byte{ // 555 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0x4f, 0x8b, 0xd3, 0x4e, 0x18, 0xc7, 0x9b, 0xdd, 0xf6, 0x47, 0x3b, 0xbf, 0xad, 0xd4, 0x01, 0x21, 0xf4, 0x90, 0x96, 0x9e, 0x44, 0x70, 0x66, 0x77, 0x5d, 0x44, 0xf0, 0x96, 0xf5, 0x0f, 0x42, 0x57, 0x25, 0xab, 0x0b, 0xca, 0x1e, 0x9c, 0x26, 0x8f, 0xe9, 0xd8, 0x26, 0x13, 0x92, 0xe9, 0x4a, 0x6f, 0xbe, 0x04, 0x5f, 0x56, 0xf5, 0xb4, 0xc7, 0x3d, 0x15, 0x1b, 0xc1, 0x17, 0xe1, 0x49, 0x66, 0x9a, 0xf4, 0xaf, 0xa5, 0xc5, 0x5b, 0xe7, 0x99, 0xe7, 0xf3, 0x99, 0xf9, 0x3e, 0x69, 0x82, 0x0e, 0x7b, 0x8f, 0x12, 0xc2, 0x05, 0x65, 0x11, 0xa7, 0xae, 0x10, 0xb1, 0xc7, 0x43, 0x26, 0xb9, 0x08, 0xe9, 0xd5, 0x11, 0xeb, 0x47, 0x5d, 0x76, 0x4c, 0x7d, 0x08, 0x21, 0x66, 0x12, 0x3c, 0x12, 0xc5, 0x42, 0x0a, 0xdc, 0x9c, 0x12, 0x84, 0x45, 0x9c, 0x2c, 0x12, 0x24, 0x27, 0xea, 0xf7, 0x7d, 0x2e, 0xbb, 0x83, 0x0e, 0x71, 0x45, 0x40, 0x7d, 0xe1, 0x0b, 0xaa, 0xc1, 0xce, 0xe0, 0xa3, 0x5e, 0xe9, 0x85, 0xfe, 0x35, 0x15, 0xd6, 0xef, 0x6d, 0xbe, 0xc2, 0xea, 0xe1, 0xf5, 0x93, 0x79, 0x6f, 0xc0, 0xdc, 0x2e, 0x0f, 0x21, 0x1e, 0xd2, 0xa8, 0xe7, 0xab, 0x42, 0x42, 0x03, 0x90, 0xec, 0x6f, 0x14, 0xdd, 0x44, 0xc5, 0x83, 0x50, 0xf2, 0x00, 0xd6, 0x80, 0x87, 0xdb, 0x80, 0xc4, 0xed, 0x42, 0xc0, 0x56, 0xb9, 0xd6, 0x77, 0x03, 0xdd, 0x6a, 0x03, 0x4b, 0xe0, 0x94, 0x85, 0x1e, 0xf7, 0x98, 0x04, 0xfc, 0x01, 0x95, 0xd5, 0xb5, 0x3c, 0x26, 0x99, 0x69, 0x34, 0x8d, 0xbb, 0xff, 0x1f, 0x1f, 0x92, 0xf9, 0x04, 0x67, 0x76, 0x12, 0xf5, 0x7c, 0x55, 0x48, 0x88, 0xea, 0x26, 0x57, 0x47, 0xe4, 0x55, 0xe7, 0x13, 0xb8, 0xf2, 0x0c, 0x24, 0xb3, 0xf1, 0x68, 0xdc, 0x28, 0xa4, 0xe3, 0x06, 0x9a, 0xd7, 0x9c, 0x99, 0x15, 0x5f, 0xa0, 0x62, 0x12, 0x81, 0x6b, 0xee, 0x69, 0xfb, 0x09, 0xd9, 0xf6, 0x7c, 0xc8, 0xf2, 0x0d, 0xcf, 0x23, 0x70, 0xed, 0x83, 0xec, 0x84, 0xa2, 0x5a, 0x39, 0xda, 0xd7, 0xfa, 0x66, 0x20, 0xbc, 0xdc, 0xda, 0xe6, 0x89, 0xc4, 0x97, 0x6b, 0x81, 0xc8, 0x6e, 0x81, 0x14, 0xad, 0xe3, 0xd4, 0xb2, 0xc3, 0xca, 0x79, 0x65, 0x21, 0xcc, 0x5b, 0x54, 0xe2, 0x12, 0x82, 0xc4, 0xdc, 0x6b, 0xee, 0xaf, 0xcc, 0x6a, 0xa7, 0x34, 0x76, 0x35, 0x93, 0x97, 0x5e, 0x28, 0x8d, 0x33, 0xb5, 0xb5, 0x7e, 0xed, 0xaf, 0x66, 0x51, 0x41, 0x31, 0x45, 0x95, 0xbe, 0xaa, 0xbe, 0x64, 0x01, 0xe8, 0x30, 0x15, 0xfb, 0x76, 0xc6, 0x57, 0xda, 0xf9, 0x86, 0x33, 0xef, 0xc1, 0xef, 0x50, 0x39, 0xe2, 0xa1, 0xff, 0x86, 0x07, 0x90, 0xcd, 0x9b, 0xee, 0x16, 0xfe, 0x8c, 0xbb, 0xb1, 0x50, 0x98, 0x7d, 0xa0, 0x92, 0xbf, 0xce, 0x24, 0xce, 0x4c, 0x87, 0x2f, 0x51, 0x25, 0x86, 0x10, 0x3e, 0x6b, 0xf7, 0xfe, 0xbf, 0xb9, 0xab, 0xea, 0xe2, 0x4e, 0x6e, 0x71, 0xe6, 0x42, 0xfc, 0x18, 0x55, 0x3b, 0x3c, 0x64, 0xf1, 0xf0, 0x02, 0xe2, 0x84, 0x8b, 0xd0, 0x2c, 0xea, 0xb4, 0x77, 0xb2, 0xb4, 0x55, 0x7b, 0x71, 0xd3, 0x59, 0xee, 0xc5, 0x4f, 0x50, 0x0d, 0x82, 0x41, 0x5f, 0x0f, 0x3e, 0xe7, 0x4b, 0x9a, 0x37, 0x33, 0xbe, 0xf6, 0x74, 0x65, 0xdf, 0x59, 0x23, 0xb0, 0x8b, 0xca, 0x89, 0x54, 0x6f, 0x8b, 0x3f, 0x34, 0xff, 0xd3, 0xf4, 0xf3, 0xfc, 0x8f, 0x70, 0x9e, 0xd5, 0x7f, 0x8f, 0x1b, 0x0f, 0x36, 0x7f, 0x0d, 0xc8, 0x69, 0xbe, 0x06, 0x4f, 0x3f, 0x9d, 0x1c, 0x73, 0x66, 0x62, 0xfb, 0xd9, 0x68, 0x62, 0x15, 0xae, 0x27, 0x56, 0xe1, 0x66, 0x62, 0x15, 0xbe, 0xa4, 0x96, 0x31, 0x4a, 0x2d, 0xe3, 0x3a, 0xb5, 0x8c, 0x9b, 0xd4, 0x32, 0x7e, 0xa4, 0x96, 0xf1, 0xf5, 0xa7, 0x55, 0x78, 0xdf, 0xdc, 0xf6, 0xd5, 0xfb, 0x13, 0x00, 0x00, 0xff, 0xff, 0x7f, 0x15, 0x63, 0xd0, 0x18, 0x05, 0x00, 0x00, } func (m *LeaseCandidate) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *LeaseCandidate) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *LeaseCandidate) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l { size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 { size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa return len(dAtA) - i, nil } func (m *LeaseCandidateList) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *LeaseCandidateList) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *LeaseCandidateList) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.Items) > 0 { for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 } } { size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa return len(dAtA) - i, nil } func (m *LeaseCandidateSpec) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *LeaseCandidateSpec) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *LeaseCandidateSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l i -= len(m.Strategy) copy(dAtA[i:], m.Strategy) i = encodeVarintGenerated(dAtA, i, uint64(len(m.Strategy))) i-- dAtA[i] = 0x32 i -= len(m.EmulationVersion) copy(dAtA[i:], m.EmulationVersion) i = encodeVarintGenerated(dAtA, i, uint64(len(m.EmulationVersion))) i-- dAtA[i] = 0x2a i -= len(m.BinaryVersion) copy(dAtA[i:], m.BinaryVersion) i = encodeVarintGenerated(dAtA, i, uint64(len(m.BinaryVersion))) i-- dAtA[i] = 0x22 if m.RenewTime != nil { { size, err := m.RenewTime.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a } if m.PingTime != nil { { size, err := m.PingTime.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 } i -= len(m.LeaseName) copy(dAtA[i:], m.LeaseName) i = encodeVarintGenerated(dAtA, i, uint64(len(m.LeaseName))) i-- dAtA[i] = 0xa return len(dAtA) - i, nil } func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { offset -= sovGenerated(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return base } func (m *LeaseCandidate) Size() (n int) { if m == nil { return 0 } var l int _ = l l = m.ObjectMeta.Size() n += 1 + l + sovGenerated(uint64(l)) l = m.Spec.Size() n += 1 + l + sovGenerated(uint64(l)) return n } func (m *LeaseCandidateList) Size() (n int) { if m == nil { return 0 } var l int _ = l l = m.ListMeta.Size() n += 1 + l + sovGenerated(uint64(l)) if len(m.Items) > 0 { for _, e := range m.Items { l = e.Size() n += 1 + l + sovGenerated(uint64(l)) } } return n } func (m *LeaseCandidateSpec) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.LeaseName) n += 1 + l + sovGenerated(uint64(l)) if m.PingTime != nil { l = m.PingTime.Size() n += 1 + l + sovGenerated(uint64(l)) } if m.RenewTime != nil { l = m.RenewTime.Size() n += 1 + l + sovGenerated(uint64(l)) } l = len(m.BinaryVersion) n += 1 + l + sovGenerated(uint64(l)) l = len(m.EmulationVersion) n += 1 + l + sovGenerated(uint64(l)) l = len(m.Strategy) n += 1 + l + sovGenerated(uint64(l)) return n } func sovGenerated(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } func sozGenerated(x uint64) (n int) { return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (this *LeaseCandidate) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&LeaseCandidate{`, `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "LeaseCandidateSpec", "LeaseCandidateSpec", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } func (this *LeaseCandidateList) String() string { if this == nil { return "nil" } repeatedStringForItems := "[]LeaseCandidate{" for _, f := range this.Items { repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "LeaseCandidate", "LeaseCandidate", 1), `&`, ``, 1) + "," } repeatedStringForItems += "}" s := strings.Join([]string{`&LeaseCandidateList{`, `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, `Items:` + repeatedStringForItems + `,`, `}`, }, "") return s } func (this *LeaseCandidateSpec) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&LeaseCandidateSpec{`, `LeaseName:` + fmt.Sprintf("%v", this.LeaseName) + `,`, `PingTime:` + strings.Replace(fmt.Sprintf("%v", this.PingTime), "MicroTime", "v1.MicroTime", 1) + `,`, `RenewTime:` + strings.Replace(fmt.Sprintf("%v", this.RenewTime), "MicroTime", "v1.MicroTime", 1) + `,`, `BinaryVersion:` + fmt.Sprintf("%v", this.BinaryVersion) + `,`, `EmulationVersion:` + fmt.Sprintf("%v", this.EmulationVersion) + `,`, `Strategy:` + fmt.Sprintf("%v", this.Strategy) + `,`, `}`, }, "") return s } func valueToStringGenerated(v interface{}) string { rv := reflect.ValueOf(v) if rv.IsNil() { return "nil" } pv := reflect.Indirect(rv).Interface() return fmt.Sprintf("*%v", pv) } func (m *LeaseCandidate) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: LeaseCandidate: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: LeaseCandidate: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthGenerated } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *LeaseCandidateList) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: LeaseCandidateList: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: LeaseCandidateList: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } m.Items = append(m.Items, LeaseCandidate{}) if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthGenerated } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *LeaseCandidateSpec) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: LeaseCandidateSpec: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: LeaseCandidateSpec: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field LeaseName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } m.LeaseName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PingTime", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } if m.PingTime == nil { m.PingTime = &v1.MicroTime{} } if err := m.PingTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RenewTime", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } if m.RenewTime == nil { m.RenewTime = &v1.MicroTime{} } if err := m.RenewTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field BinaryVersion", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } m.BinaryVersion = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field EmulationVersion", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } m.EmulationVersion = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Strategy", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } intStringLen := int(stringLen) if intStringLen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } m.Strategy = k8s_io_api_coordination_v1.CoordinatedLeaseStrategy(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthGenerated } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipGenerated(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowGenerated } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } wireType := int(wire & 0x7) switch wireType { case 0: for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowGenerated } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } iNdEx++ if dAtA[iNdEx-1] < 0x80 { break } } case 1: iNdEx += 8 case 2: var length int for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowGenerated } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ length |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if length < 0 { return 0, ErrInvalidLengthGenerated } iNdEx += length case 3: depth++ case 4: if depth == 0 { return 0, ErrUnexpectedEndOfGroupGenerated } depth-- case 5: iNdEx += 4 default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } if iNdEx < 0 { return 0, ErrInvalidLengthGenerated } if depth == 0 { return iNdEx, nil } } return 0, io.ErrUnexpectedEOF } var ( ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") )
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/policy/v1/types_swagger_doc_generated.go
vendor/k8s.io/api/policy/v1/types_swagger_doc_generated.go
/* Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package v1 // This file contains a collection of methods that can be used from go-restful to // generate Swagger API documentation for its models. Please read this PR for more // information on the implementation: https://github.com/emicklei/go-restful/pull/215 // // TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if // they are on one line! For multiple line or blocks that you want to ignore use ---. // Any context after a --- is ignored. // // Those methods can be generated by using hack/update-codegen.sh // AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_Eviction = map[string]string{ "": "Eviction evicts a pod from its node subject to certain policies and safety constraints. This is a subresource of Pod. A request to cause such an eviction is created by POSTing to .../pods/<pod name>/evictions.", "metadata": "ObjectMeta describes the pod that is being evicted.", "deleteOptions": "DeleteOptions may be provided", } func (Eviction) SwaggerDoc() map[string]string { return map_Eviction } var map_PodDisruptionBudget = map[string]string{ "": "PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods", "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "spec": "Specification of the desired behavior of the PodDisruptionBudget.", "status": "Most recently observed status of the PodDisruptionBudget.", } func (PodDisruptionBudget) SwaggerDoc() map[string]string { return map_PodDisruptionBudget } var map_PodDisruptionBudgetList = map[string]string{ "": "PodDisruptionBudgetList is a collection of PodDisruptionBudgets.", "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "items": "Items is a list of PodDisruptionBudgets", } func (PodDisruptionBudgetList) SwaggerDoc() map[string]string { return map_PodDisruptionBudgetList } var map_PodDisruptionBudgetSpec = map[string]string{ "": "PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.", "minAvailable": "An eviction is allowed if at least \"minAvailable\" pods selected by \"selector\" will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying \"100%\".", "selector": "Label query over pods whose evictions are managed by the disruption budget. A null selector will match no pods, while an empty ({}) selector will select all pods within the namespace.", "maxUnavailable": "An eviction is allowed if at most \"maxUnavailable\" pods selected by \"selector\" are unavailable after the eviction, i.e. even in absence of the evicted pod. For example, one can prevent all voluntary evictions by specifying 0. This is a mutually exclusive setting with \"minAvailable\".", "unhealthyPodEvictionPolicy": "UnhealthyPodEvictionPolicy defines the criteria for when unhealthy pods should be considered for eviction. Current implementation considers healthy pods, as pods that have status.conditions item with type=\"Ready\",status=\"True\".\n\nValid policies are IfHealthyBudget and AlwaysAllow. If no policy is specified, the default behavior will be used, which corresponds to the IfHealthyBudget policy.\n\nIfHealthyBudget policy means that running pods (status.phase=\"Running\"), but not yet healthy can be evicted only if the guarded application is not disrupted (status.currentHealthy is at least equal to status.desiredHealthy). Healthy pods will be subject to the PDB for eviction.\n\nAlwaysAllow policy means that all running pods (status.phase=\"Running\"), but not yet healthy are considered disrupted and can be evicted regardless of whether the criteria in a PDB is met. This means perspective running pods of a disrupted application might not get a chance to become healthy. Healthy pods will be subject to the PDB for eviction.\n\nAdditional policies may be added in the future. Clients making eviction decisions should disallow eviction of unhealthy pods if they encounter an unrecognized policy in this field.\n\nThis field is beta-level. The eviction API uses this field when the feature gate PDBUnhealthyPodEvictionPolicy is enabled (enabled by default).", } func (PodDisruptionBudgetSpec) SwaggerDoc() map[string]string { return map_PodDisruptionBudgetSpec } var map_PodDisruptionBudgetStatus = map[string]string{ "": "PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system.", "observedGeneration": "Most recent generation observed when updating this PDB status. DisruptionsAllowed and other status information is valid only if observedGeneration equals to PDB's object generation.", "disruptedPods": "DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from the list automatically by PodDisruptionBudget controller after some time. If everything goes smooth this map should be empty for the most of the time. Large number of entries in the map may indicate problems with pod deletions.", "disruptionsAllowed": "Number of pod disruptions that are currently allowed.", "currentHealthy": "current number of healthy pods", "desiredHealthy": "minimum desired number of healthy pods", "expectedPods": "total number of pods counted by this disruption budget", "conditions": "Conditions contain conditions for PDB. The disruption controller sets the DisruptionAllowed condition. The following are known values for the reason field (additional reasons could be added in the future): - SyncFailed: The controller encountered an error and wasn't able to compute\n the number of allowed disruptions. Therefore no disruptions are\n allowed and the status of the condition will be False.\n- InsufficientPods: The number of pods are either at or below the number\n required by the PodDisruptionBudget. No disruptions are\n allowed and the status of the condition will be False.\n- SufficientPods: There are more pods than required by the PodDisruptionBudget.\n The condition will be True, and the number of allowed\n disruptions are provided by the disruptionsAllowed property.", } func (PodDisruptionBudgetStatus) SwaggerDoc() map[string]string { return map_PodDisruptionBudgetStatus } // AUTO-GENERATED FUNCTIONS END HERE
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/policy/v1/zz_generated.deepcopy.go
vendor/k8s.io/api/policy/v1/zz_generated.deepcopy.go
//go:build !ignore_autogenerated // +build !ignore_autogenerated /* Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Code generated by deepcopy-gen. DO NOT EDIT. package v1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" intstr "k8s.io/apimachinery/pkg/util/intstr" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Eviction) DeepCopyInto(out *Eviction) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) if in.DeleteOptions != nil { in, out := &in.DeleteOptions, &out.DeleteOptions *out = new(metav1.DeleteOptions) (*in).DeepCopyInto(*out) } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Eviction. func (in *Eviction) DeepCopy() *Eviction { if in == nil { return nil } out := new(Eviction) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. func (in *Eviction) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PodDisruptionBudget) DeepCopyInto(out *PodDisruptionBudget) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) in.Status.DeepCopyInto(&out.Status) return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodDisruptionBudget. func (in *PodDisruptionBudget) DeepCopy() *PodDisruptionBudget { if in == nil { return nil } out := new(PodDisruptionBudget) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. func (in *PodDisruptionBudget) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PodDisruptionBudgetList) DeepCopyInto(out *PodDisruptionBudgetList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]PodDisruptionBudget, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodDisruptionBudgetList. func (in *PodDisruptionBudgetList) DeepCopy() *PodDisruptionBudgetList { if in == nil { return nil } out := new(PodDisruptionBudgetList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. func (in *PodDisruptionBudgetList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PodDisruptionBudgetSpec) DeepCopyInto(out *PodDisruptionBudgetSpec) { *out = *in if in.MinAvailable != nil { in, out := &in.MinAvailable, &out.MinAvailable *out = new(intstr.IntOrString) **out = **in } if in.Selector != nil { in, out := &in.Selector, &out.Selector *out = new(metav1.LabelSelector) (*in).DeepCopyInto(*out) } if in.MaxUnavailable != nil { in, out := &in.MaxUnavailable, &out.MaxUnavailable *out = new(intstr.IntOrString) **out = **in } if in.UnhealthyPodEvictionPolicy != nil { in, out := &in.UnhealthyPodEvictionPolicy, &out.UnhealthyPodEvictionPolicy *out = new(UnhealthyPodEvictionPolicyType) **out = **in } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodDisruptionBudgetSpec. func (in *PodDisruptionBudgetSpec) DeepCopy() *PodDisruptionBudgetSpec { if in == nil { return nil } out := new(PodDisruptionBudgetSpec) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PodDisruptionBudgetStatus) DeepCopyInto(out *PodDisruptionBudgetStatus) { *out = *in if in.DisruptedPods != nil { in, out := &in.DisruptedPods, &out.DisruptedPods *out = make(map[string]metav1.Time, len(*in)) for key, val := range *in { (*out)[key] = *val.DeepCopy() } } if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions *out = make([]metav1.Condition, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodDisruptionBudgetStatus. func (in *PodDisruptionBudgetStatus) DeepCopy() *PodDisruptionBudgetStatus { if in == nil { return nil } out := new(PodDisruptionBudgetStatus) in.DeepCopyInto(out) return out }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/policy/v1/types.go
vendor/k8s.io/api/policy/v1/types.go
/* Copyright 2021 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package v1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/intstr" ) // DisruptionBudgetCause is the status cause returned for eviction failures caused by PodDisruptionBudget violations. const DisruptionBudgetCause metav1.CauseType = "DisruptionBudget" // PodDisruptionBudgetSpec is a description of a PodDisruptionBudget. type PodDisruptionBudgetSpec struct { // An eviction is allowed if at least "minAvailable" pods selected by // "selector" will still be available after the eviction, i.e. even in the // absence of the evicted pod. So for example you can prevent all voluntary // evictions by specifying "100%". // +optional MinAvailable *intstr.IntOrString `json:"minAvailable,omitempty" protobuf:"bytes,1,opt,name=minAvailable"` // Label query over pods whose evictions are managed by the disruption // budget. // A null selector will match no pods, while an empty ({}) selector will select // all pods within the namespace. // +patchStrategy=replace // +optional Selector *metav1.LabelSelector `json:"selector,omitempty" patchStrategy:"replace" protobuf:"bytes,2,opt,name=selector"` // An eviction is allowed if at most "maxUnavailable" pods selected by // "selector" are unavailable after the eviction, i.e. even in absence of // the evicted pod. For example, one can prevent all voluntary evictions // by specifying 0. This is a mutually exclusive setting with "minAvailable". // +optional MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty" protobuf:"bytes,3,opt,name=maxUnavailable"` // UnhealthyPodEvictionPolicy defines the criteria for when unhealthy pods // should be considered for eviction. Current implementation considers healthy pods, // as pods that have status.conditions item with type="Ready",status="True". // // Valid policies are IfHealthyBudget and AlwaysAllow. // If no policy is specified, the default behavior will be used, // which corresponds to the IfHealthyBudget policy. // // IfHealthyBudget policy means that running pods (status.phase="Running"), // but not yet healthy can be evicted only if the guarded application is not // disrupted (status.currentHealthy is at least equal to status.desiredHealthy). // Healthy pods will be subject to the PDB for eviction. // // AlwaysAllow policy means that all running pods (status.phase="Running"), // but not yet healthy are considered disrupted and can be evicted regardless // of whether the criteria in a PDB is met. This means perspective running // pods of a disrupted application might not get a chance to become healthy. // Healthy pods will be subject to the PDB for eviction. // // Additional policies may be added in the future. // Clients making eviction decisions should disallow eviction of unhealthy pods // if they encounter an unrecognized policy in this field. // // This field is beta-level. The eviction API uses this field when // the feature gate PDBUnhealthyPodEvictionPolicy is enabled (enabled by default). // +optional UnhealthyPodEvictionPolicy *UnhealthyPodEvictionPolicyType `json:"unhealthyPodEvictionPolicy,omitempty" protobuf:"bytes,4,opt,name=unhealthyPodEvictionPolicy"` } // UnhealthyPodEvictionPolicyType defines the criteria for when unhealthy pods // should be considered for eviction. // +enum type UnhealthyPodEvictionPolicyType string const ( // IfHealthyBudget policy means that running pods (status.phase="Running"), // but not yet healthy can be evicted only if the guarded application is not // disrupted (status.currentHealthy is at least equal to status.desiredHealthy). // Healthy pods will be subject to the PDB for eviction. IfHealthyBudget UnhealthyPodEvictionPolicyType = "IfHealthyBudget" // AlwaysAllow policy means that all running pods (status.phase="Running"), // but not yet healthy are considered disrupted and can be evicted regardless // of whether the criteria in a PDB is met. This means perspective running // pods of a disrupted application might not get a chance to become healthy. // Healthy pods will be subject to the PDB for eviction. AlwaysAllow UnhealthyPodEvictionPolicyType = "AlwaysAllow" ) // PodDisruptionBudgetStatus represents information about the status of a // PodDisruptionBudget. Status may trail the actual state of a system. type PodDisruptionBudgetStatus struct { // Most recent generation observed when updating this PDB status. DisruptionsAllowed and other // status information is valid only if observedGeneration equals to PDB's object generation. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"` // DisruptedPods contains information about pods whose eviction was // processed by the API server eviction subresource handler but has not // yet been observed by the PodDisruptionBudget controller. // A pod will be in this map from the time when the API server processed the // eviction request to the time when the pod is seen by PDB controller // as having been marked for deletion (or after a timeout). The key in the map is the name of the pod // and the value is the time when the API server processed the eviction request. If // the deletion didn't occur and a pod is still there it will be removed from // the list automatically by PodDisruptionBudget controller after some time. // If everything goes smooth this map should be empty for the most of the time. // Large number of entries in the map may indicate problems with pod deletions. // +optional DisruptedPods map[string]metav1.Time `json:"disruptedPods,omitempty" protobuf:"bytes,2,rep,name=disruptedPods"` // Number of pod disruptions that are currently allowed. DisruptionsAllowed int32 `json:"disruptionsAllowed" protobuf:"varint,3,opt,name=disruptionsAllowed"` // current number of healthy pods CurrentHealthy int32 `json:"currentHealthy" protobuf:"varint,4,opt,name=currentHealthy"` // minimum desired number of healthy pods DesiredHealthy int32 `json:"desiredHealthy" protobuf:"varint,5,opt,name=desiredHealthy"` // total number of pods counted by this disruption budget ExpectedPods int32 `json:"expectedPods" protobuf:"varint,6,opt,name=expectedPods"` // Conditions contain conditions for PDB. The disruption controller sets the // DisruptionAllowed condition. The following are known values for the reason field // (additional reasons could be added in the future): // - SyncFailed: The controller encountered an error and wasn't able to compute // the number of allowed disruptions. Therefore no disruptions are // allowed and the status of the condition will be False. // - InsufficientPods: The number of pods are either at or below the number // required by the PodDisruptionBudget. No disruptions are // allowed and the status of the condition will be False. // - SufficientPods: There are more pods than required by the PodDisruptionBudget. // The condition will be True, and the number of allowed // disruptions are provided by the disruptionsAllowed property. // // +optional // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,7,rep,name=conditions"` } const ( // DisruptionAllowedCondition is a condition set by the disruption controller // that signal whether any of the pods covered by the PDB can be disrupted. DisruptionAllowedCondition = "DisruptionAllowed" // SyncFailedReason is set on the DisruptionAllowed condition if reconcile // of the PDB failed and therefore disruption of pods are not allowed. SyncFailedReason = "SyncFailed" // SufficientPodsReason is set on the DisruptionAllowed condition if there are // more pods covered by the PDB than required and at least one can be disrupted. SufficientPodsReason = "SufficientPods" // InsufficientPodsReason is set on the DisruptionAllowed condition if the number // of pods are equal to or fewer than required by the PDB. InsufficientPodsReason = "InsufficientPods" ) // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.21 // PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods type PodDisruptionBudget struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Specification of the desired behavior of the PodDisruptionBudget. // +optional Spec PodDisruptionBudgetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` // Most recently observed status of the PodDisruptionBudget. // +optional Status PodDisruptionBudgetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.21 // PodDisruptionBudgetList is a collection of PodDisruptionBudgets. type PodDisruptionBudgetList struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Items is a list of PodDisruptionBudgets Items []PodDisruptionBudget `json:"items" protobuf:"bytes,2,rep,name=items"` } // +genclient // +genclient:noVerbs // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.22 // Eviction evicts a pod from its node subject to certain policies and safety constraints. // This is a subresource of Pod. A request to cause such an eviction is // created by POSTing to .../pods/<pod name>/evictions. type Eviction struct { metav1.TypeMeta `json:",inline"` // ObjectMeta describes the pod that is being evicted. // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // DeleteOptions may be provided // +optional DeleteOptions *metav1.DeleteOptions `json:"deleteOptions,omitempty" protobuf:"bytes,2,opt,name=deleteOptions"` }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/policy/v1/register.go
vendor/k8s.io/api/policy/v1/register.go
/* Copyright 2021 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package v1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" ) // GroupName is the group name use in this package const GroupName = "policy" // SchemeGroupVersion is group version used to register these objects var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} // Resource takes an unqualified resource and returns a Group qualified GroupResource func Resource(resource string) schema.GroupResource { return SchemeGroupVersion.WithResource(resource).GroupResource() } var ( SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) localSchemeBuilder = &SchemeBuilder AddToScheme = localSchemeBuilder.AddToScheme ) // Adds the list of known types to the given scheme. func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &PodDisruptionBudget{}, &PodDisruptionBudgetList{}, &Eviction{}, ) // Add the watch version that applies metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/policy/v1/zz_generated.prerelease-lifecycle.go
vendor/k8s.io/api/policy/v1/zz_generated.prerelease-lifecycle.go
//go:build !ignore_autogenerated // +build !ignore_autogenerated /* Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Code generated by prerelease-lifecycle-gen. DO NOT EDIT. package v1 // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *Eviction) APILifecycleIntroduced() (major, minor int) { return 1, 22 } // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *PodDisruptionBudget) APILifecycleIntroduced() (major, minor int) { return 1, 21 } // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *PodDisruptionBudgetList) APILifecycleIntroduced() (major, minor int) { return 1, 21 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/policy/v1/doc.go
vendor/k8s.io/api/policy/v1/doc.go
/* Copyright 2021 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // +k8s:deepcopy-gen=package // +k8s:protobuf-gen=package // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true // Package policy is for any kind of policy object. Suitable examples, even if // they aren't all here, are PodDisruptionBudget, // NetworkPolicy, etc. package v1 // import "k8s.io/api/policy/v1"
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/policy/v1/generated.pb.go
vendor/k8s.io/api/policy/v1/generated.pb.go
/* Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: k8s.io/api/policy/v1/generated.proto package v1 import ( fmt "fmt" io "io" proto "github.com/gogo/protobuf/proto" github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" math "math" math_bits "math/bits" reflect "reflect" strings "strings" intstr "k8s.io/apimachinery/pkg/util/intstr" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *Eviction) Reset() { *m = Eviction{} } func (*Eviction) ProtoMessage() {} func (*Eviction) Descriptor() ([]byte, []int) { return fileDescriptor_204bc6fa48ff56f7, []int{0} } func (m *Eviction) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *Eviction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *Eviction) XXX_Merge(src proto.Message) { xxx_messageInfo_Eviction.Merge(m, src) } func (m *Eviction) XXX_Size() int { return m.Size() } func (m *Eviction) XXX_DiscardUnknown() { xxx_messageInfo_Eviction.DiscardUnknown(m) } var xxx_messageInfo_Eviction proto.InternalMessageInfo func (m *PodDisruptionBudget) Reset() { *m = PodDisruptionBudget{} } func (*PodDisruptionBudget) ProtoMessage() {} func (*PodDisruptionBudget) Descriptor() ([]byte, []int) { return fileDescriptor_204bc6fa48ff56f7, []int{1} } func (m *PodDisruptionBudget) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *PodDisruptionBudget) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *PodDisruptionBudget) XXX_Merge(src proto.Message) { xxx_messageInfo_PodDisruptionBudget.Merge(m, src) } func (m *PodDisruptionBudget) XXX_Size() int { return m.Size() } func (m *PodDisruptionBudget) XXX_DiscardUnknown() { xxx_messageInfo_PodDisruptionBudget.DiscardUnknown(m) } var xxx_messageInfo_PodDisruptionBudget proto.InternalMessageInfo func (m *PodDisruptionBudgetList) Reset() { *m = PodDisruptionBudgetList{} } func (*PodDisruptionBudgetList) ProtoMessage() {} func (*PodDisruptionBudgetList) Descriptor() ([]byte, []int) { return fileDescriptor_204bc6fa48ff56f7, []int{2} } func (m *PodDisruptionBudgetList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *PodDisruptionBudgetList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *PodDisruptionBudgetList) XXX_Merge(src proto.Message) { xxx_messageInfo_PodDisruptionBudgetList.Merge(m, src) } func (m *PodDisruptionBudgetList) XXX_Size() int { return m.Size() } func (m *PodDisruptionBudgetList) XXX_DiscardUnknown() { xxx_messageInfo_PodDisruptionBudgetList.DiscardUnknown(m) } var xxx_messageInfo_PodDisruptionBudgetList proto.InternalMessageInfo func (m *PodDisruptionBudgetSpec) Reset() { *m = PodDisruptionBudgetSpec{} } func (*PodDisruptionBudgetSpec) ProtoMessage() {} func (*PodDisruptionBudgetSpec) Descriptor() ([]byte, []int) { return fileDescriptor_204bc6fa48ff56f7, []int{3} } func (m *PodDisruptionBudgetSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *PodDisruptionBudgetSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *PodDisruptionBudgetSpec) XXX_Merge(src proto.Message) { xxx_messageInfo_PodDisruptionBudgetSpec.Merge(m, src) } func (m *PodDisruptionBudgetSpec) XXX_Size() int { return m.Size() } func (m *PodDisruptionBudgetSpec) XXX_DiscardUnknown() { xxx_messageInfo_PodDisruptionBudgetSpec.DiscardUnknown(m) } var xxx_messageInfo_PodDisruptionBudgetSpec proto.InternalMessageInfo func (m *PodDisruptionBudgetStatus) Reset() { *m = PodDisruptionBudgetStatus{} } func (*PodDisruptionBudgetStatus) ProtoMessage() {} func (*PodDisruptionBudgetStatus) Descriptor() ([]byte, []int) { return fileDescriptor_204bc6fa48ff56f7, []int{4} } func (m *PodDisruptionBudgetStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *PodDisruptionBudgetStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *PodDisruptionBudgetStatus) XXX_Merge(src proto.Message) { xxx_messageInfo_PodDisruptionBudgetStatus.Merge(m, src) } func (m *PodDisruptionBudgetStatus) XXX_Size() int { return m.Size() } func (m *PodDisruptionBudgetStatus) XXX_DiscardUnknown() { xxx_messageInfo_PodDisruptionBudgetStatus.DiscardUnknown(m) } var xxx_messageInfo_PodDisruptionBudgetStatus proto.InternalMessageInfo func init() { proto.RegisterType((*Eviction)(nil), "k8s.io.api.policy.v1.Eviction") proto.RegisterType((*PodDisruptionBudget)(nil), "k8s.io.api.policy.v1.PodDisruptionBudget") proto.RegisterType((*PodDisruptionBudgetList)(nil), "k8s.io.api.policy.v1.PodDisruptionBudgetList") proto.RegisterType((*PodDisruptionBudgetSpec)(nil), "k8s.io.api.policy.v1.PodDisruptionBudgetSpec") proto.RegisterType((*PodDisruptionBudgetStatus)(nil), "k8s.io.api.policy.v1.PodDisruptionBudgetStatus") proto.RegisterMapType((map[string]v1.Time)(nil), "k8s.io.api.policy.v1.PodDisruptionBudgetStatus.DisruptedPodsEntry") } func init() { proto.RegisterFile("k8s.io/api/policy/v1/generated.proto", fileDescriptor_204bc6fa48ff56f7) } var fileDescriptor_204bc6fa48ff56f7 = []byte{ // 840 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x96, 0x4d, 0x8f, 0xdb, 0x44, 0x18, 0xc7, 0xe3, 0xcd, 0x66, 0xd9, 0x4e, 0x93, 0x68, 0x19, 0x16, 0x58, 0x72, 0x70, 0xaa, 0x88, 0xc3, 0x82, 0xd4, 0x31, 0xdb, 0x22, 0xb4, 0xea, 0x01, 0xb5, 0x6e, 0x56, 0x50, 0xd4, 0x25, 0xab, 0xd9, 0x56, 0x48, 0x08, 0x24, 0x26, 0xf6, 0xd3, 0x64, 0x58, 0xdb, 0x63, 0x79, 0xc6, 0xa1, 0x39, 0xd1, 0x8f, 0xc0, 0x57, 0xe0, 0xa3, 0x70, 0x62, 0x8f, 0xe5, 0x56, 0x71, 0x88, 0x58, 0xf3, 0x2d, 0x38, 0x21, 0x8f, 0x9d, 0x17, 0x27, 0x0e, 0xcd, 0x72, 0xe8, 0xcd, 0xf3, 0xcc, 0xf3, 0xff, 0x3d, 0xf3, 0xbc, 0xcc, 0x24, 0xe8, 0xc3, 0x8b, 0x63, 0x49, 0xb8, 0xb0, 0x58, 0xc8, 0xad, 0x50, 0x78, 0xdc, 0x19, 0x5b, 0xa3, 0x23, 0x6b, 0x00, 0x01, 0x44, 0x4c, 0x81, 0x4b, 0xc2, 0x48, 0x28, 0x81, 0xf7, 0x33, 0x2f, 0xc2, 0x42, 0x4e, 0x32, 0x2f, 0x32, 0x3a, 0x6a, 0xdd, 0x1e, 0x70, 0x35, 0x8c, 0xfb, 0xc4, 0x11, 0xbe, 0x35, 0x10, 0x03, 0x61, 0x69, 0xe7, 0x7e, 0xfc, 0x4c, 0xaf, 0xf4, 0x42, 0x7f, 0x65, 0x90, 0xd6, 0xa7, 0xf3, 0x50, 0x3e, 0x73, 0x86, 0x3c, 0x80, 0x68, 0x6c, 0x85, 0x17, 0x83, 0xd4, 0x20, 0x2d, 0x1f, 0x14, 0x2b, 0x09, 0xdd, 0xb2, 0xd6, 0xa9, 0xa2, 0x38, 0x50, 0xdc, 0x87, 0x15, 0xc1, 0x67, 0xaf, 0x13, 0x48, 0x67, 0x08, 0x3e, 0x5b, 0xd1, 0xdd, 0x5d, 0xa7, 0x8b, 0x15, 0xf7, 0x2c, 0x1e, 0x28, 0xa9, 0xa2, 0x65, 0x51, 0xe7, 0x4f, 0x03, 0xed, 0x9e, 0x8c, 0xb8, 0xa3, 0xb8, 0x08, 0xf0, 0x0f, 0x68, 0x37, 0xcd, 0xc2, 0x65, 0x8a, 0x1d, 0x18, 0xb7, 0x8c, 0xc3, 0x9b, 0x77, 0x3e, 0x21, 0xf3, 0xc2, 0xcd, 0xa0, 0x24, 0xbc, 0x18, 0xa4, 0x06, 0x49, 0x52, 0x6f, 0x32, 0x3a, 0x22, 0xbd, 0xfe, 0x8f, 0xe0, 0xa8, 0x53, 0x50, 0xcc, 0xc6, 0x97, 0x93, 0x76, 0x25, 0x99, 0xb4, 0xd1, 0xdc, 0x46, 0x67, 0x54, 0xec, 0xa1, 0x86, 0x0b, 0x1e, 0x28, 0xe8, 0x85, 0x69, 0x44, 0x79, 0xb0, 0xa5, 0xc3, 0xdc, 0xdd, 0x2c, 0x4c, 0x77, 0x51, 0x6a, 0xbf, 0x9d, 0x4c, 0xda, 0x8d, 0x82, 0x89, 0x16, 0xe1, 0x9d, 0x5f, 0xb7, 0xd0, 0x3b, 0x67, 0xc2, 0xed, 0x72, 0x19, 0xc5, 0xda, 0x64, 0xc7, 0xee, 0x00, 0xd4, 0x1b, 0xc8, 0xb3, 0x87, 0xb6, 0x65, 0x08, 0x4e, 0x9e, 0xde, 0x6d, 0x52, 0x36, 0x7e, 0xa4, 0xe4, 0x68, 0xe7, 0x21, 0x38, 0x76, 0x3d, 0x47, 0x6f, 0xa7, 0x2b, 0xaa, 0x41, 0xf8, 0x1b, 0xb4, 0x23, 0x15, 0x53, 0xb1, 0x3c, 0xa8, 0x6a, 0xa4, 0xb5, 0x39, 0x52, 0xcb, 0xec, 0x66, 0x0e, 0xdd, 0xc9, 0xd6, 0x34, 0xc7, 0x75, 0x7e, 0x37, 0xd0, 0xfb, 0x25, 0xaa, 0xc7, 0x5c, 0x2a, 0xfc, 0xdd, 0x4a, 0x9d, 0xc8, 0x66, 0x75, 0x4a, 0xd5, 0xba, 0x4a, 0x7b, 0x79, 0xd4, 0xdd, 0xa9, 0x65, 0xa1, 0x46, 0x5f, 0xa3, 0x1a, 0x57, 0xe0, 0xa7, 0x33, 0x50, 0x3d, 0xbc, 0x79, 0xe7, 0xa3, 0x8d, 0x33, 0xb2, 0x1b, 0x39, 0xb5, 0xf6, 0x28, 0xd5, 0xd3, 0x0c, 0xd3, 0xf9, 0xa3, 0x5a, 0x9a, 0x49, 0x5a, 0x44, 0xfc, 0x0c, 0xd5, 0x7d, 0x1e, 0x3c, 0x18, 0x31, 0xee, 0xb1, 0xbe, 0x07, 0xaf, 0xed, 0x7a, 0x7a, 0x65, 0x48, 0x76, 0x65, 0xc8, 0xa3, 0x40, 0xf5, 0xa2, 0x73, 0x15, 0xf1, 0x60, 0x60, 0xef, 0x25, 0x93, 0x76, 0xfd, 0x74, 0x81, 0x44, 0x0b, 0x5c, 0xfc, 0x3d, 0xda, 0x95, 0xe0, 0x81, 0xa3, 0x44, 0x74, 0xbd, 0xd1, 0x7e, 0xcc, 0xfa, 0xe0, 0x9d, 0xe7, 0x52, 0xbb, 0x9e, 0x96, 0x6c, 0xba, 0xa2, 0x33, 0x24, 0xf6, 0x50, 0xd3, 0x67, 0xcf, 0x9f, 0x06, 0x6c, 0x96, 0x48, 0xf5, 0x7f, 0x26, 0x82, 0x93, 0x49, 0xbb, 0x79, 0x5a, 0x60, 0xd1, 0x25, 0x36, 0x7e, 0x61, 0xa0, 0x56, 0x1c, 0x0c, 0x81, 0x79, 0x6a, 0x38, 0x3e, 0x13, 0xee, 0xf4, 0x9d, 0x38, 0xd3, 0xcd, 0x39, 0xd8, 0xbe, 0x65, 0x1c, 0xde, 0xb0, 0xef, 0x27, 0x93, 0x76, 0xeb, 0xe9, 0x5a, 0xaf, 0x7f, 0x26, 0x6d, 0x73, 0xfd, 0xee, 0x93, 0x71, 0x08, 0xf4, 0x3f, 0x62, 0x74, 0x7e, 0xab, 0xa1, 0x0f, 0xd6, 0xce, 0x34, 0xfe, 0x0a, 0x61, 0xd1, 0x97, 0x10, 0x8d, 0xc0, 0xfd, 0x22, 0x7b, 0xd7, 0xb8, 0x08, 0x74, 0x6f, 0xab, 0x76, 0x2b, 0x9f, 0x11, 0xdc, 0x5b, 0xf1, 0xa0, 0x25, 0x2a, 0xfc, 0x33, 0x6a, 0xb8, 0x59, 0x14, 0x70, 0xcf, 0x84, 0x3b, 0x9d, 0x4a, 0xfb, 0x9a, 0xf7, 0x8c, 0x74, 0x17, 0x21, 0x27, 0x81, 0x8a, 0xc6, 0xf6, 0xbb, 0xf9, 0x51, 0x1a, 0x85, 0x3d, 0x5a, 0x8c, 0x97, 0x26, 0xe3, 0xce, 0x90, 0xf2, 0x81, 0xe7, 0x89, 0x9f, 0xc0, 0xd5, 0xfd, 0xad, 0xcd, 0x93, 0xe9, 0xae, 0x78, 0xd0, 0x12, 0x15, 0xfe, 0x1c, 0x35, 0x9d, 0x38, 0x8a, 0x20, 0x50, 0x5f, 0x66, 0x95, 0xd5, 0xcd, 0xaa, 0xd9, 0xef, 0xe5, 0x9c, 0xe6, 0xc3, 0xc2, 0x2e, 0x5d, 0xf2, 0x4e, 0xf5, 0x2e, 0x48, 0x1e, 0x81, 0x3b, 0xd5, 0xd7, 0x8a, 0xfa, 0x6e, 0x61, 0x97, 0x2e, 0x79, 0xe3, 0x63, 0x54, 0x87, 0xe7, 0x21, 0x38, 0xd3, 0x5a, 0xee, 0x68, 0xf5, 0x7e, 0xae, 0xae, 0x9f, 0x2c, 0xec, 0xd1, 0x82, 0x27, 0x76, 0x10, 0x72, 0x44, 0xe0, 0xf2, 0xec, 0xd7, 0xe1, 0x2d, 0xdd, 0x03, 0x6b, 0xb3, 0x2b, 0xf4, 0x70, 0xaa, 0x9b, 0xbf, 0xcd, 0x33, 0x93, 0xa4, 0x0b, 0xd8, 0x96, 0x87, 0xf0, 0x6a, 0x9b, 0xf0, 0x1e, 0xaa, 0x5e, 0xc0, 0x58, 0x8f, 0xcf, 0x0d, 0x9a, 0x7e, 0xe2, 0xfb, 0xa8, 0x36, 0x62, 0x5e, 0x0c, 0xf9, 0x55, 0xfe, 0x78, 0xb3, 0x73, 0x3c, 0xe1, 0x3e, 0xd0, 0x4c, 0x78, 0x6f, 0xeb, 0xd8, 0xb0, 0xef, 0x5d, 0x5e, 0x99, 0x95, 0x97, 0x57, 0x66, 0xe5, 0xd5, 0x95, 0x59, 0x79, 0x91, 0x98, 0xc6, 0x65, 0x62, 0x1a, 0x2f, 0x13, 0xd3, 0x78, 0x95, 0x98, 0xc6, 0x5f, 0x89, 0x69, 0xfc, 0xf2, 0xb7, 0x59, 0xf9, 0x76, 0xbf, 0xec, 0x7f, 0xcc, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x0f, 0x42, 0xd2, 0x33, 0xde, 0x08, 0x00, 0x00, } func (m *Eviction) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Eviction) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *Eviction) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.DeleteOptions != nil { { size, err := m.DeleteOptions.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 } { size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa return len(dAtA) - i, nil } func (m *PodDisruptionBudget) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *PodDisruptionBudget) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *PodDisruptionBudget) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l { size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a { size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 { size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa return len(dAtA) - i, nil } func (m *PodDisruptionBudgetList) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *PodDisruptionBudgetList) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *PodDisruptionBudgetList) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.Items) > 0 { for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 } } { size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa return len(dAtA) - i, nil } func (m *PodDisruptionBudgetSpec) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *PodDisruptionBudgetSpec) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *PodDisruptionBudgetSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.UnhealthyPodEvictionPolicy != nil { i -= len(*m.UnhealthyPodEvictionPolicy) copy(dAtA[i:], *m.UnhealthyPodEvictionPolicy) i = encodeVarintGenerated(dAtA, i, uint64(len(*m.UnhealthyPodEvictionPolicy))) i-- dAtA[i] = 0x22 } if m.MaxUnavailable != nil { { size, err := m.MaxUnavailable.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a } if m.Selector != nil { { size, err := m.Selector.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 } if m.MinAvailable != nil { { size, err := m.MinAvailable.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *PodDisruptionBudgetStatus) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *PodDisruptionBudgetStatus) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *PodDisruptionBudgetStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.Conditions) > 0 { for iNdEx := len(m.Conditions) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.Conditions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x3a } } i = encodeVarintGenerated(dAtA, i, uint64(m.ExpectedPods)) i-- dAtA[i] = 0x30 i = encodeVarintGenerated(dAtA, i, uint64(m.DesiredHealthy)) i-- dAtA[i] = 0x28 i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentHealthy)) i-- dAtA[i] = 0x20 i = encodeVarintGenerated(dAtA, i, uint64(m.DisruptionsAllowed)) i-- dAtA[i] = 0x18 if len(m.DisruptedPods) > 0 { keysForDisruptedPods := make([]string, 0, len(m.DisruptedPods)) for k := range m.DisruptedPods { keysForDisruptedPods = append(keysForDisruptedPods, string(k)) } github_com_gogo_protobuf_sortkeys.Strings(keysForDisruptedPods) for iNdEx := len(keysForDisruptedPods) - 1; iNdEx >= 0; iNdEx-- { v := m.DisruptedPods[string(keysForDisruptedPods[iNdEx])] baseI := i { size, err := (&v).MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 i -= len(keysForDisruptedPods[iNdEx]) copy(dAtA[i:], keysForDisruptedPods[iNdEx]) i = encodeVarintGenerated(dAtA, i, uint64(len(keysForDisruptedPods[iNdEx]))) i-- dAtA[i] = 0xa i = encodeVarintGenerated(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x12 } } i = encodeVarintGenerated(dAtA, i, uint64(m.ObservedGeneration)) i-- dAtA[i] = 0x8 return len(dAtA) - i, nil } func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { offset -= sovGenerated(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return base } func (m *Eviction) Size() (n int) { if m == nil { return 0 } var l int _ = l l = m.ObjectMeta.Size() n += 1 + l + sovGenerated(uint64(l)) if m.DeleteOptions != nil { l = m.DeleteOptions.Size() n += 1 + l + sovGenerated(uint64(l)) } return n } func (m *PodDisruptionBudget) Size() (n int) { if m == nil { return 0 } var l int _ = l l = m.ObjectMeta.Size() n += 1 + l + sovGenerated(uint64(l)) l = m.Spec.Size() n += 1 + l + sovGenerated(uint64(l)) l = m.Status.Size() n += 1 + l + sovGenerated(uint64(l)) return n } func (m *PodDisruptionBudgetList) Size() (n int) { if m == nil { return 0 } var l int _ = l l = m.ListMeta.Size() n += 1 + l + sovGenerated(uint64(l)) if len(m.Items) > 0 { for _, e := range m.Items { l = e.Size() n += 1 + l + sovGenerated(uint64(l)) } } return n } func (m *PodDisruptionBudgetSpec) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.MinAvailable != nil { l = m.MinAvailable.Size() n += 1 + l + sovGenerated(uint64(l)) } if m.Selector != nil { l = m.Selector.Size() n += 1 + l + sovGenerated(uint64(l)) } if m.MaxUnavailable != nil { l = m.MaxUnavailable.Size() n += 1 + l + sovGenerated(uint64(l)) } if m.UnhealthyPodEvictionPolicy != nil { l = len(*m.UnhealthyPodEvictionPolicy) n += 1 + l + sovGenerated(uint64(l)) } return n } func (m *PodDisruptionBudgetStatus) Size() (n int) { if m == nil { return 0 } var l int _ = l n += 1 + sovGenerated(uint64(m.ObservedGeneration)) if len(m.DisruptedPods) > 0 { for k, v := range m.DisruptedPods { _ = k _ = v l = v.Size() mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l)) n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) } } n += 1 + sovGenerated(uint64(m.DisruptionsAllowed)) n += 1 + sovGenerated(uint64(m.CurrentHealthy)) n += 1 + sovGenerated(uint64(m.DesiredHealthy)) n += 1 + sovGenerated(uint64(m.ExpectedPods)) if len(m.Conditions) > 0 { for _, e := range m.Conditions { l = e.Size() n += 1 + l + sovGenerated(uint64(l)) } } return n } func sovGenerated(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } func sozGenerated(x uint64) (n int) { return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (this *Eviction) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&Eviction{`, `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `DeleteOptions:` + strings.Replace(fmt.Sprintf("%v", this.DeleteOptions), "DeleteOptions", "v1.DeleteOptions", 1) + `,`, `}`, }, "") return s } func (this *PodDisruptionBudget) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&PodDisruptionBudget{`, `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PodDisruptionBudgetSpec", "PodDisruptionBudgetSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "PodDisruptionBudgetStatus", "PodDisruptionBudgetStatus", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } func (this *PodDisruptionBudgetList) String() string { if this == nil { return "nil" } repeatedStringForItems := "[]PodDisruptionBudget{" for _, f := range this.Items { repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "PodDisruptionBudget", "PodDisruptionBudget", 1), `&`, ``, 1) + "," } repeatedStringForItems += "}" s := strings.Join([]string{`&PodDisruptionBudgetList{`, `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, `Items:` + repeatedStringForItems + `,`, `}`, }, "") return s } func (this *PodDisruptionBudgetSpec) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&PodDisruptionBudgetSpec{`, `MinAvailable:` + strings.Replace(fmt.Sprintf("%v", this.MinAvailable), "IntOrString", "intstr.IntOrString", 1) + `,`, `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "v1.LabelSelector", 1) + `,`, `MaxUnavailable:` + strings.Replace(fmt.Sprintf("%v", this.MaxUnavailable), "IntOrString", "intstr.IntOrString", 1) + `,`, `UnhealthyPodEvictionPolicy:` + valueToStringGenerated(this.UnhealthyPodEvictionPolicy) + `,`, `}`, }, "") return s } func (this *PodDisruptionBudgetStatus) String() string { if this == nil { return "nil" } repeatedStringForConditions := "[]Condition{" for _, f := range this.Conditions { repeatedStringForConditions += fmt.Sprintf("%v", f) + "," } repeatedStringForConditions += "}" keysForDisruptedPods := make([]string, 0, len(this.DisruptedPods)) for k := range this.DisruptedPods { keysForDisruptedPods = append(keysForDisruptedPods, k) } github_com_gogo_protobuf_sortkeys.Strings(keysForDisruptedPods) mapStringForDisruptedPods := "map[string]v1.Time{" for _, k := range keysForDisruptedPods { mapStringForDisruptedPods += fmt.Sprintf("%v: %v,", k, this.DisruptedPods[k]) } mapStringForDisruptedPods += "}" s := strings.Join([]string{`&PodDisruptionBudgetStatus{`, `ObservedGeneration:` + fmt.Sprintf("%v", this.ObservedGeneration) + `,`, `DisruptedPods:` + mapStringForDisruptedPods + `,`, `DisruptionsAllowed:` + fmt.Sprintf("%v", this.DisruptionsAllowed) + `,`, `CurrentHealthy:` + fmt.Sprintf("%v", this.CurrentHealthy) + `,`, `DesiredHealthy:` + fmt.Sprintf("%v", this.DesiredHealthy) + `,`, `ExpectedPods:` + fmt.Sprintf("%v", this.ExpectedPods) + `,`, `Conditions:` + repeatedStringForConditions + `,`, `}`, }, "") return s } func valueToStringGenerated(v interface{}) string { rv := reflect.ValueOf(v) if rv.IsNil() { return "nil" } pv := reflect.Indirect(rv).Interface() return fmt.Sprintf("*%v", pv) } func (m *Eviction) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Eviction: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Eviction: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DeleteOptions", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } if m.DeleteOptions == nil { m.DeleteOptions = &v1.DeleteOptions{} } if err := m.DeleteOptions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthGenerated } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *PodDisruptionBudget) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: PodDisruptionBudget: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: PodDisruptionBudget: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthGenerated } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *PodDisruptionBudgetList) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: PodDisruptionBudgetList: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: PodDisruptionBudgetList: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } m.Items = append(m.Items, PodDisruptionBudget{}) if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) if err != nil { return err }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
true
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/policy/v1beta1/types_swagger_doc_generated.go
vendor/k8s.io/api/policy/v1beta1/types_swagger_doc_generated.go
/* Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package v1beta1 // This file contains a collection of methods that can be used from go-restful to // generate Swagger API documentation for its models. Please read this PR for more // information on the implementation: https://github.com/emicklei/go-restful/pull/215 // // TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if // they are on one line! For multiple line or blocks that you want to ignore use ---. // Any context after a --- is ignored. // // Those methods can be generated by using hack/update-codegen.sh // AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. var map_Eviction = map[string]string{ "": "Eviction evicts a pod from its node subject to certain policies and safety constraints. This is a subresource of Pod. A request to cause such an eviction is created by POSTing to .../pods/<pod name>/evictions.", "metadata": "ObjectMeta describes the pod that is being evicted.", "deleteOptions": "DeleteOptions may be provided", } func (Eviction) SwaggerDoc() map[string]string { return map_Eviction } var map_PodDisruptionBudget = map[string]string{ "": "PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods", "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "spec": "Specification of the desired behavior of the PodDisruptionBudget.", "status": "Most recently observed status of the PodDisruptionBudget.", } func (PodDisruptionBudget) SwaggerDoc() map[string]string { return map_PodDisruptionBudget } var map_PodDisruptionBudgetList = map[string]string{ "": "PodDisruptionBudgetList is a collection of PodDisruptionBudgets.", "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "items": "items list individual PodDisruptionBudget objects", } func (PodDisruptionBudgetList) SwaggerDoc() map[string]string { return map_PodDisruptionBudgetList } var map_PodDisruptionBudgetSpec = map[string]string{ "": "PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.", "minAvailable": "An eviction is allowed if at least \"minAvailable\" pods selected by \"selector\" will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying \"100%\".", "selector": "Label query over pods whose evictions are managed by the disruption budget. A null selector selects no pods. An empty selector ({}) also selects no pods, which differs from standard behavior of selecting all pods. In policy/v1, an empty selector will select all pods in the namespace.", "maxUnavailable": "An eviction is allowed if at most \"maxUnavailable\" pods selected by \"selector\" are unavailable after the eviction, i.e. even in absence of the evicted pod. For example, one can prevent all voluntary evictions by specifying 0. This is a mutually exclusive setting with \"minAvailable\".", "unhealthyPodEvictionPolicy": "UnhealthyPodEvictionPolicy defines the criteria for when unhealthy pods should be considered for eviction. Current implementation considers healthy pods, as pods that have status.conditions item with type=\"Ready\",status=\"True\".\n\nValid policies are IfHealthyBudget and AlwaysAllow. If no policy is specified, the default behavior will be used, which corresponds to the IfHealthyBudget policy.\n\nIfHealthyBudget policy means that running pods (status.phase=\"Running\"), but not yet healthy can be evicted only if the guarded application is not disrupted (status.currentHealthy is at least equal to status.desiredHealthy). Healthy pods will be subject to the PDB for eviction.\n\nAlwaysAllow policy means that all running pods (status.phase=\"Running\"), but not yet healthy are considered disrupted and can be evicted regardless of whether the criteria in a PDB is met. This means perspective running pods of a disrupted application might not get a chance to become healthy. Healthy pods will be subject to the PDB for eviction.\n\nAdditional policies may be added in the future. Clients making eviction decisions should disallow eviction of unhealthy pods if they encounter an unrecognized policy in this field.\n\nThis field is beta-level. The eviction API uses this field when the feature gate PDBUnhealthyPodEvictionPolicy is enabled (enabled by default).", } func (PodDisruptionBudgetSpec) SwaggerDoc() map[string]string { return map_PodDisruptionBudgetSpec } var map_PodDisruptionBudgetStatus = map[string]string{ "": "PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system.", "observedGeneration": "Most recent generation observed when updating this PDB status. DisruptionsAllowed and other status information is valid only if observedGeneration equals to PDB's object generation.", "disruptedPods": "DisruptedPods contains information about pods whose eviction was processed by the API server eviction subresource handler but has not yet been observed by the PodDisruptionBudget controller. A pod will be in this map from the time when the API server processed the eviction request to the time when the pod is seen by PDB controller as having been marked for deletion (or after a timeout). The key in the map is the name of the pod and the value is the time when the API server processed the eviction request. If the deletion didn't occur and a pod is still there it will be removed from the list automatically by PodDisruptionBudget controller after some time. If everything goes smooth this map should be empty for the most of the time. Large number of entries in the map may indicate problems with pod deletions.", "disruptionsAllowed": "Number of pod disruptions that are currently allowed.", "currentHealthy": "current number of healthy pods", "desiredHealthy": "minimum desired number of healthy pods", "expectedPods": "total number of pods counted by this disruption budget", "conditions": "Conditions contain conditions for PDB. The disruption controller sets the DisruptionAllowed condition. The following are known values for the reason field (additional reasons could be added in the future): - SyncFailed: The controller encountered an error and wasn't able to compute\n the number of allowed disruptions. Therefore no disruptions are\n allowed and the status of the condition will be False.\n- InsufficientPods: The number of pods are either at or below the number\n required by the PodDisruptionBudget. No disruptions are\n allowed and the status of the condition will be False.\n- SufficientPods: There are more pods than required by the PodDisruptionBudget.\n The condition will be True, and the number of allowed\n disruptions are provided by the disruptionsAllowed property.", } func (PodDisruptionBudgetStatus) SwaggerDoc() map[string]string { return map_PodDisruptionBudgetStatus } // AUTO-GENERATED FUNCTIONS END HERE
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/policy/v1beta1/zz_generated.deepcopy.go
vendor/k8s.io/api/policy/v1beta1/zz_generated.deepcopy.go
//go:build !ignore_autogenerated // +build !ignore_autogenerated /* Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Code generated by deepcopy-gen. DO NOT EDIT. package v1beta1 import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" intstr "k8s.io/apimachinery/pkg/util/intstr" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Eviction) DeepCopyInto(out *Eviction) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) if in.DeleteOptions != nil { in, out := &in.DeleteOptions, &out.DeleteOptions *out = new(v1.DeleteOptions) (*in).DeepCopyInto(*out) } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Eviction. func (in *Eviction) DeepCopy() *Eviction { if in == nil { return nil } out := new(Eviction) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. func (in *Eviction) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PodDisruptionBudget) DeepCopyInto(out *PodDisruptionBudget) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.Spec.DeepCopyInto(&out.Spec) in.Status.DeepCopyInto(&out.Status) return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodDisruptionBudget. func (in *PodDisruptionBudget) DeepCopy() *PodDisruptionBudget { if in == nil { return nil } out := new(PodDisruptionBudget) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. func (in *PodDisruptionBudget) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PodDisruptionBudgetList) DeepCopyInto(out *PodDisruptionBudgetList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items *out = make([]PodDisruptionBudget, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodDisruptionBudgetList. func (in *PodDisruptionBudgetList) DeepCopy() *PodDisruptionBudgetList { if in == nil { return nil } out := new(PodDisruptionBudgetList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. func (in *PodDisruptionBudgetList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } return nil } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PodDisruptionBudgetSpec) DeepCopyInto(out *PodDisruptionBudgetSpec) { *out = *in if in.MinAvailable != nil { in, out := &in.MinAvailable, &out.MinAvailable *out = new(intstr.IntOrString) **out = **in } if in.Selector != nil { in, out := &in.Selector, &out.Selector *out = new(v1.LabelSelector) (*in).DeepCopyInto(*out) } if in.MaxUnavailable != nil { in, out := &in.MaxUnavailable, &out.MaxUnavailable *out = new(intstr.IntOrString) **out = **in } if in.UnhealthyPodEvictionPolicy != nil { in, out := &in.UnhealthyPodEvictionPolicy, &out.UnhealthyPodEvictionPolicy *out = new(UnhealthyPodEvictionPolicyType) **out = **in } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodDisruptionBudgetSpec. func (in *PodDisruptionBudgetSpec) DeepCopy() *PodDisruptionBudgetSpec { if in == nil { return nil } out := new(PodDisruptionBudgetSpec) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PodDisruptionBudgetStatus) DeepCopyInto(out *PodDisruptionBudgetStatus) { *out = *in if in.DisruptedPods != nil { in, out := &in.DisruptedPods, &out.DisruptedPods *out = make(map[string]v1.Time, len(*in)) for key, val := range *in { (*out)[key] = *val.DeepCopy() } } if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions *out = make([]v1.Condition, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } return } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodDisruptionBudgetStatus. func (in *PodDisruptionBudgetStatus) DeepCopy() *PodDisruptionBudgetStatus { if in == nil { return nil } out := new(PodDisruptionBudgetStatus) in.DeepCopyInto(out) return out }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/policy/v1beta1/types.go
vendor/k8s.io/api/policy/v1beta1/types.go
/* Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package v1beta1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/intstr" ) // PodDisruptionBudgetSpec is a description of a PodDisruptionBudget. type PodDisruptionBudgetSpec struct { // An eviction is allowed if at least "minAvailable" pods selected by // "selector" will still be available after the eviction, i.e. even in the // absence of the evicted pod. So for example you can prevent all voluntary // evictions by specifying "100%". // +optional MinAvailable *intstr.IntOrString `json:"minAvailable,omitempty" protobuf:"bytes,1,opt,name=minAvailable"` // Label query over pods whose evictions are managed by the disruption // budget. // A null selector selects no pods. // An empty selector ({}) also selects no pods, which differs from standard behavior of selecting all pods. // In policy/v1, an empty selector will select all pods in the namespace. // +optional Selector *metav1.LabelSelector `json:"selector,omitempty" protobuf:"bytes,2,opt,name=selector"` // An eviction is allowed if at most "maxUnavailable" pods selected by // "selector" are unavailable after the eviction, i.e. even in absence of // the evicted pod. For example, one can prevent all voluntary evictions // by specifying 0. This is a mutually exclusive setting with "minAvailable". // +optional MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty" protobuf:"bytes,3,opt,name=maxUnavailable"` // UnhealthyPodEvictionPolicy defines the criteria for when unhealthy pods // should be considered for eviction. Current implementation considers healthy pods, // as pods that have status.conditions item with type="Ready",status="True". // // Valid policies are IfHealthyBudget and AlwaysAllow. // If no policy is specified, the default behavior will be used, // which corresponds to the IfHealthyBudget policy. // // IfHealthyBudget policy means that running pods (status.phase="Running"), // but not yet healthy can be evicted only if the guarded application is not // disrupted (status.currentHealthy is at least equal to status.desiredHealthy). // Healthy pods will be subject to the PDB for eviction. // // AlwaysAllow policy means that all running pods (status.phase="Running"), // but not yet healthy are considered disrupted and can be evicted regardless // of whether the criteria in a PDB is met. This means perspective running // pods of a disrupted application might not get a chance to become healthy. // Healthy pods will be subject to the PDB for eviction. // // Additional policies may be added in the future. // Clients making eviction decisions should disallow eviction of unhealthy pods // if they encounter an unrecognized policy in this field. // // This field is beta-level. The eviction API uses this field when // the feature gate PDBUnhealthyPodEvictionPolicy is enabled (enabled by default). // +optional UnhealthyPodEvictionPolicy *UnhealthyPodEvictionPolicyType `json:"unhealthyPodEvictionPolicy,omitempty" protobuf:"bytes,4,opt,name=unhealthyPodEvictionPolicy"` } // UnhealthyPodEvictionPolicyType defines the criteria for when unhealthy pods // should be considered for eviction. // +enum type UnhealthyPodEvictionPolicyType string const ( // IfHealthyBudget policy means that running pods (status.phase="Running"), // but not yet healthy can be evicted only if the guarded application is not // disrupted (status.currentHealthy is at least equal to status.desiredHealthy). // Healthy pods will be subject to the PDB for eviction. IfHealthyBudget UnhealthyPodEvictionPolicyType = "IfHealthyBudget" // AlwaysAllow policy means that all running pods (status.phase="Running"), // but not yet healthy are considered disrupted and can be evicted regardless // of whether the criteria in a PDB is met. This means perspective running // pods of a disrupted application might not get a chance to become healthy. // Healthy pods will be subject to the PDB for eviction. AlwaysAllow UnhealthyPodEvictionPolicyType = "AlwaysAllow" ) // PodDisruptionBudgetStatus represents information about the status of a // PodDisruptionBudget. Status may trail the actual state of a system. type PodDisruptionBudgetStatus struct { // Most recent generation observed when updating this PDB status. DisruptionsAllowed and other // status information is valid only if observedGeneration equals to PDB's object generation. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,1,opt,name=observedGeneration"` // DisruptedPods contains information about pods whose eviction was // processed by the API server eviction subresource handler but has not // yet been observed by the PodDisruptionBudget controller. // A pod will be in this map from the time when the API server processed the // eviction request to the time when the pod is seen by PDB controller // as having been marked for deletion (or after a timeout). The key in the map is the name of the pod // and the value is the time when the API server processed the eviction request. If // the deletion didn't occur and a pod is still there it will be removed from // the list automatically by PodDisruptionBudget controller after some time. // If everything goes smooth this map should be empty for the most of the time. // Large number of entries in the map may indicate problems with pod deletions. // +optional DisruptedPods map[string]metav1.Time `json:"disruptedPods,omitempty" protobuf:"bytes,2,rep,name=disruptedPods"` // Number of pod disruptions that are currently allowed. DisruptionsAllowed int32 `json:"disruptionsAllowed" protobuf:"varint,3,opt,name=disruptionsAllowed"` // current number of healthy pods CurrentHealthy int32 `json:"currentHealthy" protobuf:"varint,4,opt,name=currentHealthy"` // minimum desired number of healthy pods DesiredHealthy int32 `json:"desiredHealthy" protobuf:"varint,5,opt,name=desiredHealthy"` // total number of pods counted by this disruption budget ExpectedPods int32 `json:"expectedPods" protobuf:"varint,6,opt,name=expectedPods"` // Conditions contain conditions for PDB. The disruption controller sets the // DisruptionAllowed condition. The following are known values for the reason field // (additional reasons could be added in the future): // - SyncFailed: The controller encountered an error and wasn't able to compute // the number of allowed disruptions. Therefore no disruptions are // allowed and the status of the condition will be False. // - InsufficientPods: The number of pods are either at or below the number // required by the PodDisruptionBudget. No disruptions are // allowed and the status of the condition will be False. // - SufficientPods: There are more pods than required by the PodDisruptionBudget. // The condition will be True, and the number of allowed // disruptions are provided by the disruptionsAllowed property. // // +optional // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,7,rep,name=conditions"` } const ( // DisruptionAllowedCondition is a condition set by the disruption controller // that signal whether any of the pods covered by the PDB can be disrupted. DisruptionAllowedCondition = "DisruptionAllowed" // SyncFailedReason is set on the DisruptionAllowed condition if reconcile // of the PDB failed and therefore disruption of pods are not allowed. SyncFailedReason = "SyncFailed" // SufficientPodsReason is set on the DisruptionAllowed condition if there are // more pods covered by the PDB than required and at least one can be disrupted. SufficientPodsReason = "SufficientPods" // InsufficientPodsReason is set on the DisruptionAllowed condition if the number // of pods are equal to or fewer than required by the PDB. InsufficientPodsReason = "InsufficientPods" ) // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.5 // +k8s:prerelease-lifecycle-gen:deprecated=1.21 // +k8s:prerelease-lifecycle-gen:removed=1.25 // +k8s:prerelease-lifecycle-gen:replacement=policy,v1,PodDisruptionBudget // PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods type PodDisruptionBudget struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Specification of the desired behavior of the PodDisruptionBudget. // +optional Spec PodDisruptionBudgetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` // Most recently observed status of the PodDisruptionBudget. // +optional Status PodDisruptionBudgetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.5 // +k8s:prerelease-lifecycle-gen:deprecated=1.21 // +k8s:prerelease-lifecycle-gen:removed=1.25 // +k8s:prerelease-lifecycle-gen:replacement=policy,v1,PodDisruptionBudgetList // PodDisruptionBudgetList is a collection of PodDisruptionBudgets. type PodDisruptionBudgetList struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // items list individual PodDisruptionBudget objects Items []PodDisruptionBudget `json:"items" protobuf:"bytes,2,rep,name=items"` } // +genclient // +genclient:noVerbs // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:prerelease-lifecycle-gen:introduced=1.5 // +k8s:prerelease-lifecycle-gen:deprecated=1.22 // Eviction evicts a pod from its node subject to certain policies and safety constraints. // This is a subresource of Pod. A request to cause such an eviction is // created by POSTing to .../pods/<pod name>/evictions. type Eviction struct { metav1.TypeMeta `json:",inline"` // ObjectMeta describes the pod that is being evicted. // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // DeleteOptions may be provided // +optional DeleteOptions *metav1.DeleteOptions `json:"deleteOptions,omitempty" protobuf:"bytes,2,opt,name=deleteOptions"` }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/policy/v1beta1/register.go
vendor/k8s.io/api/policy/v1beta1/register.go
/* Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package v1beta1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" ) // GroupName is the group name use in this package const GroupName = "policy" // SchemeGroupVersion is group version used to register these objects var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"} // Resource takes an unqualified resource and returns a Group qualified GroupResource func Resource(resource string) schema.GroupResource { return SchemeGroupVersion.WithResource(resource).GroupResource() } var ( // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api. // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes. SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) localSchemeBuilder = &SchemeBuilder AddToScheme = localSchemeBuilder.AddToScheme ) // Adds the list of known types to the given scheme. func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &PodDisruptionBudget{}, &PodDisruptionBudgetList{}, &Eviction{}, ) // Add the watch version that applies metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/policy/v1beta1/zz_generated.prerelease-lifecycle.go
vendor/k8s.io/api/policy/v1beta1/zz_generated.prerelease-lifecycle.go
//go:build !ignore_autogenerated // +build !ignore_autogenerated /* Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Code generated by prerelease-lifecycle-gen. DO NOT EDIT. package v1beta1 import ( schema "k8s.io/apimachinery/pkg/runtime/schema" ) // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *Eviction) APILifecycleIntroduced() (major, minor int) { return 1, 5 } // APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. func (in *Eviction) APILifecycleDeprecated() (major, minor int) { return 1, 22 } // APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. func (in *Eviction) APILifecycleRemoved() (major, minor int) { return 1, 25 } // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *PodDisruptionBudget) APILifecycleIntroduced() (major, minor int) { return 1, 5 } // APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. func (in *PodDisruptionBudget) APILifecycleDeprecated() (major, minor int) { return 1, 21 } // APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. // It is controlled by "k8s:prerelease-lifecycle-gen:replacement=<group>,<version>,<kind>" tags in types.go. func (in *PodDisruptionBudget) APILifecycleReplacement() schema.GroupVersionKind { return schema.GroupVersionKind{Group: "policy", Version: "v1", Kind: "PodDisruptionBudget"} } // APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. func (in *PodDisruptionBudget) APILifecycleRemoved() (major, minor int) { return 1, 25 } // APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. func (in *PodDisruptionBudgetList) APILifecycleIntroduced() (major, minor int) { return 1, 5 } // APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. func (in *PodDisruptionBudgetList) APILifecycleDeprecated() (major, minor int) { return 1, 21 } // APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. // It is controlled by "k8s:prerelease-lifecycle-gen:replacement=<group>,<version>,<kind>" tags in types.go. func (in *PodDisruptionBudgetList) APILifecycleReplacement() schema.GroupVersionKind { return schema.GroupVersionKind{Group: "policy", Version: "v1", Kind: "PodDisruptionBudgetList"} } // APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. // It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. func (in *PodDisruptionBudgetList) APILifecycleRemoved() (major, minor int) { return 1, 25 }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/policy/v1beta1/doc.go
vendor/k8s.io/api/policy/v1beta1/doc.go
/* Copyright 2016 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // +k8s:deepcopy-gen=package // +k8s:protobuf-gen=package // +k8s:openapi-gen=true // +k8s:prerelease-lifecycle-gen=true // Package policy is for any kind of policy object. Suitable examples, even if // they aren't all here, are PodDisruptionBudget, // NetworkPolicy, etc. package v1beta1 // import "k8s.io/api/policy/v1beta1"
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/api/policy/v1beta1/generated.pb.go
vendor/k8s.io/api/policy/v1beta1/generated.pb.go
/* Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: k8s.io/api/policy/v1beta1/generated.proto package v1beta1 import ( fmt "fmt" io "io" proto "github.com/gogo/protobuf/proto" github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" math "math" math_bits "math/bits" reflect "reflect" strings "strings" intstr "k8s.io/apimachinery/pkg/util/intstr" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func (m *Eviction) Reset() { *m = Eviction{} } func (*Eviction) ProtoMessage() {} func (*Eviction) Descriptor() ([]byte, []int) { return fileDescriptor_68b366237812cc96, []int{0} } func (m *Eviction) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *Eviction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *Eviction) XXX_Merge(src proto.Message) { xxx_messageInfo_Eviction.Merge(m, src) } func (m *Eviction) XXX_Size() int { return m.Size() } func (m *Eviction) XXX_DiscardUnknown() { xxx_messageInfo_Eviction.DiscardUnknown(m) } var xxx_messageInfo_Eviction proto.InternalMessageInfo func (m *PodDisruptionBudget) Reset() { *m = PodDisruptionBudget{} } func (*PodDisruptionBudget) ProtoMessage() {} func (*PodDisruptionBudget) Descriptor() ([]byte, []int) { return fileDescriptor_68b366237812cc96, []int{1} } func (m *PodDisruptionBudget) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *PodDisruptionBudget) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *PodDisruptionBudget) XXX_Merge(src proto.Message) { xxx_messageInfo_PodDisruptionBudget.Merge(m, src) } func (m *PodDisruptionBudget) XXX_Size() int { return m.Size() } func (m *PodDisruptionBudget) XXX_DiscardUnknown() { xxx_messageInfo_PodDisruptionBudget.DiscardUnknown(m) } var xxx_messageInfo_PodDisruptionBudget proto.InternalMessageInfo func (m *PodDisruptionBudgetList) Reset() { *m = PodDisruptionBudgetList{} } func (*PodDisruptionBudgetList) ProtoMessage() {} func (*PodDisruptionBudgetList) Descriptor() ([]byte, []int) { return fileDescriptor_68b366237812cc96, []int{2} } func (m *PodDisruptionBudgetList) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *PodDisruptionBudgetList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *PodDisruptionBudgetList) XXX_Merge(src proto.Message) { xxx_messageInfo_PodDisruptionBudgetList.Merge(m, src) } func (m *PodDisruptionBudgetList) XXX_Size() int { return m.Size() } func (m *PodDisruptionBudgetList) XXX_DiscardUnknown() { xxx_messageInfo_PodDisruptionBudgetList.DiscardUnknown(m) } var xxx_messageInfo_PodDisruptionBudgetList proto.InternalMessageInfo func (m *PodDisruptionBudgetSpec) Reset() { *m = PodDisruptionBudgetSpec{} } func (*PodDisruptionBudgetSpec) ProtoMessage() {} func (*PodDisruptionBudgetSpec) Descriptor() ([]byte, []int) { return fileDescriptor_68b366237812cc96, []int{3} } func (m *PodDisruptionBudgetSpec) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *PodDisruptionBudgetSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *PodDisruptionBudgetSpec) XXX_Merge(src proto.Message) { xxx_messageInfo_PodDisruptionBudgetSpec.Merge(m, src) } func (m *PodDisruptionBudgetSpec) XXX_Size() int { return m.Size() } func (m *PodDisruptionBudgetSpec) XXX_DiscardUnknown() { xxx_messageInfo_PodDisruptionBudgetSpec.DiscardUnknown(m) } var xxx_messageInfo_PodDisruptionBudgetSpec proto.InternalMessageInfo func (m *PodDisruptionBudgetStatus) Reset() { *m = PodDisruptionBudgetStatus{} } func (*PodDisruptionBudgetStatus) ProtoMessage() {} func (*PodDisruptionBudgetStatus) Descriptor() ([]byte, []int) { return fileDescriptor_68b366237812cc96, []int{4} } func (m *PodDisruptionBudgetStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *PodDisruptionBudgetStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } func (m *PodDisruptionBudgetStatus) XXX_Merge(src proto.Message) { xxx_messageInfo_PodDisruptionBudgetStatus.Merge(m, src) } func (m *PodDisruptionBudgetStatus) XXX_Size() int { return m.Size() } func (m *PodDisruptionBudgetStatus) XXX_DiscardUnknown() { xxx_messageInfo_PodDisruptionBudgetStatus.DiscardUnknown(m) } var xxx_messageInfo_PodDisruptionBudgetStatus proto.InternalMessageInfo func init() { proto.RegisterType((*Eviction)(nil), "k8s.io.api.policy.v1beta1.Eviction") proto.RegisterType((*PodDisruptionBudget)(nil), "k8s.io.api.policy.v1beta1.PodDisruptionBudget") proto.RegisterType((*PodDisruptionBudgetList)(nil), "k8s.io.api.policy.v1beta1.PodDisruptionBudgetList") proto.RegisterType((*PodDisruptionBudgetSpec)(nil), "k8s.io.api.policy.v1beta1.PodDisruptionBudgetSpec") proto.RegisterType((*PodDisruptionBudgetStatus)(nil), "k8s.io.api.policy.v1beta1.PodDisruptionBudgetStatus") proto.RegisterMapType((map[string]v1.Time)(nil), "k8s.io.api.policy.v1beta1.PodDisruptionBudgetStatus.DisruptedPodsEntry") } func init() { proto.RegisterFile("k8s.io/api/policy/v1beta1/generated.proto", fileDescriptor_68b366237812cc96) } var fileDescriptor_68b366237812cc96 = []byte{ // 843 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x96, 0x4d, 0x8f, 0xdb, 0x44, 0x18, 0xc7, 0xe3, 0xcd, 0x66, 0xd9, 0x0e, 0x49, 0xb4, 0x0c, 0x6f, 0xbb, 0x39, 0x38, 0x55, 0x4e, 0x05, 0x89, 0x31, 0xdb, 0x56, 0x68, 0xc5, 0x01, 0x5a, 0x37, 0xab, 0x52, 0xd4, 0xd5, 0xae, 0x26, 0xdb, 0x0b, 0x2a, 0x12, 0x13, 0xfb, 0xa9, 0x33, 0xc4, 0xf6, 0x58, 0x9e, 0x71, 0x68, 0x6e, 0x3d, 0xf0, 0x01, 0xf8, 0x1e, 0x7c, 0x10, 0xf6, 0xc0, 0xa1, 0xdc, 0x2a, 0x0e, 0x11, 0x6b, 0xbe, 0x05, 0x27, 0xe4, 0xb1, 0xf3, 0xe2, 0xbc, 0xd0, 0xb4, 0x07, 0x6e, 0x9e, 0x67, 0x9e, 0xff, 0xef, 0x99, 0xe7, 0x65, 0x26, 0x41, 0x9f, 0x0c, 0x4f, 0x24, 0xe1, 0xc2, 0x62, 0x11, 0xb7, 0x22, 0xe1, 0x73, 0x67, 0x6c, 0x8d, 0x8e, 0xfb, 0xa0, 0xd8, 0xb1, 0xe5, 0x41, 0x08, 0x31, 0x53, 0xe0, 0x92, 0x28, 0x16, 0x4a, 0xe0, 0xa3, 0xdc, 0x95, 0xb0, 0x88, 0x93, 0xdc, 0x95, 0x14, 0xae, 0xad, 0xcf, 0x3c, 0xae, 0x06, 0x49, 0x9f, 0x38, 0x22, 0xb0, 0x3c, 0xe1, 0x09, 0x4b, 0x2b, 0xfa, 0xc9, 0x33, 0xbd, 0xd2, 0x0b, 0xfd, 0x95, 0x93, 0x5a, 0x77, 0xe7, 0x41, 0x03, 0xe6, 0x0c, 0x78, 0x08, 0xf1, 0xd8, 0x8a, 0x86, 0x5e, 0x66, 0x90, 0x56, 0x00, 0x8a, 0x59, 0xa3, 0x95, 0xf8, 0x2d, 0x6b, 0x93, 0x2a, 0x4e, 0x42, 0xc5, 0x03, 0x58, 0x11, 0x7c, 0xf1, 0x3a, 0x81, 0x74, 0x06, 0x10, 0xb0, 0x15, 0xdd, 0x9d, 0x4d, 0xba, 0x44, 0x71, 0xdf, 0xe2, 0xa1, 0x92, 0x2a, 0x5e, 0x16, 0x75, 0xfe, 0x34, 0xd0, 0xfe, 0xe9, 0x88, 0x3b, 0x8a, 0x8b, 0x10, 0xff, 0x80, 0xf6, 0xb3, 0x2c, 0x5c, 0xa6, 0xd8, 0xa1, 0x71, 0xd3, 0xb8, 0xf5, 0xee, 0xed, 0xcf, 0xc9, 0xbc, 0x7a, 0x33, 0x28, 0x89, 0x86, 0x5e, 0x66, 0x90, 0x24, 0xf3, 0x26, 0xa3, 0x63, 0x72, 0xde, 0xff, 0x11, 0x1c, 0x75, 0x06, 0x8a, 0xd9, 0xf8, 0x6a, 0xd2, 0xae, 0xa4, 0x93, 0x36, 0x9a, 0xdb, 0xe8, 0x8c, 0x8a, 0x7d, 0xd4, 0x70, 0xc1, 0x07, 0x05, 0xe7, 0x51, 0x16, 0x51, 0x1e, 0xee, 0xe8, 0x30, 0x77, 0xb6, 0x0b, 0xd3, 0x5d, 0x94, 0xda, 0xef, 0xa5, 0x93, 0x76, 0xa3, 0x64, 0xa2, 0x65, 0x78, 0xe7, 0xd7, 0x1d, 0xf4, 0xfe, 0x85, 0x70, 0xbb, 0x5c, 0xc6, 0x89, 0x36, 0xd9, 0x89, 0xeb, 0x81, 0xfa, 0x1f, 0xf2, 0xbc, 0x44, 0xbb, 0x32, 0x02, 0xa7, 0x48, 0xef, 0x36, 0xd9, 0x38, 0x83, 0x64, 0xcd, 0xf9, 0x7a, 0x11, 0x38, 0x76, 0xbd, 0xe0, 0xef, 0x66, 0x2b, 0xaa, 0x69, 0xf8, 0x29, 0xda, 0x93, 0x8a, 0xa9, 0x44, 0x1e, 0x56, 0x35, 0xf7, 0xee, 0x1b, 0x72, 0xb5, 0xd6, 0x6e, 0x16, 0xe4, 0xbd, 0x7c, 0x4d, 0x0b, 0x66, 0xe7, 0x77, 0x03, 0x7d, 0xbc, 0x46, 0xf5, 0x98, 0x4b, 0x85, 0x9f, 0xae, 0x54, 0x8c, 0x6c, 0x57, 0xb1, 0x4c, 0xad, 0xeb, 0x75, 0x50, 0x44, 0xdd, 0x9f, 0x5a, 0x16, 0xaa, 0xd5, 0x43, 0x35, 0xae, 0x20, 0xc8, 0xa6, 0xa1, 0xba, 0x84, 0xde, 0x22, 0x2d, 0xbb, 0x51, 0xa0, 0x6b, 0x8f, 0x32, 0x08, 0xcd, 0x59, 0x9d, 0x3f, 0xaa, 0x6b, 0xd3, 0xc9, 0xca, 0x89, 0x9f, 0xa1, 0x7a, 0xc0, 0xc3, 0xfb, 0x23, 0xc6, 0x7d, 0xd6, 0xf7, 0xe1, 0xb5, 0x43, 0x90, 0xdd, 0x20, 0x92, 0xdf, 0x20, 0xf2, 0x28, 0x54, 0xe7, 0x71, 0x4f, 0xc5, 0x3c, 0xf4, 0xec, 0x83, 0x74, 0xd2, 0xae, 0x9f, 0x2d, 0x90, 0x68, 0x89, 0x8b, 0xbf, 0x47, 0xfb, 0x12, 0x7c, 0x70, 0x94, 0x88, 0xdf, 0x6c, 0xd2, 0x1f, 0xb3, 0x3e, 0xf8, 0xbd, 0x42, 0x6a, 0xd7, 0xb3, 0xba, 0x4d, 0x57, 0x74, 0x86, 0xc4, 0x3e, 0x6a, 0x06, 0xec, 0xf9, 0x93, 0x90, 0xcd, 0x12, 0xa9, 0xbe, 0x65, 0x22, 0x38, 0x9d, 0xb4, 0x9b, 0x67, 0x25, 0x16, 0x5d, 0x62, 0xe3, 0x17, 0x06, 0x6a, 0x25, 0xe1, 0x00, 0x98, 0xaf, 0x06, 0xe3, 0x0b, 0xe1, 0x4e, 0x9f, 0x8d, 0x0b, 0xdd, 0xa1, 0xc3, 0xdd, 0x9b, 0xc6, 0xad, 0x1b, 0xf6, 0xbd, 0x74, 0xd2, 0x6e, 0x3d, 0xd9, 0xe8, 0xf5, 0xcf, 0xa4, 0x6d, 0x6e, 0xde, 0xbd, 0x1c, 0x47, 0x40, 0xff, 0x23, 0x46, 0xe7, 0xb7, 0x1a, 0x3a, 0xda, 0x38, 0xd8, 0xf8, 0x5b, 0x84, 0x45, 0x5f, 0x42, 0x3c, 0x02, 0xf7, 0x61, 0xfe, 0xcc, 0x71, 0x11, 0xea, 0xde, 0x56, 0xed, 0x56, 0x31, 0x23, 0xf8, 0x7c, 0xc5, 0x83, 0xae, 0x51, 0xe1, 0x9f, 0x0d, 0xd4, 0x70, 0xf3, 0x30, 0xe0, 0x5e, 0x08, 0x77, 0x3a, 0x9b, 0x0f, 0xdf, 0xe6, 0xca, 0x91, 0xee, 0x22, 0xe9, 0x34, 0x54, 0xf1, 0xd8, 0xfe, 0xb0, 0x38, 0x50, 0xa3, 0xb4, 0x47, 0xcb, 0x41, 0xb3, 0x94, 0xdc, 0x19, 0x52, 0xde, 0xf7, 0x7d, 0xf1, 0x13, 0xb8, 0xba, 0xcb, 0xb5, 0x79, 0x4a, 0xdd, 0x15, 0x0f, 0xba, 0x46, 0x85, 0xbf, 0x42, 0x4d, 0x27, 0x89, 0x63, 0x08, 0xd5, 0x37, 0x79, 0x7d, 0x75, 0xcb, 0x6a, 0xf6, 0x47, 0x05, 0xa7, 0xf9, 0xa0, 0xb4, 0x4b, 0x97, 0xbc, 0x33, 0xbd, 0x0b, 0x92, 0xc7, 0xe0, 0x4e, 0xf5, 0xb5, 0xb2, 0xbe, 0x5b, 0xda, 0xa5, 0x4b, 0xde, 0xf8, 0x04, 0xd5, 0xe1, 0x79, 0x04, 0xce, 0xb4, 0xa0, 0x7b, 0x5a, 0xfd, 0x41, 0xa1, 0xae, 0x9f, 0x2e, 0xec, 0xd1, 0x92, 0x27, 0x76, 0x10, 0x72, 0x44, 0xe8, 0xf2, 0xfc, 0x27, 0xe3, 0x1d, 0xdd, 0x08, 0x6b, 0xbb, 0x8b, 0xf4, 0x60, 0xaa, 0x9b, 0x3f, 0xd8, 0x33, 0x93, 0xa4, 0x0b, 0xd8, 0x96, 0x8f, 0xf0, 0x6a, 0x9b, 0xf0, 0x01, 0xaa, 0x0e, 0x61, 0xac, 0x87, 0xe8, 0x06, 0xcd, 0x3e, 0xf1, 0x3d, 0x54, 0x1b, 0x31, 0x3f, 0x81, 0xe2, 0x42, 0x7f, 0xba, 0xdd, 0x39, 0x2e, 0x79, 0x00, 0x34, 0x17, 0x7e, 0xb9, 0x73, 0x62, 0xd8, 0x5f, 0x5f, 0x5d, 0x9b, 0x95, 0x97, 0xd7, 0x66, 0xe5, 0xd5, 0xb5, 0x59, 0x79, 0x91, 0x9a, 0xc6, 0x55, 0x6a, 0x1a, 0x2f, 0x53, 0xd3, 0x78, 0x95, 0x9a, 0xc6, 0x5f, 0xa9, 0x69, 0xfc, 0xf2, 0xb7, 0x59, 0xf9, 0xee, 0x68, 0xe3, 0xdf, 0x9c, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x3c, 0xbe, 0x15, 0xfb, 0x02, 0x09, 0x00, 0x00, } func (m *Eviction) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Eviction) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *Eviction) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.DeleteOptions != nil { { size, err := m.DeleteOptions.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 } { size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa return len(dAtA) - i, nil } func (m *PodDisruptionBudget) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *PodDisruptionBudget) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *PodDisruptionBudget) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l { size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a { size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 { size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa return len(dAtA) - i, nil } func (m *PodDisruptionBudgetList) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *PodDisruptionBudgetList) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *PodDisruptionBudgetList) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.Items) > 0 { for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 } } { size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa return len(dAtA) - i, nil } func (m *PodDisruptionBudgetSpec) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *PodDisruptionBudgetSpec) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *PodDisruptionBudgetSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.UnhealthyPodEvictionPolicy != nil { i -= len(*m.UnhealthyPodEvictionPolicy) copy(dAtA[i:], *m.UnhealthyPodEvictionPolicy) i = encodeVarintGenerated(dAtA, i, uint64(len(*m.UnhealthyPodEvictionPolicy))) i-- dAtA[i] = 0x22 } if m.MaxUnavailable != nil { { size, err := m.MaxUnavailable.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a } if m.Selector != nil { { size, err := m.Selector.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 } if m.MinAvailable != nil { { size, err := m.MinAvailable.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *PodDisruptionBudgetStatus) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *PodDisruptionBudgetStatus) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *PodDisruptionBudgetStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if len(m.Conditions) > 0 { for iNdEx := len(m.Conditions) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.Conditions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x3a } } i = encodeVarintGenerated(dAtA, i, uint64(m.ExpectedPods)) i-- dAtA[i] = 0x30 i = encodeVarintGenerated(dAtA, i, uint64(m.DesiredHealthy)) i-- dAtA[i] = 0x28 i = encodeVarintGenerated(dAtA, i, uint64(m.CurrentHealthy)) i-- dAtA[i] = 0x20 i = encodeVarintGenerated(dAtA, i, uint64(m.DisruptionsAllowed)) i-- dAtA[i] = 0x18 if len(m.DisruptedPods) > 0 { keysForDisruptedPods := make([]string, 0, len(m.DisruptedPods)) for k := range m.DisruptedPods { keysForDisruptedPods = append(keysForDisruptedPods, string(k)) } github_com_gogo_protobuf_sortkeys.Strings(keysForDisruptedPods) for iNdEx := len(keysForDisruptedPods) - 1; iNdEx >= 0; iNdEx-- { v := m.DisruptedPods[string(keysForDisruptedPods[iNdEx])] baseI := i { size, err := (&v).MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintGenerated(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 i -= len(keysForDisruptedPods[iNdEx]) copy(dAtA[i:], keysForDisruptedPods[iNdEx]) i = encodeVarintGenerated(dAtA, i, uint64(len(keysForDisruptedPods[iNdEx]))) i-- dAtA[i] = 0xa i = encodeVarintGenerated(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x12 } } i = encodeVarintGenerated(dAtA, i, uint64(m.ObservedGeneration)) i-- dAtA[i] = 0x8 return len(dAtA) - i, nil } func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { offset -= sovGenerated(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return base } func (m *Eviction) Size() (n int) { if m == nil { return 0 } var l int _ = l l = m.ObjectMeta.Size() n += 1 + l + sovGenerated(uint64(l)) if m.DeleteOptions != nil { l = m.DeleteOptions.Size() n += 1 + l + sovGenerated(uint64(l)) } return n } func (m *PodDisruptionBudget) Size() (n int) { if m == nil { return 0 } var l int _ = l l = m.ObjectMeta.Size() n += 1 + l + sovGenerated(uint64(l)) l = m.Spec.Size() n += 1 + l + sovGenerated(uint64(l)) l = m.Status.Size() n += 1 + l + sovGenerated(uint64(l)) return n } func (m *PodDisruptionBudgetList) Size() (n int) { if m == nil { return 0 } var l int _ = l l = m.ListMeta.Size() n += 1 + l + sovGenerated(uint64(l)) if len(m.Items) > 0 { for _, e := range m.Items { l = e.Size() n += 1 + l + sovGenerated(uint64(l)) } } return n } func (m *PodDisruptionBudgetSpec) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.MinAvailable != nil { l = m.MinAvailable.Size() n += 1 + l + sovGenerated(uint64(l)) } if m.Selector != nil { l = m.Selector.Size() n += 1 + l + sovGenerated(uint64(l)) } if m.MaxUnavailable != nil { l = m.MaxUnavailable.Size() n += 1 + l + sovGenerated(uint64(l)) } if m.UnhealthyPodEvictionPolicy != nil { l = len(*m.UnhealthyPodEvictionPolicy) n += 1 + l + sovGenerated(uint64(l)) } return n } func (m *PodDisruptionBudgetStatus) Size() (n int) { if m == nil { return 0 } var l int _ = l n += 1 + sovGenerated(uint64(m.ObservedGeneration)) if len(m.DisruptedPods) > 0 { for k, v := range m.DisruptedPods { _ = k _ = v l = v.Size() mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l)) n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) } } n += 1 + sovGenerated(uint64(m.DisruptionsAllowed)) n += 1 + sovGenerated(uint64(m.CurrentHealthy)) n += 1 + sovGenerated(uint64(m.DesiredHealthy)) n += 1 + sovGenerated(uint64(m.ExpectedPods)) if len(m.Conditions) > 0 { for _, e := range m.Conditions { l = e.Size() n += 1 + l + sovGenerated(uint64(l)) } } return n } func sovGenerated(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } func sozGenerated(x uint64) (n int) { return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (this *Eviction) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&Eviction{`, `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `DeleteOptions:` + strings.Replace(fmt.Sprintf("%v", this.DeleteOptions), "DeleteOptions", "v1.DeleteOptions", 1) + `,`, `}`, }, "") return s } func (this *PodDisruptionBudget) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&PodDisruptionBudget{`, `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PodDisruptionBudgetSpec", "PodDisruptionBudgetSpec", 1), `&`, ``, 1) + `,`, `Status:` + strings.Replace(strings.Replace(this.Status.String(), "PodDisruptionBudgetStatus", "PodDisruptionBudgetStatus", 1), `&`, ``, 1) + `,`, `}`, }, "") return s } func (this *PodDisruptionBudgetList) String() string { if this == nil { return "nil" } repeatedStringForItems := "[]PodDisruptionBudget{" for _, f := range this.Items { repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "PodDisruptionBudget", "PodDisruptionBudget", 1), `&`, ``, 1) + "," } repeatedStringForItems += "}" s := strings.Join([]string{`&PodDisruptionBudgetList{`, `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, `Items:` + repeatedStringForItems + `,`, `}`, }, "") return s } func (this *PodDisruptionBudgetSpec) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&PodDisruptionBudgetSpec{`, `MinAvailable:` + strings.Replace(fmt.Sprintf("%v", this.MinAvailable), "IntOrString", "intstr.IntOrString", 1) + `,`, `Selector:` + strings.Replace(fmt.Sprintf("%v", this.Selector), "LabelSelector", "v1.LabelSelector", 1) + `,`, `MaxUnavailable:` + strings.Replace(fmt.Sprintf("%v", this.MaxUnavailable), "IntOrString", "intstr.IntOrString", 1) + `,`, `UnhealthyPodEvictionPolicy:` + valueToStringGenerated(this.UnhealthyPodEvictionPolicy) + `,`, `}`, }, "") return s } func (this *PodDisruptionBudgetStatus) String() string { if this == nil { return "nil" } repeatedStringForConditions := "[]Condition{" for _, f := range this.Conditions { repeatedStringForConditions += fmt.Sprintf("%v", f) + "," } repeatedStringForConditions += "}" keysForDisruptedPods := make([]string, 0, len(this.DisruptedPods)) for k := range this.DisruptedPods { keysForDisruptedPods = append(keysForDisruptedPods, k) } github_com_gogo_protobuf_sortkeys.Strings(keysForDisruptedPods) mapStringForDisruptedPods := "map[string]v1.Time{" for _, k := range keysForDisruptedPods { mapStringForDisruptedPods += fmt.Sprintf("%v: %v,", k, this.DisruptedPods[k]) } mapStringForDisruptedPods += "}" s := strings.Join([]string{`&PodDisruptionBudgetStatus{`, `ObservedGeneration:` + fmt.Sprintf("%v", this.ObservedGeneration) + `,`, `DisruptedPods:` + mapStringForDisruptedPods + `,`, `DisruptionsAllowed:` + fmt.Sprintf("%v", this.DisruptionsAllowed) + `,`, `CurrentHealthy:` + fmt.Sprintf("%v", this.CurrentHealthy) + `,`, `DesiredHealthy:` + fmt.Sprintf("%v", this.DesiredHealthy) + `,`, `ExpectedPods:` + fmt.Sprintf("%v", this.ExpectedPods) + `,`, `Conditions:` + repeatedStringForConditions + `,`, `}`, }, "") return s } func valueToStringGenerated(v interface{}) string { rv := reflect.ValueOf(v) if rv.IsNil() { return "nil" } pv := reflect.Indirect(rv).Interface() return fmt.Sprintf("*%v", pv) } func (m *Eviction) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: Eviction: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Eviction: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DeleteOptions", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } if m.DeleteOptions == nil { m.DeleteOptions = &v1.DeleteOptions{} } if err := m.DeleteOptions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthGenerated } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *PodDisruptionBudget) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: PodDisruptionBudget: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: PodDisruptionBudget: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthGenerated } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *PodDisruptionBudgetList) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { return fmt.Errorf("proto: PodDisruptionBudgetList: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: PodDisruptionBudgetList: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenerated } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthGenerated } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenerated } if postIndex > l { return io.ErrUnexpectedEOF } m.Items = append(m.Items, PodDisruptionBudget{}) if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenerated(dAtA[iNdEx:])
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
true
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/component-helpers/storage/volume/pv_helpers.go
vendor/k8s.io/component-helpers/storage/volume/pv_helpers.go
/* Copyright 2019 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package volume import ( "fmt" v1 "k8s.io/api/core/v1" storage "k8s.io/api/storage/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/client-go/kubernetes/scheme" storagelisters "k8s.io/client-go/listers/storage/v1" "k8s.io/client-go/tools/reference" ) const ( // AnnBindCompleted Annotation applies to PVCs. It indicates that the lifecycle // of the PVC has passed through the initial setup. This information changes how // we interpret some observations of the state of the objects. Value of this // Annotation does not matter. AnnBindCompleted = "pv.kubernetes.io/bind-completed" // AnnBoundByController annotation applies to PVs and PVCs. It indicates that // the binding (PV->PVC or PVC->PV) was installed by the controller. The // absence of this annotation means the binding was done by the user (i.e. // pre-bound). Value of this annotation does not matter. // External PV binders must bind PV the same way as PV controller, otherwise PV // controller may not handle it correctly. AnnBoundByController = "pv.kubernetes.io/bound-by-controller" // AnnSelectedNode annotation is added to a PVC that has been triggered by scheduler to // be dynamically provisioned. Its value is the name of the selected node. AnnSelectedNode = "volume.kubernetes.io/selected-node" // NotSupportedProvisioner is a special provisioner name which can be set // in storage class to indicate dynamic provisioning is not supported by // the storage. NotSupportedProvisioner = "kubernetes.io/no-provisioner" // AnnDynamicallyProvisioned annotation is added to a PV that has been dynamically provisioned by // Kubernetes. Its value is name of volume plugin that created the volume. // It serves both user (to show where a PV comes from) and Kubernetes (to // recognize dynamically provisioned PVs in its decisions). AnnDynamicallyProvisioned = "pv.kubernetes.io/provisioned-by" // AnnMigratedTo annotation is added to a PVC and PV that is supposed to be // dynamically provisioned/deleted by by its corresponding CSI driver // through the CSIMigration feature flags. When this annotation is set the // Kubernetes components will "stand-down" and the external-provisioner will // act on the objects AnnMigratedTo = "pv.kubernetes.io/migrated-to" // AnnStorageProvisioner annotation is added to a PVC that is supposed to be dynamically // provisioned. Its value is name of volume plugin that is supposed to provision // a volume for this PVC. // TODO: remove beta anno once deprecation period ends AnnStorageProvisioner = "volume.kubernetes.io/storage-provisioner" AnnBetaStorageProvisioner = "volume.beta.kubernetes.io/storage-provisioner" //PVDeletionProtectionFinalizer is the finalizer added by the external-provisioner on the PV PVDeletionProtectionFinalizer = "external-provisioner.volume.kubernetes.io/finalizer" // PVDeletionInTreeProtectionFinalizer is the finalizer added to protect PV deletion for in-tree volumes. PVDeletionInTreeProtectionFinalizer = "kubernetes.io/pv-controller" ) // IsDelayBindingProvisioning checks if claim provisioning with selected-node annotation func IsDelayBindingProvisioning(claim *v1.PersistentVolumeClaim) bool { // When feature VolumeScheduling enabled, // Scheduler signal to the PV controller to start dynamic // provisioning by setting the "AnnSelectedNode" annotation // in the PVC _, ok := claim.Annotations[AnnSelectedNode] return ok } // IsDelayBindingMode checks if claim is in delay binding mode. func IsDelayBindingMode(claim *v1.PersistentVolumeClaim, classLister storagelisters.StorageClassLister) (bool, error) { className := GetPersistentVolumeClaimClass(claim) if className == "" { return false, nil } class, err := classLister.Get(className) if err != nil { if apierrors.IsNotFound(err) { return false, nil } return false, err } if class.VolumeBindingMode == nil { return false, fmt.Errorf("VolumeBindingMode not set for StorageClass %q", className) } return *class.VolumeBindingMode == storage.VolumeBindingWaitForFirstConsumer, nil } // GetBindVolumeToClaim returns a new volume which is bound to given claim. In // addition, it returns a bool which indicates whether we made modification on // original volume. func GetBindVolumeToClaim(volume *v1.PersistentVolume, claim *v1.PersistentVolumeClaim) (*v1.PersistentVolume, bool, error) { dirty := false // Check if the volume was already bound (either by user or by controller) shouldSetBoundByController := false if !IsVolumeBoundToClaim(volume, claim) { shouldSetBoundByController = true } // The volume from method args can be pointing to watcher cache. We must not // modify these, therefore create a copy. volumeClone := volume.DeepCopy() // Bind the volume to the claim if it is not bound yet if volume.Spec.ClaimRef == nil || volume.Spec.ClaimRef.Name != claim.Name || volume.Spec.ClaimRef.Namespace != claim.Namespace || volume.Spec.ClaimRef.UID != claim.UID { claimRef, err := reference.GetReference(scheme.Scheme, claim) if err != nil { return nil, false, fmt.Errorf("unexpected error getting claim reference: %w", err) } volumeClone.Spec.ClaimRef = claimRef dirty = true } // Set AnnBoundByController if it is not set yet if shouldSetBoundByController && !metav1.HasAnnotation(volumeClone.ObjectMeta, AnnBoundByController) { metav1.SetMetaDataAnnotation(&volumeClone.ObjectMeta, AnnBoundByController, "yes") dirty = true } return volumeClone, dirty, nil } // IsVolumeBoundToClaim returns true, if given volume is pre-bound or bound // to specific claim. Both claim.Name and claim.Namespace must be equal. // If claim.UID is present in volume.Spec.ClaimRef, it must be equal too. func IsVolumeBoundToClaim(volume *v1.PersistentVolume, claim *v1.PersistentVolumeClaim) bool { if volume.Spec.ClaimRef == nil { return false } if claim.Name != volume.Spec.ClaimRef.Name || claim.Namespace != volume.Spec.ClaimRef.Namespace { return false } if volume.Spec.ClaimRef.UID != "" && claim.UID != volume.Spec.ClaimRef.UID { return false } return true } // FindMatchingVolume goes through the list of volumes to find the best matching volume // for the claim. // // This function is used by both the PV controller and scheduler. // // delayBinding is true only in the PV controller path. When set, prebound PVs are still returned // as a match for the claim, but unbound PVs are skipped. // // node is set only in the scheduler path. When set, the PV node affinity is checked against // the node's labels. // // excludedVolumes is only used in the scheduler path, and is needed for evaluating multiple // unbound PVCs for a single Pod at one time. As each PVC finds a matching PV, the chosen // PV needs to be excluded from future matching. func FindMatchingVolume( claim *v1.PersistentVolumeClaim, volumes []*v1.PersistentVolume, node *v1.Node, excludedVolumes map[string]*v1.PersistentVolume, delayBinding bool) (*v1.PersistentVolume, error) { var smallestVolume *v1.PersistentVolume var smallestVolumeQty resource.Quantity requestedQty := claim.Spec.Resources.Requests[v1.ResourceName(v1.ResourceStorage)] requestedClass := GetPersistentVolumeClaimClass(claim) var selector labels.Selector if claim.Spec.Selector != nil { internalSelector, err := metav1.LabelSelectorAsSelector(claim.Spec.Selector) if err != nil { return nil, fmt.Errorf("error creating internal label selector for claim: %v: %v", claimToClaimKey(claim), err) } selector = internalSelector } // Go through all available volumes with two goals: // - find a volume that is either pre-bound by user or dynamically // provisioned for this claim. Because of this we need to loop through // all volumes. // - find the smallest matching one if there is no volume pre-bound to // the claim. for _, volume := range volumes { if _, ok := excludedVolumes[volume.Name]; ok { // Skip volumes in the excluded list continue } if volume.Spec.ClaimRef != nil && !IsVolumeBoundToClaim(volume, claim) { continue } volumeQty := volume.Spec.Capacity[v1.ResourceStorage] if volumeQty.Cmp(requestedQty) < 0 { continue } // filter out mismatching volumeModes if CheckVolumeModeMismatches(&claim.Spec, &volume.Spec) { continue } // check if PV's DeletionTimeStamp is set, if so, skip this volume. if volume.ObjectMeta.DeletionTimestamp != nil { continue } nodeAffinityValid := true if node != nil { // Scheduler path, check that the PV NodeAffinity // is satisfied by the node // CheckNodeAffinity is the most expensive call in this loop. // We should check cheaper conditions first or consider optimizing this function. err := CheckNodeAffinity(volume, node.Labels) if err != nil { nodeAffinityValid = false } } if IsVolumeBoundToClaim(volume, claim) { // If PV node affinity is invalid, return no match. // This means the prebound PV (and therefore PVC) // is not suitable for this node. if !nodeAffinityValid { return nil, nil } return volume, nil } if node == nil && delayBinding { // PV controller does not bind this claim. // Scheduler will handle binding unbound volumes // Scheduler path will have node != nil continue } // filter out: // - volumes in non-available phase // - volumes whose labels don't match the claim's selector, if specified // - volumes in Class that is not requested // - volumes whose NodeAffinity does not match the node if volume.Status.Phase != v1.VolumeAvailable { // We ignore volumes in non-available phase, because volumes that // satisfies matching criteria will be updated to available, binding // them now has high chance of encountering unnecessary failures // due to API conflicts. continue } else if selector != nil && !selector.Matches(labels.Set(volume.Labels)) { continue } if GetPersistentVolumeClass(volume) != requestedClass { continue } if !nodeAffinityValid { continue } if node != nil { // Scheduler path // Check that the access modes match if !CheckAccessModes(claim, volume) { continue } } if smallestVolume == nil || smallestVolumeQty.Cmp(volumeQty) > 0 { smallestVolume = volume smallestVolumeQty = volumeQty } } if smallestVolume != nil { // Found a matching volume return smallestVolume, nil } return nil, nil } // CheckVolumeModeMismatches is a convenience method that checks volumeMode for PersistentVolume // and PersistentVolumeClaims func CheckVolumeModeMismatches(pvcSpec *v1.PersistentVolumeClaimSpec, pvSpec *v1.PersistentVolumeSpec) bool { // In HA upgrades, we cannot guarantee that the apiserver is on a version >= controller-manager. // So we default a nil volumeMode to filesystem requestedVolumeMode := v1.PersistentVolumeFilesystem if pvcSpec.VolumeMode != nil { requestedVolumeMode = *pvcSpec.VolumeMode } pvVolumeMode := v1.PersistentVolumeFilesystem if pvSpec.VolumeMode != nil { pvVolumeMode = *pvSpec.VolumeMode } return requestedVolumeMode != pvVolumeMode } // CheckAccessModes returns true if PV satisfies all the PVC's requested AccessModes func CheckAccessModes(claim *v1.PersistentVolumeClaim, volume *v1.PersistentVolume) bool { pvModesMap := map[v1.PersistentVolumeAccessMode]bool{} for _, mode := range volume.Spec.AccessModes { pvModesMap[mode] = true } for _, mode := range claim.Spec.AccessModes { _, ok := pvModesMap[mode] if !ok { return false } } return true } func claimToClaimKey(claim *v1.PersistentVolumeClaim) string { return fmt.Sprintf("%s/%s", claim.Namespace, claim.Name) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/component-helpers/storage/volume/helpers.go
vendor/k8s.io/component-helpers/storage/volume/helpers.go
/* Copyright 2020 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package volume import ( "fmt" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/component-helpers/scheduling/corev1" ) // GetPersistentVolumeClaimClass returns StorageClassName. If no storage class was // requested, it returns "". func GetPersistentVolumeClaimClass(claim *v1.PersistentVolumeClaim) string { // Use beta annotation first if class, found := claim.Annotations[v1.BetaStorageClassAnnotation]; found { return class } if claim.Spec.StorageClassName != nil { return *claim.Spec.StorageClassName } return "" } // GetPersistentVolumeClass returns StorageClassName. func GetPersistentVolumeClass(volume *v1.PersistentVolume) string { // Use beta annotation first if class, found := volume.Annotations[v1.BetaStorageClassAnnotation]; found { return class } return volume.Spec.StorageClassName } // CheckNodeAffinity looks at the PV node affinity, and checks if the node has the same corresponding labels // This ensures that we don't mount a volume that doesn't belong to this node func CheckNodeAffinity(pv *v1.PersistentVolume, nodeLabels map[string]string) error { if pv.Spec.NodeAffinity == nil { return nil } if pv.Spec.NodeAffinity.Required != nil { node := &v1.Node{ObjectMeta: metav1.ObjectMeta{Labels: nodeLabels}} terms := pv.Spec.NodeAffinity.Required if matches, err := corev1.MatchNodeSelectorTerms(node, terms); err != nil { return err } else if !matches { return fmt.Errorf("no matching NodeSelectorTerms") } } return nil }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/component-helpers/scheduling/corev1/doc.go
vendor/k8s.io/component-helpers/scheduling/corev1/doc.go
/* Copyright 2020 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Package corev1 defines functions which should satisfy one of the following: // // - Be used by more than one core component (kube-scheduler, kubelet, kube-apiserver, etc.) // - Be used by a core component and another kubernetes project (cluster-autoscaler, descheduler) // // And be a scheduling feature. package corev1 // import "k8s.io/component-helpers/scheduling/corev1"
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/component-helpers/scheduling/corev1/helpers.go
vendor/k8s.io/component-helpers/scheduling/corev1/helpers.go
/* Copyright 2020 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package corev1 import ( "encoding/json" v1 "k8s.io/api/core/v1" "k8s.io/component-helpers/scheduling/corev1/nodeaffinity" ) // PodPriority returns priority of the given pod. func PodPriority(pod *v1.Pod) int32 { if pod.Spec.Priority != nil { return *pod.Spec.Priority } // When priority of a running pod is nil, it means it was created at a time // that there was no global default priority class and the priority class // name of the pod was empty. So, we resolve to the static default priority. return 0 } // MatchNodeSelectorTerms checks whether the node labels and fields match node selector terms in ORed; // nil or empty term matches no objects. func MatchNodeSelectorTerms( node *v1.Node, nodeSelector *v1.NodeSelector, ) (bool, error) { if node == nil { return false, nil } return nodeaffinity.NewLazyErrorNodeSelector(nodeSelector).Match(node) } // GetAvoidPodsFromNodeAnnotations scans the list of annotations and // returns the pods that needs to be avoided for this node from scheduling func GetAvoidPodsFromNodeAnnotations(annotations map[string]string) (v1.AvoidPods, error) { var avoidPods v1.AvoidPods if len(annotations) > 0 && annotations[v1.PreferAvoidPodsAnnotationKey] != "" { err := json.Unmarshal([]byte(annotations[v1.PreferAvoidPodsAnnotationKey]), &avoidPods) if err != nil { return avoidPods, err } } return avoidPods, nil } // TolerationsTolerateTaint checks if taint is tolerated by any of the tolerations. func TolerationsTolerateTaint(tolerations []v1.Toleration, taint *v1.Taint) bool { for i := range tolerations { if tolerations[i].ToleratesTaint(taint) { return true } } return false } type taintsFilterFunc func(*v1.Taint) bool // FindMatchingUntoleratedTaint checks if the given tolerations tolerates // all the filtered taints, and returns the first taint without a toleration // Returns true if there is an untolerated taint // Returns false if all taints are tolerated func FindMatchingUntoleratedTaint(taints []v1.Taint, tolerations []v1.Toleration, inclusionFilter taintsFilterFunc) (v1.Taint, bool) { filteredTaints := getFilteredTaints(taints, inclusionFilter) for _, taint := range filteredTaints { if !TolerationsTolerateTaint(tolerations, &taint) { return taint, true } } return v1.Taint{}, false } // getFilteredTaints returns a list of taints satisfying the filter predicate func getFilteredTaints(taints []v1.Taint, inclusionFilter taintsFilterFunc) []v1.Taint { if inclusionFilter == nil { return taints } filteredTaints := []v1.Taint{} for _, taint := range taints { if !inclusionFilter(&taint) { continue } filteredTaints = append(filteredTaints, taint) } return filteredTaints }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/component-helpers/scheduling/corev1/nodeaffinity/nodeaffinity.go
vendor/k8s.io/component-helpers/scheduling/corev1/nodeaffinity/nodeaffinity.go
/* Copyright 2020 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package nodeaffinity import ( v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/fields" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/selection" "k8s.io/apimachinery/pkg/util/errors" "k8s.io/apimachinery/pkg/util/validation/field" ) // NodeSelector is a runtime representation of v1.NodeSelector. type NodeSelector struct { lazy LazyErrorNodeSelector } // LazyErrorNodeSelector is a runtime representation of v1.NodeSelector that // only reports parse errors when no terms match. type LazyErrorNodeSelector struct { terms []nodeSelectorTerm } // NewNodeSelector returns a NodeSelector or aggregate parsing errors found. func NewNodeSelector(ns *v1.NodeSelector, opts ...field.PathOption) (*NodeSelector, error) { lazy := NewLazyErrorNodeSelector(ns, opts...) var errs []error for _, term := range lazy.terms { if len(term.parseErrs) > 0 { errs = append(errs, term.parseErrs...) } } if len(errs) != 0 { return nil, errors.Flatten(errors.NewAggregate(errs)) } return &NodeSelector{lazy: *lazy}, nil } // NewLazyErrorNodeSelector creates a NodeSelector that only reports parse // errors when no terms match. func NewLazyErrorNodeSelector(ns *v1.NodeSelector, opts ...field.PathOption) *LazyErrorNodeSelector { p := field.ToPath(opts...) parsedTerms := make([]nodeSelectorTerm, 0, len(ns.NodeSelectorTerms)) path := p.Child("nodeSelectorTerms") for i, term := range ns.NodeSelectorTerms { // nil or empty term selects no objects if isEmptyNodeSelectorTerm(&term) { continue } p := path.Index(i) parsedTerms = append(parsedTerms, newNodeSelectorTerm(&term, p)) } return &LazyErrorNodeSelector{ terms: parsedTerms, } } // Match checks whether the node labels and fields match the selector terms, ORed; // nil or empty term matches no objects. func (ns *NodeSelector) Match(node *v1.Node) bool { // parse errors are reported in NewNodeSelector. match, _ := ns.lazy.Match(node) return match } // Match checks whether the node labels and fields match the selector terms, ORed; // nil or empty term matches no objects. // Parse errors are only returned if no terms matched. func (ns *LazyErrorNodeSelector) Match(node *v1.Node) (bool, error) { if node == nil { return false, nil } nodeLabels := labels.Set(node.Labels) nodeFields := extractNodeFields(node) var errs []error for _, term := range ns.terms { match, tErrs := term.match(nodeLabels, nodeFields) if len(tErrs) > 0 { errs = append(errs, tErrs...) continue } if match { return true, nil } } return false, errors.Flatten(errors.NewAggregate(errs)) } // PreferredSchedulingTerms is a runtime representation of []v1.PreferredSchedulingTerms. type PreferredSchedulingTerms struct { terms []preferredSchedulingTerm } // NewPreferredSchedulingTerms returns a PreferredSchedulingTerms or all the parsing errors found. // If a v1.PreferredSchedulingTerm has a 0 weight, its parsing is skipped. func NewPreferredSchedulingTerms(terms []v1.PreferredSchedulingTerm, opts ...field.PathOption) (*PreferredSchedulingTerms, error) { p := field.ToPath(opts...) var errs []error parsedTerms := make([]preferredSchedulingTerm, 0, len(terms)) for i, term := range terms { path := p.Index(i) if term.Weight == 0 || isEmptyNodeSelectorTerm(&term.Preference) { continue } parsedTerm := preferredSchedulingTerm{ nodeSelectorTerm: newNodeSelectorTerm(&term.Preference, path), weight: int(term.Weight), } if len(parsedTerm.parseErrs) > 0 { errs = append(errs, parsedTerm.parseErrs...) } else { parsedTerms = append(parsedTerms, parsedTerm) } } if len(errs) != 0 { return nil, errors.Flatten(errors.NewAggregate(errs)) } return &PreferredSchedulingTerms{terms: parsedTerms}, nil } // Score returns a score for a Node: the sum of the weights of the terms that // match the Node. func (t *PreferredSchedulingTerms) Score(node *v1.Node) int64 { var score int64 nodeLabels := labels.Set(node.Labels) nodeFields := extractNodeFields(node) for _, term := range t.terms { // parse errors are reported in NewPreferredSchedulingTerms. if ok, _ := term.match(nodeLabels, nodeFields); ok { score += int64(term.weight) } } return score } func isEmptyNodeSelectorTerm(term *v1.NodeSelectorTerm) bool { return len(term.MatchExpressions) == 0 && len(term.MatchFields) == 0 } func extractNodeFields(n *v1.Node) fields.Set { f := make(fields.Set) if len(n.Name) > 0 { f["metadata.name"] = n.Name } return f } type nodeSelectorTerm struct { matchLabels labels.Selector matchFields fields.Selector parseErrs []error } func newNodeSelectorTerm(term *v1.NodeSelectorTerm, path *field.Path) nodeSelectorTerm { var parsedTerm nodeSelectorTerm var errs []error if len(term.MatchExpressions) != 0 { p := path.Child("matchExpressions") parsedTerm.matchLabels, errs = nodeSelectorRequirementsAsSelector(term.MatchExpressions, p) if errs != nil { parsedTerm.parseErrs = append(parsedTerm.parseErrs, errs...) } } if len(term.MatchFields) != 0 { p := path.Child("matchFields") parsedTerm.matchFields, errs = nodeSelectorRequirementsAsFieldSelector(term.MatchFields, p) if errs != nil { parsedTerm.parseErrs = append(parsedTerm.parseErrs, errs...) } } return parsedTerm } func (t *nodeSelectorTerm) match(nodeLabels labels.Set, nodeFields fields.Set) (bool, []error) { if t.parseErrs != nil { return false, t.parseErrs } if t.matchLabels != nil && !t.matchLabels.Matches(nodeLabels) { return false, nil } if t.matchFields != nil && len(nodeFields) > 0 && !t.matchFields.Matches(nodeFields) { return false, nil } return true, nil } var validSelectorOperators = []string{ string(v1.NodeSelectorOpIn), string(v1.NodeSelectorOpNotIn), string(v1.NodeSelectorOpExists), string(v1.NodeSelectorOpDoesNotExist), string(v1.NodeSelectorOpGt), string(v1.NodeSelectorOpLt), } // nodeSelectorRequirementsAsSelector converts the []NodeSelectorRequirement api type into a struct that implements // labels.Selector. func nodeSelectorRequirementsAsSelector(nsm []v1.NodeSelectorRequirement, path *field.Path) (labels.Selector, []error) { if len(nsm) == 0 { return labels.Nothing(), nil } var errs []error selector := labels.NewSelector() for i, expr := range nsm { p := path.Index(i) var op selection.Operator switch expr.Operator { case v1.NodeSelectorOpIn: op = selection.In case v1.NodeSelectorOpNotIn: op = selection.NotIn case v1.NodeSelectorOpExists: op = selection.Exists case v1.NodeSelectorOpDoesNotExist: op = selection.DoesNotExist case v1.NodeSelectorOpGt: op = selection.GreaterThan case v1.NodeSelectorOpLt: op = selection.LessThan default: errs = append(errs, field.NotSupported(p.Child("operator"), expr.Operator, validSelectorOperators)) continue } r, err := labels.NewRequirement(expr.Key, op, expr.Values, field.WithPath(p)) if err != nil { errs = append(errs, err) } else { selector = selector.Add(*r) } } if len(errs) != 0 { return nil, errs } return selector, nil } var validFieldSelectorOperators = []string{ string(v1.NodeSelectorOpIn), string(v1.NodeSelectorOpNotIn), } // nodeSelectorRequirementsAsFieldSelector converts the []NodeSelectorRequirement core type into a struct that implements // fields.Selector. func nodeSelectorRequirementsAsFieldSelector(nsr []v1.NodeSelectorRequirement, path *field.Path) (fields.Selector, []error) { if len(nsr) == 0 { return fields.Nothing(), nil } var errs []error var selectors []fields.Selector for i, expr := range nsr { p := path.Index(i) switch expr.Operator { case v1.NodeSelectorOpIn: if len(expr.Values) != 1 { errs = append(errs, field.Invalid(p.Child("values"), expr.Values, "must have one element")) } else { selectors = append(selectors, fields.OneTermEqualSelector(expr.Key, expr.Values[0])) } case v1.NodeSelectorOpNotIn: if len(expr.Values) != 1 { errs = append(errs, field.Invalid(p.Child("values"), expr.Values, "must have one element")) } else { selectors = append(selectors, fields.OneTermNotEqualSelector(expr.Key, expr.Values[0])) } default: errs = append(errs, field.NotSupported(p.Child("operator"), expr.Operator, validFieldSelectorOperators)) } } if len(errs) != 0 { return nil, errs } return fields.AndSelectors(selectors...), nil } type preferredSchedulingTerm struct { nodeSelectorTerm weight int } type RequiredNodeAffinity struct { labelSelector labels.Selector nodeSelector *LazyErrorNodeSelector } // GetRequiredNodeAffinity returns the parsing result of pod's nodeSelector and nodeAffinity. func GetRequiredNodeAffinity(pod *v1.Pod) RequiredNodeAffinity { var selector labels.Selector if len(pod.Spec.NodeSelector) > 0 { selector = labels.SelectorFromSet(pod.Spec.NodeSelector) } // Use LazyErrorNodeSelector for backwards compatibility of parsing errors. var affinity *LazyErrorNodeSelector if pod.Spec.Affinity != nil && pod.Spec.Affinity.NodeAffinity != nil && pod.Spec.Affinity.NodeAffinity.RequiredDuringSchedulingIgnoredDuringExecution != nil { affinity = NewLazyErrorNodeSelector(pod.Spec.Affinity.NodeAffinity.RequiredDuringSchedulingIgnoredDuringExecution) } return RequiredNodeAffinity{labelSelector: selector, nodeSelector: affinity} } // Match checks whether the pod is schedulable onto nodes according to // the requirements in both nodeSelector and nodeAffinity. func (s RequiredNodeAffinity) Match(node *v1.Node) (bool, error) { if s.labelSelector != nil { if !s.labelSelector.Matches(labels.Set(node.Labels)) { return false, nil } } if s.nodeSelector != nil { return s.nodeSelector.Match(node) } return true, nil }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/component-base/version/base.go
vendor/k8s.io/component-base/version/base.go
/* Copyright 2019 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package version // Base version information. // // This is the fallback data used when version information from git is not // provided via go ldflags. It provides an approximation of the Kubernetes // version for ad-hoc builds (e.g. `go build`) that cannot get the version // information from git. // // If you are looking at these fields in the git tree, they look // strange. They are modified on the fly by the build process. The // in-tree values are dummy values used for "git archive", which also // works for GitHub tar downloads. // // When releasing a new Kubernetes version, this file is updated by // build/mark_new_version.sh to reflect the new version, and then a // git annotated tag (using format vX.Y where X == Major version and Y // == Minor version) is created to point to the commit that updates // component-base/version/base.go var ( // TODO: Deprecate gitMajor and gitMinor, use only gitVersion // instead. First step in deprecation, keep the fields but make // them irrelevant. (Next we'll take it out, which may muck with // scripts consuming the kubectl version output - but most of // these should be looking at gitVersion already anyways.) gitMajor string // major version, always numeric gitMinor string // minor version, numeric possibly followed by "+" // semantic version, derived by build scripts (see // https://github.com/kubernetes/community/blob/master/contributors/design-proposals/release/versioning.md // for a detailed discussion of this field) // // TODO: This field is still called "gitVersion" for legacy // reasons. For prerelease versions, the build metadata on the // semantic version is a git hash, but the version itself is no // longer the direct output of "git describe", but a slight // translation to be semver compliant. // NOTE: The $Format strings are replaced during 'git archive' thanks to the // companion .gitattributes file containing 'export-subst' in this same // directory. See also https://git-scm.com/docs/gitattributes gitVersion = "v0.0.0-master+$Format:%H$" gitCommit = "$Format:%H$" // sha1 from git, output of $(git rev-parse HEAD) gitTreeState = "" // state of git tree, either "clean" or "dirty" buildDate = "1970-01-01T00:00:00Z" // build date in ISO8601 format, output of $(date -u +'%Y-%m-%dT%H:%M:%SZ') ) const ( // DefaultKubeBinaryVersion is the hard coded k8 binary version based on the latest K8s release. // It is supposed to be consistent with gitMajor and gitMinor, except for local tests, where gitMajor and gitMinor are "". // Should update for each minor release! DefaultKubeBinaryVersion = "1.32" )
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/component-base/version/dynamic.go
vendor/k8s.io/component-base/version/dynamic.go
/* Copyright 2023 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package version import ( "fmt" "sync/atomic" utilversion "k8s.io/apimachinery/pkg/util/version" ) var dynamicGitVersion atomic.Value func init() { // initialize to static gitVersion dynamicGitVersion.Store(gitVersion) } // SetDynamicVersion overrides the version returned as the GitVersion from Get(). // The specified version must be non-empty, a valid semantic version, and must // match the major/minor/patch version of the default gitVersion. func SetDynamicVersion(dynamicVersion string) error { if err := ValidateDynamicVersion(dynamicVersion); err != nil { return err } dynamicGitVersion.Store(dynamicVersion) return nil } // ValidateDynamicVersion ensures the given version is non-empty, a valid semantic version, // and matched the major/minor/patch version of the default gitVersion. func ValidateDynamicVersion(dynamicVersion string) error { return validateDynamicVersion(dynamicVersion, gitVersion) } func validateDynamicVersion(dynamicVersion, defaultVersion string) error { if len(dynamicVersion) == 0 { return fmt.Errorf("version must not be empty") } if dynamicVersion == defaultVersion { // allow no-op return nil } vRuntime, err := utilversion.ParseSemantic(dynamicVersion) if err != nil { return err } // must match major/minor/patch of default version var vDefault *utilversion.Version if defaultVersion == "v0.0.0-master+$Format:%H$" { // special-case the placeholder value which doesn't parse as a semantic version vDefault, err = utilversion.ParseSemantic("v0.0.0-master") } else { vDefault, err = utilversion.ParseSemantic(defaultVersion) } if err != nil { return err } if vRuntime.Major() != vDefault.Major() || vRuntime.Minor() != vDefault.Minor() || vRuntime.Patch() != vDefault.Patch() { return fmt.Errorf("version %q must match major/minor/patch of default version %q", dynamicVersion, defaultVersion) } return nil }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/component-base/version/version.go
vendor/k8s.io/component-base/version/version.go
/* Copyright 2019 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package version import ( "fmt" "runtime" "sync/atomic" "k8s.io/apimachinery/pkg/util/version" apimachineryversion "k8s.io/apimachinery/pkg/version" ) type EffectiveVersion interface { BinaryVersion() *version.Version EmulationVersion() *version.Version MinCompatibilityVersion() *version.Version EqualTo(other EffectiveVersion) bool String() string Validate() []error } type MutableEffectiveVersion interface { EffectiveVersion Set(binaryVersion, emulationVersion, minCompatibilityVersion *version.Version) SetEmulationVersion(emulationVersion *version.Version) SetMinCompatibilityVersion(minCompatibilityVersion *version.Version) } type effectiveVersion struct { // When true, BinaryVersion() returns the current binary version useDefaultBuildBinaryVersion atomic.Bool // Holds the last binary version stored in Set() binaryVersion atomic.Pointer[version.Version] // If the emulationVersion is set by the users, it could only contain major and minor versions. // In tests, emulationVersion could be the same as the binary version, or set directly, // which can have "alpha" as pre-release to continue serving expired apis while we clean up the test. emulationVersion atomic.Pointer[version.Version] // minCompatibilityVersion could only contain major and minor versions. minCompatibilityVersion atomic.Pointer[version.Version] } // Get returns the overall codebase version. It's for detecting // what code a binary was built from. func Get() apimachineryversion.Info { // These variables typically come from -ldflags settings and in // their absence fallback to the settings in ./base.go return apimachineryversion.Info{ Major: gitMajor, Minor: gitMinor, GitVersion: dynamicGitVersion.Load().(string), GitCommit: gitCommit, GitTreeState: gitTreeState, BuildDate: buildDate, GoVersion: runtime.Version(), Compiler: runtime.Compiler, Platform: fmt.Sprintf("%s/%s", runtime.GOOS, runtime.GOARCH), } } func (m *effectiveVersion) BinaryVersion() *version.Version { if m.useDefaultBuildBinaryVersion.Load() { return defaultBuildBinaryVersion() } return m.binaryVersion.Load() } func (m *effectiveVersion) EmulationVersion() *version.Version { ver := m.emulationVersion.Load() if ver != nil { // Emulation version can have "alpha" as pre-release to continue serving expired apis while we clean up the test. // The pre-release should not be accessible to the users. return ver.WithPreRelease(m.BinaryVersion().PreRelease()) } return ver } func (m *effectiveVersion) MinCompatibilityVersion() *version.Version { return m.minCompatibilityVersion.Load() } func (m *effectiveVersion) EqualTo(other EffectiveVersion) bool { return m.BinaryVersion().EqualTo(other.BinaryVersion()) && m.EmulationVersion().EqualTo(other.EmulationVersion()) && m.MinCompatibilityVersion().EqualTo(other.MinCompatibilityVersion()) } func (m *effectiveVersion) String() string { if m == nil { return "<nil>" } return fmt.Sprintf("{BinaryVersion: %s, EmulationVersion: %s, MinCompatibilityVersion: %s}", m.BinaryVersion().String(), m.EmulationVersion().String(), m.MinCompatibilityVersion().String()) } func majorMinor(ver *version.Version) *version.Version { if ver == nil { return ver } return version.MajorMinor(ver.Major(), ver.Minor()) } func (m *effectiveVersion) Set(binaryVersion, emulationVersion, minCompatibilityVersion *version.Version) { m.binaryVersion.Store(binaryVersion) m.useDefaultBuildBinaryVersion.Store(false) m.emulationVersion.Store(majorMinor(emulationVersion)) m.minCompatibilityVersion.Store(majorMinor(minCompatibilityVersion)) } func (m *effectiveVersion) SetEmulationVersion(emulationVersion *version.Version) { m.emulationVersion.Store(majorMinor(emulationVersion)) } func (m *effectiveVersion) SetMinCompatibilityVersion(minCompatibilityVersion *version.Version) { m.minCompatibilityVersion.Store(majorMinor(minCompatibilityVersion)) } func (m *effectiveVersion) Validate() []error { var errs []error // Validate only checks the major and minor versions. binaryVersion := m.BinaryVersion().WithPatch(0) emulationVersion := m.emulationVersion.Load() minCompatibilityVersion := m.minCompatibilityVersion.Load() // emulationVersion can only be 1.{binaryMinor-1}...1.{binaryMinor}. maxEmuVer := binaryVersion minEmuVer := binaryVersion.SubtractMinor(1) if emulationVersion.GreaterThan(maxEmuVer) || emulationVersion.LessThan(minEmuVer) { errs = append(errs, fmt.Errorf("emulation version %s is not between [%s, %s]", emulationVersion.String(), minEmuVer.String(), maxEmuVer.String())) } // minCompatibilityVersion can only be 1.{binaryMinor-1} for alpha. maxCompVer := binaryVersion.SubtractMinor(1) minCompVer := binaryVersion.SubtractMinor(1) if minCompatibilityVersion.GreaterThan(maxCompVer) || minCompatibilityVersion.LessThan(minCompVer) { errs = append(errs, fmt.Errorf("minCompatibilityVersion version %s is not between [%s, %s]", minCompatibilityVersion.String(), minCompVer.String(), maxCompVer.String())) } return errs } func newEffectiveVersion(binaryVersion *version.Version, useDefaultBuildBinaryVersion bool) MutableEffectiveVersion { effective := &effectiveVersion{} compatVersion := binaryVersion.SubtractMinor(1) effective.Set(binaryVersion, binaryVersion, compatVersion) effective.useDefaultBuildBinaryVersion.Store(useDefaultBuildBinaryVersion) return effective } func NewEffectiveVersion(binaryVer string) MutableEffectiveVersion { if binaryVer == "" { return &effectiveVersion{} } binaryVersion := version.MustParse(binaryVer) return newEffectiveVersion(binaryVersion, false) } func defaultBuildBinaryVersion() *version.Version { verInfo := Get() return version.MustParse(verInfo.String()).WithInfo(verInfo) } // DefaultBuildEffectiveVersion returns the MutableEffectiveVersion based on the // current build information. func DefaultBuildEffectiveVersion() MutableEffectiveVersion { binaryVersion := defaultBuildBinaryVersion() if binaryVersion.Major() == 0 && binaryVersion.Minor() == 0 { return DefaultKubeEffectiveVersion() } return newEffectiveVersion(binaryVersion, true) } // DefaultKubeEffectiveVersion returns the MutableEffectiveVersion based on the // latest K8s release. func DefaultKubeEffectiveVersion() MutableEffectiveVersion { binaryVersion := version.MustParse(DefaultKubeBinaryVersion).WithInfo(Get()) return newEffectiveVersion(binaryVersion, false) } // ValidateKubeEffectiveVersion validates the EmulationVersion is equal to the binary version at 1.31 for kube components. // emulationVersion is introduced in 1.31, so it is only allowed to be equal to the binary version at 1.31. func ValidateKubeEffectiveVersion(effectiveVersion EffectiveVersion) error { binaryVersion := version.MajorMinor(effectiveVersion.BinaryVersion().Major(), effectiveVersion.BinaryVersion().Minor()) if binaryVersion.EqualTo(version.MajorMinor(1, 31)) && !effectiveVersion.EmulationVersion().EqualTo(binaryVersion) { return fmt.Errorf("emulation version needs to be equal to binary version(%s) in compatibility-version alpha, got %s", binaryVersion.String(), effectiveVersion.EmulationVersion().String()) } return nil }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/component-base/metrics/version_parser.go
vendor/k8s.io/component-base/metrics/version_parser.go
/* Copyright 2019 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package metrics import ( "fmt" "regexp" "github.com/blang/semver/v4" apimachineryversion "k8s.io/apimachinery/pkg/version" ) const ( versionRegexpString = `^v(\d+\.\d+\.\d+)` ) var ( versionRe = regexp.MustCompile(versionRegexpString) ) func parseSemver(s string) *semver.Version { if s != "" { sv := semver.MustParse(s) return &sv } return nil } func parseVersion(ver apimachineryversion.Info) semver.Version { matches := versionRe.FindAllStringSubmatch(ver.String(), -1) if len(matches) != 1 { panic(fmt.Sprintf("version string \"%v\" doesn't match expected regular expression: \"%v\"", ver.String(), versionRe.String())) } return semver.MustParse(matches[0][1]) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/component-base/metrics/processstarttime_windows.go
vendor/k8s.io/component-base/metrics/processstarttime_windows.go
//go:build windows // +build windows /* Copyright 2019 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package metrics import ( "golang.org/x/sys/windows" ) func GetProcessStart() (float64, error) { processHandle := windows.CurrentProcess() var creationTime, exitTime, kernelTime, userTime windows.Filetime if err := windows.GetProcessTimes(processHandle, &creationTime, &exitTime, &kernelTime, &userTime); err != nil { return 0, err } return float64(creationTime.Nanoseconds() / 1e9), nil }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/component-base/metrics/registry.go
vendor/k8s.io/component-base/metrics/registry.go
/* Copyright 2019 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package metrics import ( "fmt" "sync" "sync/atomic" "github.com/blang/semver/v4" "github.com/prometheus/client_golang/prometheus" dto "github.com/prometheus/client_model/go" apimachineryversion "k8s.io/apimachinery/pkg/version" "k8s.io/component-base/version" ) var ( showHiddenOnce sync.Once disabledMetricsLock sync.RWMutex showHidden atomic.Bool registries []*kubeRegistry // stores all registries created by NewKubeRegistry() registriesLock sync.RWMutex disabledMetrics = map[string]struct{}{} registeredMetricsTotal = NewCounterVec( &CounterOpts{ Name: "registered_metrics_total", Help: "The count of registered metrics broken by stability level and deprecation version.", StabilityLevel: BETA, }, []string{"stability_level", "deprecated_version"}, ) disabledMetricsTotal = NewCounter( &CounterOpts{ Name: "disabled_metrics_total", Help: "The count of disabled metrics.", StabilityLevel: BETA, }, ) hiddenMetricsTotal = NewCounter( &CounterOpts{ Name: "hidden_metrics_total", Help: "The count of hidden metrics.", StabilityLevel: BETA, }, ) cardinalityEnforcementUnexpectedCategorizationsTotal = NewCounter( &CounterOpts{ Name: "cardinality_enforcement_unexpected_categorizations_total", Help: "The count of unexpected categorizations during cardinality enforcement.", StabilityLevel: ALPHA, }, ) ) // shouldHide be used to check if a specific metric with deprecated version should be hidden // according to metrics deprecation lifecycle. func shouldHide(currentVersion *semver.Version, deprecatedVersion *semver.Version) bool { guardVersion, err := semver.Make(fmt.Sprintf("%d.%d.0", currentVersion.Major, currentVersion.Minor)) if err != nil { panic("failed to make version from current version") } if deprecatedVersion.LT(guardVersion) { return true } return false } // ValidateShowHiddenMetricsVersion checks invalid version for which show hidden metrics. func ValidateShowHiddenMetricsVersion(v string) []error { err := validateShowHiddenMetricsVersion(parseVersion(version.Get()), v) if err != nil { return []error{err} } return nil } func SetDisabledMetric(name string) { disabledMetricsLock.Lock() defer disabledMetricsLock.Unlock() disabledMetrics[name] = struct{}{} disabledMetricsTotal.Inc() } // SetShowHidden will enable showing hidden metrics. This will no-opt // after the initial call func SetShowHidden() { showHiddenOnce.Do(func() { showHidden.Store(true) // re-register collectors that has been hidden in phase of last registry. for _, r := range registries { r.enableHiddenCollectors() r.enableHiddenStableCollectors() } }) } // ShouldShowHidden returns whether showing hidden deprecated metrics // is enabled. While the primary usecase for this is internal (to determine // registration behavior) this can also be used to introspect func ShouldShowHidden() bool { return showHidden.Load() } // Registerable is an interface for a collector metric which we // will register with KubeRegistry. type Registerable interface { prometheus.Collector // Create will mark deprecated state for the collector Create(version *semver.Version) bool // ClearState will clear all the states marked by Create. ClearState() // FQName returns the fully-qualified metric name of the collector. FQName() string } type resettable interface { Reset() } // KubeRegistry is an interface which implements a subset of prometheus.Registerer and // prometheus.Gatherer interfaces type KubeRegistry interface { // Deprecated RawMustRegister(...prometheus.Collector) // CustomRegister is our internal variant of Prometheus registry.Register CustomRegister(c StableCollector) error // CustomMustRegister is our internal variant of Prometheus registry.MustRegister CustomMustRegister(cs ...StableCollector) // Register conforms to Prometheus registry.Register Register(Registerable) error // MustRegister conforms to Prometheus registry.MustRegister MustRegister(...Registerable) // Unregister conforms to Prometheus registry.Unregister Unregister(collector Collector) bool // Gather conforms to Prometheus gatherer.Gather Gather() ([]*dto.MetricFamily, error) // Reset invokes the Reset() function on all items in the registry // which are added as resettables. Reset() // RegisterMetaMetrics registers metrics about the number of registered metrics. RegisterMetaMetrics() // Registerer exposes the underlying prometheus registerer Registerer() prometheus.Registerer // Gatherer exposes the underlying prometheus gatherer Gatherer() prometheus.Gatherer } // kubeRegistry is a wrapper around a prometheus registry-type object. Upon initialization // the kubernetes binary version information is loaded into the registry object, so that // automatic behavior can be configured for metric versioning. type kubeRegistry struct { PromRegistry version semver.Version hiddenCollectors map[string]Registerable // stores all collectors that has been hidden stableCollectors []StableCollector // stores all stable collector hiddenCollectorsLock sync.RWMutex stableCollectorsLock sync.RWMutex resetLock sync.RWMutex resettables []resettable } // Register registers a new Collector to be included in metrics // collection. It returns an error if the descriptors provided by the // Collector are invalid or if they — in combination with descriptors of // already registered Collectors — do not fulfill the consistency and // uniqueness criteria described in the documentation of metric.Desc. func (kr *kubeRegistry) Register(c Registerable) error { if c.Create(&kr.version) { defer kr.addResettable(c) return kr.PromRegistry.Register(c) } kr.trackHiddenCollector(c) return nil } // Registerer exposes the underlying prometheus.Registerer func (kr *kubeRegistry) Registerer() prometheus.Registerer { return kr.PromRegistry } // Gatherer exposes the underlying prometheus.Gatherer func (kr *kubeRegistry) Gatherer() prometheus.Gatherer { return kr.PromRegistry } // MustRegister works like Register but registers any number of // Collectors and panics upon the first registration that causes an // error. func (kr *kubeRegistry) MustRegister(cs ...Registerable) { metrics := make([]prometheus.Collector, 0, len(cs)) for _, c := range cs { if c.Create(&kr.version) { metrics = append(metrics, c) kr.addResettable(c) } else { kr.trackHiddenCollector(c) } } kr.PromRegistry.MustRegister(metrics...) } // CustomRegister registers a new custom collector. func (kr *kubeRegistry) CustomRegister(c StableCollector) error { kr.trackStableCollectors(c) defer kr.addResettable(c) if c.Create(&kr.version, c) { return kr.PromRegistry.Register(c) } return nil } // CustomMustRegister works like CustomRegister but registers any number of // StableCollectors and panics upon the first registration that causes an // error. func (kr *kubeRegistry) CustomMustRegister(cs ...StableCollector) { kr.trackStableCollectors(cs...) collectors := make([]prometheus.Collector, 0, len(cs)) for _, c := range cs { if c.Create(&kr.version, c) { kr.addResettable(c) collectors = append(collectors, c) } } kr.PromRegistry.MustRegister(collectors...) } // RawMustRegister takes a native prometheus.Collector and registers the collector // to the registry. This bypasses metrics safety checks, so should only be used // to register custom prometheus collectors. // // Deprecated func (kr *kubeRegistry) RawMustRegister(cs ...prometheus.Collector) { kr.PromRegistry.MustRegister(cs...) for _, c := range cs { kr.addResettable(c) } } // addResettable will automatically add our metric to our reset // list if it satisfies the interface func (kr *kubeRegistry) addResettable(i interface{}) { kr.resetLock.Lock() defer kr.resetLock.Unlock() if resettable, ok := i.(resettable); ok { kr.resettables = append(kr.resettables, resettable) } } // Unregister unregisters the Collector that equals the Collector passed // in as an argument. (Two Collectors are considered equal if their // Describe method yields the same set of descriptors.) The function // returns whether a Collector was unregistered. Note that an unchecked // Collector cannot be unregistered (as its Describe method does not // yield any descriptor). func (kr *kubeRegistry) Unregister(collector Collector) bool { return kr.PromRegistry.Unregister(collector) } // Gather calls the Collect method of the registered Collectors and then // gathers the collected metrics into a lexicographically sorted slice // of uniquely named MetricFamily protobufs. Gather ensures that the // returned slice is valid and self-consistent so that it can be used // for valid exposition. As an exception to the strict consistency // requirements described for metric.Desc, Gather will tolerate // different sets of label names for metrics of the same metric family. func (kr *kubeRegistry) Gather() ([]*dto.MetricFamily, error) { return kr.PromRegistry.Gather() } // trackHiddenCollector stores all hidden collectors. func (kr *kubeRegistry) trackHiddenCollector(c Registerable) { kr.hiddenCollectorsLock.Lock() defer kr.hiddenCollectorsLock.Unlock() kr.hiddenCollectors[c.FQName()] = c hiddenMetricsTotal.Inc() } // trackStableCollectors stores all custom collectors. func (kr *kubeRegistry) trackStableCollectors(cs ...StableCollector) { kr.stableCollectorsLock.Lock() defer kr.stableCollectorsLock.Unlock() kr.stableCollectors = append(kr.stableCollectors, cs...) } // enableHiddenCollectors will re-register all of the hidden collectors. func (kr *kubeRegistry) enableHiddenCollectors() { if len(kr.hiddenCollectors) == 0 { return } kr.hiddenCollectorsLock.Lock() cs := make([]Registerable, 0, len(kr.hiddenCollectors)) for _, c := range kr.hiddenCollectors { c.ClearState() cs = append(cs, c) } kr.hiddenCollectors = make(map[string]Registerable) kr.hiddenCollectorsLock.Unlock() kr.MustRegister(cs...) } // enableHiddenStableCollectors will re-register the stable collectors if there is one or more hidden metrics in it. // Since we can not register a metrics twice, so we have to unregister first then register again. func (kr *kubeRegistry) enableHiddenStableCollectors() { if len(kr.stableCollectors) == 0 { return } kr.stableCollectorsLock.Lock() cs := make([]StableCollector, 0, len(kr.stableCollectors)) for _, c := range kr.stableCollectors { if len(c.HiddenMetrics()) > 0 { kr.Unregister(c) // unregister must happens before clear state, otherwise no metrics would be unregister c.ClearState() cs = append(cs, c) } } kr.stableCollectors = nil kr.stableCollectorsLock.Unlock() kr.CustomMustRegister(cs...) } // Reset invokes Reset on all metrics that are resettable. func (kr *kubeRegistry) Reset() { kr.resetLock.RLock() defer kr.resetLock.RUnlock() for _, r := range kr.resettables { r.Reset() } } // BuildVersion is a helper function that can be easily mocked. var BuildVersion = version.Get func newKubeRegistry(v apimachineryversion.Info) *kubeRegistry { r := &kubeRegistry{ PromRegistry: prometheus.NewRegistry(), version: parseVersion(v), hiddenCollectors: make(map[string]Registerable), resettables: make([]resettable, 0), } registriesLock.Lock() defer registriesLock.Unlock() registries = append(registries, r) return r } // NewKubeRegistry creates a new vanilla Registry func NewKubeRegistry() KubeRegistry { r := newKubeRegistry(BuildVersion()) return r } func (r *kubeRegistry) RegisterMetaMetrics() { r.MustRegister(registeredMetricsTotal) r.MustRegister(disabledMetricsTotal) r.MustRegister(hiddenMetricsTotal) r.MustRegister(cardinalityEnforcementUnexpectedCategorizationsTotal) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/component-base/metrics/processstarttime_others.go
vendor/k8s.io/component-base/metrics/processstarttime_others.go
//go:build !windows // +build !windows /* Copyright 2019 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package metrics import ( "os" "github.com/prometheus/procfs" ) func GetProcessStart() (float64, error) { pid := os.Getpid() p, err := procfs.NewProc(pid) if err != nil { return 0, err } if stat, err := p.Stat(); err == nil { return stat.StartTime() } return 0, err }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/component-base/metrics/summary.go
vendor/k8s.io/component-base/metrics/summary.go
/* Copyright 2019 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package metrics import ( "context" "sync" "github.com/blang/semver/v4" "github.com/prometheus/client_golang/prometheus" ) const ( DefAgeBuckets = prometheus.DefAgeBuckets DefBufCap = prometheus.DefBufCap DefMaxAge = prometheus.DefMaxAge ) // Summary is our internal representation for our wrapping struct around prometheus // summaries. Summary implements both kubeCollector and ObserverMetric // // DEPRECATED: as per the metrics overhaul KEP type Summary struct { ObserverMetric *SummaryOpts lazyMetric selfCollector } // NewSummary returns an object which is Summary-like. However, nothing // will be measured until the summary is registered somewhere. // // DEPRECATED: as per the metrics overhaul KEP func NewSummary(opts *SummaryOpts) *Summary { opts.StabilityLevel.setDefaults() s := &Summary{ SummaryOpts: opts, lazyMetric: lazyMetric{stabilityLevel: opts.StabilityLevel}, } s.setPrometheusSummary(noopMetric{}) s.lazyInit(s, BuildFQName(opts.Namespace, opts.Subsystem, opts.Name)) return s } // setPrometheusSummary sets the underlying KubeGauge object, i.e. the thing that does the measurement. func (s *Summary) setPrometheusSummary(summary prometheus.Summary) { s.ObserverMetric = summary s.initSelfCollection(summary) } // DeprecatedVersion returns a pointer to the Version or nil func (s *Summary) DeprecatedVersion() *semver.Version { return parseSemver(s.SummaryOpts.DeprecatedVersion) } // initializeMetric invokes the actual prometheus.Summary object instantiation // and stores a reference to it func (s *Summary) initializeMetric() { s.SummaryOpts.annotateStabilityLevel() // this actually creates the underlying prometheus gauge. s.setPrometheusSummary(prometheus.NewSummary(s.SummaryOpts.toPromSummaryOpts())) } // initializeDeprecatedMetric invokes the actual prometheus.Summary object instantiation // but modifies the Help description prior to object instantiation. func (s *Summary) initializeDeprecatedMetric() { s.SummaryOpts.markDeprecated() s.initializeMetric() } // WithContext allows the normal Summary metric to pass in context. The context is no-op now. func (s *Summary) WithContext(ctx context.Context) ObserverMetric { return s.ObserverMetric } // SummaryVec is the internal representation of our wrapping struct around prometheus // summaryVecs. // // DEPRECATED: as per the metrics overhaul KEP type SummaryVec struct { *prometheus.SummaryVec *SummaryOpts lazyMetric originalLabels []string } // NewSummaryVec returns an object which satisfies kubeCollector and wraps the // prometheus.SummaryVec object. However, the object returned will not measure // anything unless the collector is first registered, since the metric is lazily instantiated, // and only members extracted after // registration will actually measure anything. // // DEPRECATED: as per the metrics overhaul KEP func NewSummaryVec(opts *SummaryOpts, labels []string) *SummaryVec { opts.StabilityLevel.setDefaults() fqName := BuildFQName(opts.Namespace, opts.Subsystem, opts.Name) v := &SummaryVec{ SummaryOpts: opts, originalLabels: labels, lazyMetric: lazyMetric{stabilityLevel: opts.StabilityLevel}, } v.lazyInit(v, fqName) return v } // DeprecatedVersion returns a pointer to the Version or nil func (v *SummaryVec) DeprecatedVersion() *semver.Version { return parseSemver(v.SummaryOpts.DeprecatedVersion) } func (v *SummaryVec) initializeMetric() { v.SummaryOpts.annotateStabilityLevel() v.SummaryVec = prometheus.NewSummaryVec(v.SummaryOpts.toPromSummaryOpts(), v.originalLabels) } func (v *SummaryVec) initializeDeprecatedMetric() { v.SummaryOpts.markDeprecated() v.initializeMetric() } // Default Prometheus Vec behavior is that member extraction results in creation of a new element // if one with the unique label values is not found in the underlying stored metricMap. // This means that if this function is called but the underlying metric is not registered // (which means it will never be exposed externally nor consumed), the metric will exist in memory // for perpetuity (i.e. throughout application lifecycle). // // For reference: https://github.com/prometheus/client_golang/blob/v0.9.2/prometheus/histogram.go#L460-L470 // // In contrast, the Vec behavior in this package is that member extraction before registration // returns a permanent noop object. // WithLabelValues returns the ObserverMetric for the given slice of label // values (same order as the VariableLabels in Desc). If that combination of // label values is accessed for the first time, a new ObserverMetric is created IFF the summaryVec // has been registered to a metrics registry. func (v *SummaryVec) WithLabelValues(lvs ...string) ObserverMetric { if !v.IsCreated() { return noop } if v.LabelValueAllowLists != nil { v.LabelValueAllowLists.ConstrainToAllowedList(v.originalLabels, lvs) } else { v.initializeLabelAllowListsOnce.Do(func() { allowListLock.RLock() if allowList, ok := labelValueAllowLists[v.FQName()]; ok { v.LabelValueAllowLists = allowList allowList.ConstrainToAllowedList(v.originalLabels, lvs) } allowListLock.RUnlock() }) } return v.SummaryVec.WithLabelValues(lvs...) } // With returns the ObserverMetric for the given Labels map (the label names // must match those of the VariableLabels in Desc). If that label map is // accessed for the first time, a new ObserverMetric is created IFF the summaryVec has // been registered to a metrics registry. func (v *SummaryVec) With(labels map[string]string) ObserverMetric { if !v.IsCreated() { return noop } if v.LabelValueAllowLists != nil { v.LabelValueAllowLists.ConstrainLabelMap(labels) } else { v.initializeLabelAllowListsOnce.Do(func() { allowListLock.RLock() if allowList, ok := labelValueAllowLists[v.FQName()]; ok { v.LabelValueAllowLists = allowList allowList.ConstrainLabelMap(labels) } allowListLock.RUnlock() }) } return v.SummaryVec.With(labels) } // Delete deletes the metric where the variable labels are the same as those // passed in as labels. It returns true if a metric was deleted. // // It is not an error if the number and names of the Labels are inconsistent // with those of the VariableLabels in Desc. However, such inconsistent Labels // can never match an actual metric, so the method will always return false in // that case. func (v *SummaryVec) Delete(labels map[string]string) bool { if !v.IsCreated() { return false // since we haven't created the metric, we haven't deleted a metric with the passed in values } return v.SummaryVec.Delete(labels) } // Reset deletes all metrics in this vector. func (v *SummaryVec) Reset() { if !v.IsCreated() { return } v.SummaryVec.Reset() } // ResetLabelAllowLists resets the label allow list for the SummaryVec. // NOTE: This should only be used in test. func (v *SummaryVec) ResetLabelAllowLists() { v.initializeLabelAllowListsOnce = sync.Once{} v.LabelValueAllowLists = nil } // WithContext returns wrapped SummaryVec with context func (v *SummaryVec) WithContext(ctx context.Context) *SummaryVecWithContext { return &SummaryVecWithContext{ ctx: ctx, SummaryVec: v, } } // SummaryVecWithContext is the wrapper of SummaryVec with context. type SummaryVecWithContext struct { *SummaryVec ctx context.Context } // WithLabelValues is the wrapper of SummaryVec.WithLabelValues. func (vc *SummaryVecWithContext) WithLabelValues(lvs ...string) ObserverMetric { return vc.SummaryVec.WithLabelValues(lvs...) } // With is the wrapper of SummaryVec.With. func (vc *SummaryVecWithContext) With(labels map[string]string) ObserverMetric { return vc.SummaryVec.With(labels) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/component-base/metrics/opts.go
vendor/k8s.io/component-base/metrics/opts.go
/* Copyright 2019 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package metrics import ( "fmt" "os" "path/filepath" "strings" "sync" "time" "github.com/prometheus/client_golang/prometheus" "k8s.io/apimachinery/pkg/util/sets" promext "k8s.io/component-base/metrics/prometheusextension" "k8s.io/klog/v2" yaml "sigs.k8s.io/yaml/goyaml.v2" ) var ( labelValueAllowLists = map[string]*MetricLabelAllowList{} allowListLock sync.RWMutex ) // ResetLabelValueAllowLists resets the allow lists for label values. // NOTE: This should only be used in test. func ResetLabelValueAllowLists() { allowListLock.Lock() defer allowListLock.Unlock() labelValueAllowLists = map[string]*MetricLabelAllowList{} } // KubeOpts is superset struct for prometheus.Opts. The prometheus Opts structure // is purposefully not embedded here because that would change struct initialization // in the manner which people are currently accustomed. // // Name must be set to a non-empty string. DeprecatedVersion is defined only // if the metric for which this options applies is, in fact, deprecated. type KubeOpts struct { Namespace string Subsystem string Name string Help string ConstLabels map[string]string DeprecatedVersion string deprecateOnce sync.Once annotateOnce sync.Once StabilityLevel StabilityLevel initializeLabelAllowListsOnce sync.Once LabelValueAllowLists *MetricLabelAllowList } // BuildFQName joins the given three name components by "_". Empty name // components are ignored. If the name parameter itself is empty, an empty // string is returned, no matter what. Metric implementations included in this // library use this function internally to generate the fully-qualified metric // name from the name component in their Opts. Users of the library will only // need this function if they implement their own Metric or instantiate a Desc // (with NewDesc) directly. func BuildFQName(namespace, subsystem, name string) string { return prometheus.BuildFQName(namespace, subsystem, name) } // StabilityLevel represents the API guarantees for a given defined metric. type StabilityLevel string const ( // INTERNAL metrics have no stability guarantees, as such, labels may // be arbitrarily added/removed and the metric may be deleted at any time. INTERNAL StabilityLevel = "INTERNAL" // ALPHA metrics have no stability guarantees, as such, labels may // be arbitrarily added/removed and the metric may be deleted at any time. ALPHA StabilityLevel = "ALPHA" // BETA metrics are governed by the deprecation policy outlined in by // the control plane metrics stability KEP. BETA StabilityLevel = "BETA" // STABLE metrics are guaranteed not be mutated and removal is governed by // the deprecation policy outlined in by the control plane metrics stability KEP. STABLE StabilityLevel = "STABLE" ) // setDefaults takes 'ALPHA' in case of empty. func (sl *StabilityLevel) setDefaults() { switch *sl { case "": *sl = ALPHA default: // no-op, since we have a StabilityLevel already } } // CounterOpts is an alias for Opts. See there for doc comments. type CounterOpts KubeOpts // Modify help description on the metric description. func (o *CounterOpts) markDeprecated() { o.deprecateOnce.Do(func() { o.Help = fmt.Sprintf("(Deprecated since %v) %v", o.DeprecatedVersion, o.Help) }) } // annotateStabilityLevel annotates help description on the metric description with the stability level // of the metric func (o *CounterOpts) annotateStabilityLevel() { o.annotateOnce.Do(func() { o.Help = fmt.Sprintf("[%v] %v", o.StabilityLevel, o.Help) }) } // convenience function to allow easy transformation to the prometheus // counterpart. This will do more once we have a proper label abstraction func (o *CounterOpts) toPromCounterOpts() prometheus.CounterOpts { return prometheus.CounterOpts{ Namespace: o.Namespace, Subsystem: o.Subsystem, Name: o.Name, Help: o.Help, ConstLabels: o.ConstLabels, } } // GaugeOpts is an alias for Opts. See there for doc comments. type GaugeOpts KubeOpts // Modify help description on the metric description. func (o *GaugeOpts) markDeprecated() { o.deprecateOnce.Do(func() { o.Help = fmt.Sprintf("(Deprecated since %v) %v", o.DeprecatedVersion, o.Help) }) } // annotateStabilityLevel annotates help description on the metric description with the stability level // of the metric func (o *GaugeOpts) annotateStabilityLevel() { o.annotateOnce.Do(func() { o.Help = fmt.Sprintf("[%v] %v", o.StabilityLevel, o.Help) }) } // convenience function to allow easy transformation to the prometheus // counterpart. This will do more once we have a proper label abstraction func (o *GaugeOpts) toPromGaugeOpts() prometheus.GaugeOpts { return prometheus.GaugeOpts{ Namespace: o.Namespace, Subsystem: o.Subsystem, Name: o.Name, Help: o.Help, ConstLabels: o.ConstLabels, } } // HistogramOpts bundles the options for creating a Histogram metric. It is // mandatory to set Name to a non-empty string. All other fields are optional // and can safely be left at their zero value, although it is strongly // encouraged to set a Help string. type HistogramOpts struct { Namespace string Subsystem string Name string Help string ConstLabels map[string]string Buckets []float64 DeprecatedVersion string deprecateOnce sync.Once annotateOnce sync.Once StabilityLevel StabilityLevel initializeLabelAllowListsOnce sync.Once LabelValueAllowLists *MetricLabelAllowList } // Modify help description on the metric description. func (o *HistogramOpts) markDeprecated() { o.deprecateOnce.Do(func() { o.Help = fmt.Sprintf("(Deprecated since %v) %v", o.DeprecatedVersion, o.Help) }) } // annotateStabilityLevel annotates help description on the metric description with the stability level // of the metric func (o *HistogramOpts) annotateStabilityLevel() { o.annotateOnce.Do(func() { o.Help = fmt.Sprintf("[%v] %v", o.StabilityLevel, o.Help) }) } // convenience function to allow easy transformation to the prometheus // counterpart. This will do more once we have a proper label abstraction func (o *HistogramOpts) toPromHistogramOpts() prometheus.HistogramOpts { return prometheus.HistogramOpts{ Namespace: o.Namespace, Subsystem: o.Subsystem, Name: o.Name, Help: o.Help, ConstLabels: o.ConstLabels, Buckets: o.Buckets, } } // TimingHistogramOpts bundles the options for creating a TimingHistogram metric. It is // mandatory to set Name to a non-empty string. All other fields are optional // and can safely be left at their zero value, although it is strongly // encouraged to set a Help string. type TimingHistogramOpts struct { Namespace string Subsystem string Name string Help string ConstLabels map[string]string Buckets []float64 InitialValue float64 DeprecatedVersion string deprecateOnce sync.Once annotateOnce sync.Once StabilityLevel StabilityLevel initializeLabelAllowListsOnce sync.Once LabelValueAllowLists *MetricLabelAllowList } // Modify help description on the metric description. func (o *TimingHistogramOpts) markDeprecated() { o.deprecateOnce.Do(func() { o.Help = fmt.Sprintf("(Deprecated since %v) %v", o.DeprecatedVersion, o.Help) }) } // annotateStabilityLevel annotates help description on the metric description with the stability level // of the metric func (o *TimingHistogramOpts) annotateStabilityLevel() { o.annotateOnce.Do(func() { o.Help = fmt.Sprintf("[%v] %v", o.StabilityLevel, o.Help) }) } // convenience function to allow easy transformation to the prometheus // counterpart. This will do more once we have a proper label abstraction func (o *TimingHistogramOpts) toPromHistogramOpts() promext.TimingHistogramOpts { return promext.TimingHistogramOpts{ Namespace: o.Namespace, Subsystem: o.Subsystem, Name: o.Name, Help: o.Help, ConstLabels: o.ConstLabels, Buckets: o.Buckets, InitialValue: o.InitialValue, } } // SummaryOpts bundles the options for creating a Summary metric. It is // mandatory to set Name to a non-empty string. While all other fields are // optional and can safely be left at their zero value, it is recommended to set // a help string and to explicitly set the Objectives field to the desired value // as the default value will change in the upcoming v0.10 of the library. type SummaryOpts struct { Namespace string Subsystem string Name string Help string ConstLabels map[string]string Objectives map[float64]float64 MaxAge time.Duration AgeBuckets uint32 BufCap uint32 DeprecatedVersion string deprecateOnce sync.Once annotateOnce sync.Once StabilityLevel StabilityLevel initializeLabelAllowListsOnce sync.Once LabelValueAllowLists *MetricLabelAllowList } // Modify help description on the metric description. func (o *SummaryOpts) markDeprecated() { o.deprecateOnce.Do(func() { o.Help = fmt.Sprintf("(Deprecated since %v) %v", o.DeprecatedVersion, o.Help) }) } // annotateStabilityLevel annotates help description on the metric description with the stability level // of the metric func (o *SummaryOpts) annotateStabilityLevel() { o.annotateOnce.Do(func() { o.Help = fmt.Sprintf("[%v] %v", o.StabilityLevel, o.Help) }) } // Deprecated: DefObjectives will not be used as the default objectives in // v1.0.0 of the library. The default Summary will have no quantiles then. var ( defObjectives = map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.99: 0.001} ) // convenience function to allow easy transformation to the prometheus // counterpart. This will do more once we have a proper label abstraction func (o *SummaryOpts) toPromSummaryOpts() prometheus.SummaryOpts { // we need to retain existing quantile behavior for backwards compatibility, // so let's do what prometheus used to do prior to v1. objectives := o.Objectives if objectives == nil { objectives = defObjectives } return prometheus.SummaryOpts{ Namespace: o.Namespace, Subsystem: o.Subsystem, Name: o.Name, Help: o.Help, ConstLabels: o.ConstLabels, Objectives: objectives, MaxAge: o.MaxAge, AgeBuckets: o.AgeBuckets, BufCap: o.BufCap, } } type MetricLabelAllowList struct { labelToAllowList map[string]sets.Set[string] } func (allowList *MetricLabelAllowList) ConstrainToAllowedList(labelNameList, labelValueList []string) { for index, value := range labelValueList { name := labelNameList[index] if allowValues, ok := allowList.labelToAllowList[name]; ok { if !allowValues.Has(value) { labelValueList[index] = "unexpected" cardinalityEnforcementUnexpectedCategorizationsTotal.Inc() } } } } func (allowList *MetricLabelAllowList) ConstrainLabelMap(labels map[string]string) { for name, value := range labels { if allowValues, ok := allowList.labelToAllowList[name]; ok { if !allowValues.Has(value) { labels[name] = "unexpected" cardinalityEnforcementUnexpectedCategorizationsTotal.Inc() } } } } func SetLabelAllowListFromCLI(allowListMapping map[string]string) { allowListLock.Lock() defer allowListLock.Unlock() for metricLabelName, labelValues := range allowListMapping { metricName := strings.Split(metricLabelName, ",")[0] labelName := strings.Split(metricLabelName, ",")[1] valueSet := sets.New[string](strings.Split(labelValues, ",")...) allowList, ok := labelValueAllowLists[metricName] if ok { allowList.labelToAllowList[labelName] = valueSet } else { labelToAllowList := make(map[string]sets.Set[string]) labelToAllowList[labelName] = valueSet labelValueAllowLists[metricName] = &MetricLabelAllowList{ labelToAllowList, } } } } func SetLabelAllowListFromManifest(manifest string) { allowListMapping := make(map[string]string) data, err := os.ReadFile(filepath.Clean(manifest)) if err != nil { klog.Errorf("Failed to read allow list manifest: %v", err) return } err = yaml.Unmarshal(data, &allowListMapping) if err != nil { klog.Errorf("Failed to parse allow list manifest: %v", err) return } SetLabelAllowListFromCLI(allowListMapping) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/component-base/metrics/metric.go
vendor/k8s.io/component-base/metrics/metric.go
/* Copyright 2019 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package metrics import ( "sync" "github.com/blang/semver/v4" "github.com/prometheus/client_golang/prometheus" dto "github.com/prometheus/client_model/go" promext "k8s.io/component-base/metrics/prometheusextension" "k8s.io/klog/v2" ) /* kubeCollector extends the prometheus.Collector interface to allow customization of the metric registration process. Defer metric initialization until Create() is called, which then delegates to the underlying metric's initializeMetric or initializeDeprecatedMetric method call depending on whether the metric is deprecated or not. */ type kubeCollector interface { Collector lazyKubeMetric DeprecatedVersion() *semver.Version // Each collector metric should provide an initialization function // for both deprecated and non-deprecated variants of a metric. This // is necessary since metric instantiation will be deferred // until the metric is actually registered somewhere. initializeMetric() initializeDeprecatedMetric() } /* lazyKubeMetric defines our metric registration interface. lazyKubeMetric objects are expected to lazily instantiate metrics (i.e defer metric instantiation until when the Create() function is explicitly called). */ type lazyKubeMetric interface { Create(*semver.Version) bool IsCreated() bool IsHidden() bool IsDeprecated() bool } /* lazyMetric implements lazyKubeMetric. A lazy metric is lazy because it waits until metric registration time before instantiation. Add it as an anonymous field to a struct that implements kubeCollector to get deferred registration behavior. You must call lazyInit with the kubeCollector itself as an argument. */ type lazyMetric struct { fqName string isDeprecated bool isHidden bool isCreated bool createLock sync.RWMutex markDeprecationOnce sync.Once createOnce sync.Once self kubeCollector stabilityLevel StabilityLevel } func (r *lazyMetric) IsCreated() bool { r.createLock.RLock() defer r.createLock.RUnlock() return r.isCreated } // lazyInit provides the lazyMetric with a reference to the kubeCollector it is supposed // to allow lazy initialization for. It should be invoked in the factory function which creates new // kubeCollector type objects. func (r *lazyMetric) lazyInit(self kubeCollector, fqName string) { r.fqName = fqName r.self = self } // preprocessMetric figures out whether the lazy metric should be hidden or not. // This method takes a Version argument which should be the version of the binary in which // this code is currently being executed. A metric can be hidden under two conditions: // 1. if the metric is deprecated and is outside the grace period (i.e. has been // deprecated for more than one release // 2. if the metric is manually disabled via a CLI flag. // // Disclaimer: disabling a metric via a CLI flag has higher precedence than // deprecation and will override show-hidden-metrics for the explicitly // disabled metric. func (r *lazyMetric) preprocessMetric(version semver.Version) { disabledMetricsLock.RLock() defer disabledMetricsLock.RUnlock() // disabling metrics is higher in precedence than showing hidden metrics if _, ok := disabledMetrics[r.fqName]; ok { r.isHidden = true return } selfVersion := r.self.DeprecatedVersion() if selfVersion == nil { return } r.markDeprecationOnce.Do(func() { if selfVersion.LTE(version) { r.isDeprecated = true } if ShouldShowHidden() { klog.Warningf("Hidden metrics (%s) have been manually overridden, showing this very deprecated metric.", r.fqName) return } if shouldHide(&version, selfVersion) { // TODO(RainbowMango): Remove this log temporarily. https://github.com/kubernetes/kubernetes/issues/85369 // klog.Warningf("This metric has been deprecated for more than one release, hiding.") r.isHidden = true } }) } func (r *lazyMetric) IsHidden() bool { return r.isHidden } func (r *lazyMetric) IsDeprecated() bool { return r.isDeprecated } // Create forces the initialization of metric which has been deferred until // the point at which this method is invoked. This method will determine whether // the metric is deprecated or hidden, no-opting if the metric should be considered // hidden. Furthermore, this function no-opts and returns true if metric is already // created. func (r *lazyMetric) Create(version *semver.Version) bool { if version != nil { r.preprocessMetric(*version) } // let's not create if this metric is slated to be hidden if r.IsHidden() { return false } r.createOnce.Do(func() { r.createLock.Lock() defer r.createLock.Unlock() r.isCreated = true if r.IsDeprecated() { r.self.initializeDeprecatedMetric() } else { r.self.initializeMetric() } }) sl := r.stabilityLevel deprecatedV := r.self.DeprecatedVersion() dv := "" if deprecatedV != nil { dv = deprecatedV.String() } registeredMetricsTotal.WithLabelValues(string(sl), dv).Inc() return r.IsCreated() } // ClearState will clear all the states marked by Create. // It intends to be used for re-register a hidden metric. func (r *lazyMetric) ClearState() { r.createLock.Lock() defer r.createLock.Unlock() r.isDeprecated = false r.isHidden = false r.isCreated = false r.markDeprecationOnce = sync.Once{} r.createOnce = sync.Once{} } // FQName returns the fully-qualified metric name of the collector. func (r *lazyMetric) FQName() string { return r.fqName } /* This code is directly lifted from the prometheus codebase. It's a convenience struct which allows you satisfy the Collector interface automatically if you already satisfy the Metric interface. For reference: https://github.com/prometheus/client_golang/blob/v0.9.2/prometheus/collector.go#L98-L120 */ type selfCollector struct { metric prometheus.Metric } func (c *selfCollector) initSelfCollection(m prometheus.Metric) { c.metric = m } func (c *selfCollector) Describe(ch chan<- *prometheus.Desc) { ch <- c.metric.Desc() } func (c *selfCollector) Collect(ch chan<- prometheus.Metric) { ch <- c.metric } // metricWithExemplar is an interface that knows how to attach an exemplar to certain supported metric types. type metricWithExemplar interface { withExemplar(v float64) } // no-op vecs for convenience var noopCounterVec = &prometheus.CounterVec{} var noopHistogramVec = &prometheus.HistogramVec{} var noopTimingHistogramVec = &promext.TimingHistogramVec{} var noopGaugeVec = &prometheus.GaugeVec{} // just use a convenience struct for all the no-ops var noop = &noopMetric{} type noopMetric struct{} func (noopMetric) Inc() {} func (noopMetric) Add(float64) {} func (noopMetric) Dec() {} func (noopMetric) Set(float64) {} func (noopMetric) Sub(float64) {} func (noopMetric) Observe(float64) {} func (noopMetric) ObserveWithWeight(float64, uint64) {} func (noopMetric) SetToCurrentTime() {} func (noopMetric) Desc() *prometheus.Desc { return nil } func (noopMetric) Write(*dto.Metric) error { return nil } func (noopMetric) Describe(chan<- *prometheus.Desc) {} func (noopMetric) Collect(chan<- prometheus.Metric) {}
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/component-base/metrics/buckets.go
vendor/k8s.io/component-base/metrics/buckets.go
/* Copyright 2022 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package metrics import ( "github.com/prometheus/client_golang/prometheus" ) // DefBuckets is a wrapper for prometheus.DefBuckets var DefBuckets = prometheus.DefBuckets // LinearBuckets is a wrapper for prometheus.LinearBuckets. func LinearBuckets(start, width float64, count int) []float64 { return prometheus.LinearBuckets(start, width, count) } // ExponentialBuckets is a wrapper for prometheus.ExponentialBuckets. func ExponentialBuckets(start, factor float64, count int) []float64 { return prometheus.ExponentialBuckets(start, factor, count) } // ExponentialBucketsRange creates 'count' buckets, where the lowest bucket is // 'min' and the highest bucket is 'max'. The final +Inf bucket is not counted // and not included in the returned slice. The returned slice is meant to be // used for the Buckets field of HistogramOpts. // // The function panics if 'count' is 0 or negative, if 'min' is 0 or negative. func ExponentialBucketsRange(min, max float64, count int) []float64 { return prometheus.ExponentialBucketsRange(min, max, count) } // MergeBuckets merges buckets together func MergeBuckets(buckets ...[]float64) []float64 { result := make([]float64, 1) for _, s := range buckets { result = append(result, s...) } return result }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/component-base/metrics/counter.go
vendor/k8s.io/component-base/metrics/counter.go
/* Copyright 2019 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package metrics import ( "context" "sync" "github.com/blang/semver/v4" "github.com/prometheus/client_golang/prometheus" "go.opentelemetry.io/otel/trace" dto "github.com/prometheus/client_model/go" ) // Counter is our internal representation for our wrapping struct around prometheus // counters. Counter implements both kubeCollector and CounterMetric. type Counter struct { ctx context.Context CounterMetric *CounterOpts lazyMetric selfCollector } // The implementation of the Metric interface is expected by testutil.GetCounterMetricValue. var _ Metric = &Counter{} // All supported exemplar metric types implement the metricWithExemplar interface. var _ metricWithExemplar = &Counter{} // exemplarCounterMetric holds a context to extract exemplar labels from, and a counter metric to attach them to. It implements the metricWithExemplar interface. type exemplarCounterMetric struct { *Counter } // NewCounter returns an object which satisfies the kubeCollector and CounterMetric interfaces. // However, the object returned will not measure anything unless the collector is first // registered, since the metric is lazily instantiated. func NewCounter(opts *CounterOpts) *Counter { opts.StabilityLevel.setDefaults() kc := &Counter{ CounterOpts: opts, lazyMetric: lazyMetric{stabilityLevel: opts.StabilityLevel}, } kc.setPrometheusCounter(noop) kc.lazyInit(kc, BuildFQName(opts.Namespace, opts.Subsystem, opts.Name)) return kc } func (c *Counter) Desc() *prometheus.Desc { return c.metric.Desc() } func (c *Counter) Write(to *dto.Metric) error { return c.metric.Write(to) } // Reset resets the underlying prometheus Counter to start counting from 0 again func (c *Counter) Reset() { if !c.IsCreated() { return } c.setPrometheusCounter(prometheus.NewCounter(c.CounterOpts.toPromCounterOpts())) } // setPrometheusCounter sets the underlying CounterMetric object, i.e. the thing that does the measurement. func (c *Counter) setPrometheusCounter(counter prometheus.Counter) { c.CounterMetric = counter c.initSelfCollection(counter) } // DeprecatedVersion returns a pointer to the Version or nil func (c *Counter) DeprecatedVersion() *semver.Version { return parseSemver(c.CounterOpts.DeprecatedVersion) } // initializeMetric invocation creates the actual underlying Counter. Until this method is called // the underlying counter is a no-op. func (c *Counter) initializeMetric() { c.CounterOpts.annotateStabilityLevel() // this actually creates the underlying prometheus counter. c.setPrometheusCounter(prometheus.NewCounter(c.CounterOpts.toPromCounterOpts())) } // initializeDeprecatedMetric invocation creates the actual (but deprecated) Counter. Until this method // is called the underlying counter is a no-op. func (c *Counter) initializeDeprecatedMetric() { c.CounterOpts.markDeprecated() c.initializeMetric() } // WithContext allows the normal Counter metric to pass in context. func (c *Counter) WithContext(ctx context.Context) CounterMetric { c.ctx = ctx return c.CounterMetric } // withExemplar initializes the exemplarMetric object and sets the exemplar value. func (c *Counter) withExemplar(v float64) { (&exemplarCounterMetric{c}).withExemplar(v) } func (c *Counter) Add(v float64) { c.withExemplar(v) } func (c *Counter) Inc() { c.withExemplar(1) } // withExemplar attaches an exemplar to the metric. func (e *exemplarCounterMetric) withExemplar(v float64) { if m, ok := e.CounterMetric.(prometheus.ExemplarAdder); ok { maybeSpanCtx := trace.SpanContextFromContext(e.ctx) if maybeSpanCtx.IsValid() && maybeSpanCtx.IsSampled() { exemplarLabels := prometheus.Labels{ "trace_id": maybeSpanCtx.TraceID().String(), "span_id": maybeSpanCtx.SpanID().String(), } m.AddWithExemplar(v, exemplarLabels) return } } e.CounterMetric.Add(v) } // CounterVec is the internal representation of our wrapping struct around prometheus // counterVecs. CounterVec implements both kubeCollector and CounterVecMetric. type CounterVec struct { *prometheus.CounterVec *CounterOpts lazyMetric originalLabels []string } var _ kubeCollector = &CounterVec{} // TODO: make this true: var _ CounterVecMetric = &CounterVec{} // NewCounterVec returns an object which satisfies the kubeCollector and (almost) CounterVecMetric interfaces. // However, the object returned will not measure anything unless the collector is first // registered, since the metric is lazily instantiated, and only members extracted after // registration will actually measure anything. func NewCounterVec(opts *CounterOpts, labels []string) *CounterVec { opts.StabilityLevel.setDefaults() fqName := BuildFQName(opts.Namespace, opts.Subsystem, opts.Name) cv := &CounterVec{ CounterVec: noopCounterVec, CounterOpts: opts, originalLabels: labels, lazyMetric: lazyMetric{stabilityLevel: opts.StabilityLevel}, } cv.lazyInit(cv, fqName) return cv } // DeprecatedVersion returns a pointer to the Version or nil func (v *CounterVec) DeprecatedVersion() *semver.Version { return parseSemver(v.CounterOpts.DeprecatedVersion) } // initializeMetric invocation creates the actual underlying CounterVec. Until this method is called // the underlying counterVec is a no-op. func (v *CounterVec) initializeMetric() { v.CounterOpts.annotateStabilityLevel() v.CounterVec = prometheus.NewCounterVec(v.CounterOpts.toPromCounterOpts(), v.originalLabels) } // initializeDeprecatedMetric invocation creates the actual (but deprecated) CounterVec. Until this method is called // the underlying counterVec is a no-op. func (v *CounterVec) initializeDeprecatedMetric() { v.CounterOpts.markDeprecated() v.initializeMetric() } // Default Prometheus Vec behavior is that member extraction results in creation of a new element // if one with the unique label values is not found in the underlying stored metricMap. // This means that if this function is called but the underlying metric is not registered // (which means it will never be exposed externally nor consumed), the metric will exist in memory // for perpetuity (i.e. throughout application lifecycle). // // For reference: https://github.com/prometheus/client_golang/blob/v0.9.2/prometheus/counter.go#L179-L197 // // In contrast, the Vec behavior in this package is that member extraction before registration // returns a permanent noop object. // WithLabelValues returns the Counter for the given slice of label // values (same order as the VariableLabels in Desc). If that combination of // label values is accessed for the first time, a new Counter is created IFF the counterVec // has been registered to a metrics registry. func (v *CounterVec) WithLabelValues(lvs ...string) CounterMetric { if !v.IsCreated() { return noop // return no-op counter } if v.LabelValueAllowLists != nil { v.LabelValueAllowLists.ConstrainToAllowedList(v.originalLabels, lvs) } else { v.initializeLabelAllowListsOnce.Do(func() { allowListLock.RLock() if allowList, ok := labelValueAllowLists[v.FQName()]; ok { v.LabelValueAllowLists = allowList allowList.ConstrainToAllowedList(v.originalLabels, lvs) } allowListLock.RUnlock() }) } return v.CounterVec.WithLabelValues(lvs...) } // With returns the Counter for the given Labels map (the label names // must match those of the VariableLabels in Desc). If that label map is // accessed for the first time, a new Counter is created IFF the counterVec has // been registered to a metrics registry. func (v *CounterVec) With(labels map[string]string) CounterMetric { if !v.IsCreated() { return noop // return no-op counter } if v.LabelValueAllowLists != nil { v.LabelValueAllowLists.ConstrainLabelMap(labels) } else { v.initializeLabelAllowListsOnce.Do(func() { allowListLock.RLock() if allowList, ok := labelValueAllowLists[v.FQName()]; ok { v.LabelValueAllowLists = allowList allowList.ConstrainLabelMap(labels) } allowListLock.RUnlock() }) } return v.CounterVec.With(labels) } // Delete deletes the metric where the variable labels are the same as those // passed in as labels. It returns true if a metric was deleted. // // It is not an error if the number and names of the Labels are inconsistent // with those of the VariableLabels in Desc. However, such inconsistent Labels // can never match an actual metric, so the method will always return false in // that case. func (v *CounterVec) Delete(labels map[string]string) bool { if !v.IsCreated() { return false // since we haven't created the metric, we haven't deleted a metric with the passed in values } return v.CounterVec.Delete(labels) } // Reset deletes all metrics in this vector. func (v *CounterVec) Reset() { if !v.IsCreated() { return } v.CounterVec.Reset() } // ResetLabelAllowLists resets the label allow list for the CounterVec. // NOTE: This should only be used in test. func (v *CounterVec) ResetLabelAllowLists() { v.initializeLabelAllowListsOnce = sync.Once{} v.LabelValueAllowLists = nil } // WithContext returns wrapped CounterVec with context func (v *CounterVec) WithContext(ctx context.Context) *CounterVecWithContext { return &CounterVecWithContext{ ctx: ctx, CounterVec: v, } } // CounterVecWithContext is the wrapper of CounterVec with context. type CounterVecWithContext struct { *CounterVec ctx context.Context } // WithLabelValues is the wrapper of CounterVec.WithLabelValues. func (vc *CounterVecWithContext) WithLabelValues(lvs ...string) CounterMetric { return vc.CounterVec.WithLabelValues(lvs...) } // With is the wrapper of CounterVec.With. func (vc *CounterVecWithContext) With(labels map[string]string) CounterMetric { return vc.CounterVec.With(labels) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/component-base/metrics/processstarttime.go
vendor/k8s.io/component-base/metrics/processstarttime.go
/* Copyright 2019 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package metrics import ( "time" "k8s.io/klog/v2" ) var processStartTime = NewGaugeVec( &GaugeOpts{ Name: "process_start_time_seconds", Help: "Start time of the process since unix epoch in seconds.", StabilityLevel: ALPHA, }, []string{}, ) // RegisterProcessStartTime registers the process_start_time_seconds to // a prometheus registry. This metric needs to be included to ensure counter // data fidelity. func RegisterProcessStartTime(registrationFunc func(Registerable) error) error { start, err := GetProcessStart() if err != nil { klog.Errorf("Could not get process start time, %v", err) start = float64(time.Now().Unix()) } // processStartTime is a lazy metric which only get initialized after registered. // so we need to register the metric first and then set the value for it if err = registrationFunc(processStartTime); err != nil { return err } processStartTime.WithLabelValues().Set(start) return nil }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/component-base/metrics/labels.go
vendor/k8s.io/component-base/metrics/labels.go
/* Copyright 2019 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package metrics import "github.com/prometheus/client_golang/prometheus" // Labels represents a collection of label name -> value mappings. type Labels prometheus.Labels
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/component-base/metrics/gauge.go
vendor/k8s.io/component-base/metrics/gauge.go
/* Copyright 2019 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package metrics import ( "context" "sync" "github.com/blang/semver/v4" "github.com/prometheus/client_golang/prometheus" "k8s.io/component-base/version" ) // Gauge is our internal representation for our wrapping struct around prometheus // gauges. kubeGauge implements both kubeCollector and KubeGauge. type Gauge struct { GaugeMetric *GaugeOpts lazyMetric selfCollector } var _ GaugeMetric = &Gauge{} var _ Registerable = &Gauge{} var _ kubeCollector = &Gauge{} // NewGauge returns an object which satisfies the kubeCollector, Registerable, and Gauge interfaces. // However, the object returned will not measure anything unless the collector is first // registered, since the metric is lazily instantiated. func NewGauge(opts *GaugeOpts) *Gauge { opts.StabilityLevel.setDefaults() kc := &Gauge{ GaugeOpts: opts, lazyMetric: lazyMetric{stabilityLevel: opts.StabilityLevel}, } kc.setPrometheusGauge(noop) kc.lazyInit(kc, BuildFQName(opts.Namespace, opts.Subsystem, opts.Name)) return kc } // setPrometheusGauge sets the underlying KubeGauge object, i.e. the thing that does the measurement. func (g *Gauge) setPrometheusGauge(gauge prometheus.Gauge) { g.GaugeMetric = gauge g.initSelfCollection(gauge) } // DeprecatedVersion returns a pointer to the Version or nil func (g *Gauge) DeprecatedVersion() *semver.Version { return parseSemver(g.GaugeOpts.DeprecatedVersion) } // initializeMetric invocation creates the actual underlying Gauge. Until this method is called // the underlying gauge is a no-op. func (g *Gauge) initializeMetric() { g.GaugeOpts.annotateStabilityLevel() // this actually creates the underlying prometheus gauge. g.setPrometheusGauge(prometheus.NewGauge(g.GaugeOpts.toPromGaugeOpts())) } // initializeDeprecatedMetric invocation creates the actual (but deprecated) Gauge. Until this method // is called the underlying gauge is a no-op. func (g *Gauge) initializeDeprecatedMetric() { g.GaugeOpts.markDeprecated() g.initializeMetric() } // WithContext allows the normal Gauge metric to pass in context. The context is no-op now. func (g *Gauge) WithContext(ctx context.Context) GaugeMetric { return g.GaugeMetric } // GaugeVec is the internal representation of our wrapping struct around prometheus // gaugeVecs. kubeGaugeVec implements both kubeCollector and KubeGaugeVec. type GaugeVec struct { *prometheus.GaugeVec *GaugeOpts lazyMetric originalLabels []string } var _ GaugeVecMetric = &GaugeVec{} var _ Registerable = &GaugeVec{} var _ kubeCollector = &GaugeVec{} // NewGaugeVec returns an object which satisfies the kubeCollector, Registerable, and GaugeVecMetric interfaces. // However, the object returned will not measure anything unless the collector is first // registered, since the metric is lazily instantiated, and only members extracted after // registration will actually measure anything. func NewGaugeVec(opts *GaugeOpts, labels []string) *GaugeVec { opts.StabilityLevel.setDefaults() fqName := BuildFQName(opts.Namespace, opts.Subsystem, opts.Name) cv := &GaugeVec{ GaugeVec: noopGaugeVec, GaugeOpts: opts, originalLabels: labels, lazyMetric: lazyMetric{stabilityLevel: opts.StabilityLevel}, } cv.lazyInit(cv, fqName) return cv } // DeprecatedVersion returns a pointer to the Version or nil func (v *GaugeVec) DeprecatedVersion() *semver.Version { return parseSemver(v.GaugeOpts.DeprecatedVersion) } // initializeMetric invocation creates the actual underlying GaugeVec. Until this method is called // the underlying gaugeVec is a no-op. func (v *GaugeVec) initializeMetric() { v.GaugeOpts.annotateStabilityLevel() v.GaugeVec = prometheus.NewGaugeVec(v.GaugeOpts.toPromGaugeOpts(), v.originalLabels) } // initializeDeprecatedMetric invocation creates the actual (but deprecated) GaugeVec. Until this method is called // the underlying gaugeVec is a no-op. func (v *GaugeVec) initializeDeprecatedMetric() { v.GaugeOpts.markDeprecated() v.initializeMetric() } func (v *GaugeVec) WithLabelValuesChecked(lvs ...string) (GaugeMetric, error) { if !v.IsCreated() { if v.IsHidden() { return noop, nil } return noop, errNotRegistered // return no-op gauge } if v.LabelValueAllowLists != nil { v.LabelValueAllowLists.ConstrainToAllowedList(v.originalLabels, lvs) } else { v.initializeLabelAllowListsOnce.Do(func() { allowListLock.RLock() if allowList, ok := labelValueAllowLists[v.FQName()]; ok { v.LabelValueAllowLists = allowList allowList.ConstrainToAllowedList(v.originalLabels, lvs) } allowListLock.RUnlock() }) } elt, err := v.GaugeVec.GetMetricWithLabelValues(lvs...) return elt, err } // Default Prometheus Vec behavior is that member extraction results in creation of a new element // if one with the unique label values is not found in the underlying stored metricMap. // This means that if this function is called but the underlying metric is not registered // (which means it will never be exposed externally nor consumed), the metric will exist in memory // for perpetuity (i.e. throughout application lifecycle). // // For reference: https://github.com/prometheus/client_golang/blob/v0.9.2/prometheus/gauge.go#L190-L208 // // In contrast, the Vec behavior in this package is that member extraction before registration // returns a permanent noop object. // WithLabelValues returns the GaugeMetric for the given slice of label // values (same order as the VariableLabels in Desc). If that combination of // label values is accessed for the first time, a new GaugeMetric is created IFF the gaugeVec // has been registered to a metrics registry. func (v *GaugeVec) WithLabelValues(lvs ...string) GaugeMetric { ans, err := v.WithLabelValuesChecked(lvs...) if err == nil || ErrIsNotRegistered(err) { return ans } panic(err) } func (v *GaugeVec) WithChecked(labels map[string]string) (GaugeMetric, error) { if !v.IsCreated() { if v.IsHidden() { return noop, nil } return noop, errNotRegistered // return no-op gauge } if v.LabelValueAllowLists != nil { v.LabelValueAllowLists.ConstrainLabelMap(labels) } else { v.initializeLabelAllowListsOnce.Do(func() { allowListLock.RLock() if allowList, ok := labelValueAllowLists[v.FQName()]; ok { v.LabelValueAllowLists = allowList allowList.ConstrainLabelMap(labels) } allowListLock.RUnlock() }) } elt, err := v.GaugeVec.GetMetricWith(labels) return elt, err } // With returns the GaugeMetric for the given Labels map (the label names // must match those of the VariableLabels in Desc). If that label map is // accessed for the first time, a new GaugeMetric is created IFF the gaugeVec has // been registered to a metrics registry. func (v *GaugeVec) With(labels map[string]string) GaugeMetric { ans, err := v.WithChecked(labels) if err == nil || ErrIsNotRegistered(err) { return ans } panic(err) } // Delete deletes the metric where the variable labels are the same as those // passed in as labels. It returns true if a metric was deleted. // // It is not an error if the number and names of the Labels are inconsistent // with those of the VariableLabels in Desc. However, such inconsistent Labels // can never match an actual metric, so the method will always return false in // that case. func (v *GaugeVec) Delete(labels map[string]string) bool { if !v.IsCreated() { return false // since we haven't created the metric, we haven't deleted a metric with the passed in values } return v.GaugeVec.Delete(labels) } // Reset deletes all metrics in this vector. func (v *GaugeVec) Reset() { if !v.IsCreated() { return } v.GaugeVec.Reset() } // ResetLabelAllowLists resets the label allow list for the GaugeVec. // NOTE: This should only be used in test. func (v *GaugeVec) ResetLabelAllowLists() { v.initializeLabelAllowListsOnce = sync.Once{} v.LabelValueAllowLists = nil } func newGaugeFunc(opts *GaugeOpts, function func() float64, v semver.Version) GaugeFunc { g := NewGauge(opts) if !g.Create(&v) { return nil } return prometheus.NewGaugeFunc(g.GaugeOpts.toPromGaugeOpts(), function) } // NewGaugeFunc creates a new GaugeFunc based on the provided GaugeOpts. The // value reported is determined by calling the given function from within the // Write method. Take into account that metric collection may happen // concurrently. If that results in concurrent calls to Write, like in the case // where a GaugeFunc is directly registered with Prometheus, the provided // function must be concurrency-safe. func NewGaugeFunc(opts *GaugeOpts, function func() float64) GaugeFunc { v := parseVersion(version.Get()) return newGaugeFunc(opts, function, v) } // WithContext returns wrapped GaugeVec with context func (v *GaugeVec) WithContext(ctx context.Context) *GaugeVecWithContext { return &GaugeVecWithContext{ ctx: ctx, GaugeVec: v, } } func (v *GaugeVec) InterfaceWithContext(ctx context.Context) GaugeVecMetric { return v.WithContext(ctx) } // GaugeVecWithContext is the wrapper of GaugeVec with context. type GaugeVecWithContext struct { *GaugeVec ctx context.Context } // WithLabelValues is the wrapper of GaugeVec.WithLabelValues. func (vc *GaugeVecWithContext) WithLabelValues(lvs ...string) GaugeMetric { return vc.GaugeVec.WithLabelValues(lvs...) } // With is the wrapper of GaugeVec.With. func (vc *GaugeVecWithContext) With(labels map[string]string) GaugeMetric { return vc.GaugeVec.With(labels) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/component-base/metrics/http.go
vendor/k8s.io/component-base/metrics/http.go
/* Copyright 2019 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package metrics import ( "io" "net/http" "time" "github.com/prometheus/client_golang/prometheus/promhttp" ) var ( processStartedAt time.Time ) func init() { processStartedAt = time.Now() } // These constants cause handlers serving metrics to behave as described if // errors are encountered. const ( // HTTPErrorOnError serve an HTTP status code 500 upon the first error // encountered. Report the error message in the body. HTTPErrorOnError promhttp.HandlerErrorHandling = iota // ContinueOnError ignore errors and try to serve as many metrics as possible. // However, if no metrics can be served, serve an HTTP status code 500 and the // last error message in the body. Only use this in deliberate "best // effort" metrics collection scenarios. In this case, it is highly // recommended to provide other means of detecting errors: By setting an // ErrorLog in HandlerOpts, the errors are logged. By providing a // Registry in HandlerOpts, the exposed metrics include an error counter // "promhttp_metric_handler_errors_total", which can be used for // alerts. ContinueOnError // PanicOnError panics upon the first error encountered (useful for "crash only" apps). PanicOnError ) // HandlerOpts specifies options how to serve metrics via an http.Handler. The // zero value of HandlerOpts is a reasonable default. type HandlerOpts promhttp.HandlerOpts func (ho *HandlerOpts) toPromhttpHandlerOpts() promhttp.HandlerOpts { ho.ProcessStartTime = processStartedAt return promhttp.HandlerOpts(*ho) } // HandlerFor returns an uninstrumented http.Handler for the provided // Gatherer. The behavior of the Handler is defined by the provided // HandlerOpts. Thus, HandlerFor is useful to create http.Handlers for custom // Gatherers, with non-default HandlerOpts, and/or with custom (or no) // instrumentation. Use the InstrumentMetricHandler function to apply the same // kind of instrumentation as it is used by the Handler function. func HandlerFor(reg Gatherer, opts HandlerOpts) http.Handler { return promhttp.HandlerFor(reg, opts.toPromhttpHandlerOpts()) } // HandlerWithReset return an http.Handler with Reset func HandlerWithReset(reg KubeRegistry, opts HandlerOpts) http.Handler { defaultHandler := promhttp.HandlerFor(reg, opts.toPromhttpHandlerOpts()) return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { if r.Method == http.MethodDelete { reg.Reset() io.WriteString(w, "metrics reset\n") return } defaultHandler.ServeHTTP(w, r) }) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/component-base/metrics/options.go
vendor/k8s.io/component-base/metrics/options.go
/* Copyright 2019 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package metrics import ( "fmt" "regexp" "github.com/blang/semver/v4" "github.com/spf13/pflag" "k8s.io/component-base/version" ) // Options has all parameters needed for exposing metrics from components type Options struct { ShowHiddenMetricsForVersion string DisabledMetrics []string AllowListMapping map[string]string AllowListMappingManifest string } // NewOptions returns default metrics options func NewOptions() *Options { return &Options{} } // Validate validates metrics flags options. func (o *Options) Validate() []error { if o == nil { return nil } var errs []error err := validateShowHiddenMetricsVersion(parseVersion(version.Get()), o.ShowHiddenMetricsForVersion) if err != nil { errs = append(errs, err) } if err := validateAllowMetricLabel(o.AllowListMapping); err != nil { errs = append(errs, err) } if len(errs) == 0 { return nil } return errs } // AddFlags adds flags for exposing component metrics. func (o *Options) AddFlags(fs *pflag.FlagSet) { if o == nil { return } fs.StringVar(&o.ShowHiddenMetricsForVersion, "show-hidden-metrics-for-version", o.ShowHiddenMetricsForVersion, "The previous version for which you want to show hidden metrics. "+ "Only the previous minor version is meaningful, other values will not be allowed. "+ "The format is <major>.<minor>, e.g.: '1.16'. "+ "The purpose of this format is make sure you have the opportunity to notice if the next release hides additional metrics, "+ "rather than being surprised when they are permanently removed in the release after that.") fs.StringSliceVar(&o.DisabledMetrics, "disabled-metrics", o.DisabledMetrics, "This flag provides an escape hatch for misbehaving metrics. "+ "You must provide the fully qualified metric name in order to disable it. "+ "Disclaimer: disabling metrics is higher in precedence than showing hidden metrics.") fs.StringToStringVar(&o.AllowListMapping, "allow-metric-labels", o.AllowListMapping, "The map from metric-label to value allow-list of this label. The key's format is <MetricName>,<LabelName>. "+ "The value's format is <allowed_value>,<allowed_value>..."+ "e.g. metric1,label1='v1,v2,v3', metric1,label2='v1,v2,v3' metric2,label1='v1,v2,v3'.") fs.StringVar(&o.AllowListMappingManifest, "allow-metric-labels-manifest", o.AllowListMappingManifest, "The path to the manifest file that contains the allow-list mapping. "+ "The format of the file is the same as the flag --allow-metric-labels. "+ "Note that the flag --allow-metric-labels will override the manifest file.") } // Apply applies parameters into global configuration of metrics. func (o *Options) Apply() { if o == nil { return } if len(o.ShowHiddenMetricsForVersion) > 0 { SetShowHidden() } // set disabled metrics for _, metricName := range o.DisabledMetrics { SetDisabledMetric(metricName) } if o.AllowListMapping != nil { SetLabelAllowListFromCLI(o.AllowListMapping) } else if len(o.AllowListMappingManifest) > 0 { SetLabelAllowListFromManifest(o.AllowListMappingManifest) } } func validateShowHiddenMetricsVersion(currentVersion semver.Version, targetVersionStr string) error { if targetVersionStr == "" { return nil } validVersionStr := fmt.Sprintf("%d.%d", currentVersion.Major, currentVersion.Minor-1) if targetVersionStr != validVersionStr { return fmt.Errorf("--show-hidden-metrics-for-version must be omitted or have the value '%v'. Only the previous minor version is allowed", validVersionStr) } return nil } func validateAllowMetricLabel(allowListMapping map[string]string) error { if allowListMapping == nil { return nil } metricNameRegex := `[a-zA-Z_:][a-zA-Z0-9_:]*` labelRegex := `[a-zA-Z_][a-zA-Z0-9_]*` for k := range allowListMapping { reg := regexp.MustCompile(metricNameRegex + `,` + labelRegex) if reg.FindString(k) != k { return fmt.Errorf("--allow-metric-labels must have a list of kv pair with format `metricName,labelName=labelValue, labelValue,...`") } } return nil }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/component-base/metrics/value.go
vendor/k8s.io/component-base/metrics/value.go
/* Copyright 2019 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package metrics import ( "time" "github.com/prometheus/client_golang/prometheus" ) // ValueType is an enumeration of metric types that represent a simple value. type ValueType int // Possible values for the ValueType enum. const ( _ ValueType = iota CounterValue GaugeValue UntypedValue ) func (vt *ValueType) toPromValueType() prometheus.ValueType { return prometheus.ValueType(*vt) } // NewLazyConstMetric is a helper of MustNewConstMetric. // // Note: If the metrics described by the desc is hidden, the metrics will not be created. func NewLazyConstMetric(desc *Desc, valueType ValueType, value float64, labelValues ...string) Metric { if desc.IsHidden() { return nil } return prometheus.MustNewConstMetric(desc.toPrometheusDesc(), valueType.toPromValueType(), value, labelValues...) } // NewConstMetric is a helper of NewConstMetric. // // Note: If the metrics described by the desc is hidden, the metrics will not be created. func NewConstMetric(desc *Desc, valueType ValueType, value float64, labelValues ...string) (Metric, error) { if desc.IsHidden() { return nil, nil } return prometheus.NewConstMetric(desc.toPrometheusDesc(), valueType.toPromValueType(), value, labelValues...) } // NewLazyMetricWithTimestamp is a helper of NewMetricWithTimestamp. // // Warning: the Metric 'm' must be the one created by NewLazyConstMetric(), // otherwise, no stability guarantees would be offered. func NewLazyMetricWithTimestamp(t time.Time, m Metric) Metric { if m == nil { return nil } return prometheus.NewMetricWithTimestamp(t, m) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/component-base/metrics/timing_histogram.go
vendor/k8s.io/component-base/metrics/timing_histogram.go
/* Copyright 2019 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package metrics import ( "context" "sync" "time" "github.com/blang/semver/v4" promext "k8s.io/component-base/metrics/prometheusextension" ) // PrometheusTimingHistogram is the abstraction of the underlying histogram // that we want to promote from the wrapper. type PrometheusTimingHistogram interface { GaugeMetric } // TimingHistogram is our internal representation for our wrapping struct around // timing histograms. It implements both kubeCollector and GaugeMetric type TimingHistogram struct { PrometheusTimingHistogram *TimingHistogramOpts nowFunc func() time.Time lazyMetric selfCollector } var _ GaugeMetric = &TimingHistogram{} var _ Registerable = &TimingHistogram{} var _ kubeCollector = &TimingHistogram{} // NewTimingHistogram returns an object which is TimingHistogram-like. However, nothing // will be measured until the histogram is registered somewhere. func NewTimingHistogram(opts *TimingHistogramOpts) *TimingHistogram { return NewTestableTimingHistogram(time.Now, opts) } // NewTestableTimingHistogram adds injection of the clock func NewTestableTimingHistogram(nowFunc func() time.Time, opts *TimingHistogramOpts) *TimingHistogram { opts.StabilityLevel.setDefaults() h := &TimingHistogram{ TimingHistogramOpts: opts, nowFunc: nowFunc, lazyMetric: lazyMetric{stabilityLevel: opts.StabilityLevel}, } h.setPrometheusHistogram(noopMetric{}) h.lazyInit(h, BuildFQName(opts.Namespace, opts.Subsystem, opts.Name)) return h } // setPrometheusHistogram sets the underlying KubeGauge object, i.e. the thing that does the measurement. func (h *TimingHistogram) setPrometheusHistogram(histogram promext.TimingHistogram) { h.PrometheusTimingHistogram = histogram h.initSelfCollection(histogram) } // DeprecatedVersion returns a pointer to the Version or nil func (h *TimingHistogram) DeprecatedVersion() *semver.Version { return parseSemver(h.TimingHistogramOpts.DeprecatedVersion) } // initializeMetric invokes the actual prometheus.Histogram object instantiation // and stores a reference to it func (h *TimingHistogram) initializeMetric() { h.TimingHistogramOpts.annotateStabilityLevel() // this actually creates the underlying prometheus gauge. histogram, err := promext.NewTestableTimingHistogram(h.nowFunc, h.TimingHistogramOpts.toPromHistogramOpts()) if err != nil { panic(err) // handle as for regular histograms } h.setPrometheusHistogram(histogram) } // initializeDeprecatedMetric invokes the actual prometheus.Histogram object instantiation // but modifies the Help description prior to object instantiation. func (h *TimingHistogram) initializeDeprecatedMetric() { h.TimingHistogramOpts.markDeprecated() h.initializeMetric() } // WithContext allows the normal TimingHistogram metric to pass in context. The context is no-op now. func (h *TimingHistogram) WithContext(ctx context.Context) GaugeMetric { return h.PrometheusTimingHistogram } // TimingHistogramVec is the internal representation of our wrapping struct around prometheus // TimingHistogramVecs. type TimingHistogramVec struct { *promext.TimingHistogramVec *TimingHistogramOpts nowFunc func() time.Time lazyMetric originalLabels []string } var _ GaugeVecMetric = &TimingHistogramVec{} var _ Registerable = &TimingHistogramVec{} var _ kubeCollector = &TimingHistogramVec{} // NewTimingHistogramVec returns an object which satisfies the kubeCollector, Registerable, and GaugeVecMetric interfaces // and wraps an underlying promext.TimingHistogramVec object. Note well the way that // behavior depends on registration and whether this is hidden. func NewTimingHistogramVec(opts *TimingHistogramOpts, labels []string) *TimingHistogramVec { return NewTestableTimingHistogramVec(time.Now, opts, labels) } // NewTestableTimingHistogramVec adds injection of the clock. func NewTestableTimingHistogramVec(nowFunc func() time.Time, opts *TimingHistogramOpts, labels []string) *TimingHistogramVec { opts.StabilityLevel.setDefaults() fqName := BuildFQName(opts.Namespace, opts.Subsystem, opts.Name) v := &TimingHistogramVec{ TimingHistogramVec: noopTimingHistogramVec, TimingHistogramOpts: opts, nowFunc: nowFunc, originalLabels: labels, lazyMetric: lazyMetric{stabilityLevel: opts.StabilityLevel}, } v.lazyInit(v, fqName) return v } // DeprecatedVersion returns a pointer to the Version or nil func (v *TimingHistogramVec) DeprecatedVersion() *semver.Version { return parseSemver(v.TimingHistogramOpts.DeprecatedVersion) } func (v *TimingHistogramVec) initializeMetric() { v.TimingHistogramOpts.annotateStabilityLevel() v.TimingHistogramVec = promext.NewTestableTimingHistogramVec(v.nowFunc, v.TimingHistogramOpts.toPromHistogramOpts(), v.originalLabels...) } func (v *TimingHistogramVec) initializeDeprecatedMetric() { v.TimingHistogramOpts.markDeprecated() v.initializeMetric() } // WithLabelValuesChecked, if called before this vector has been registered in // at least one registry, will return a noop gauge and // an error that passes ErrIsNotRegistered. // If called on a hidden vector, // will return a noop gauge and a nil error. // If called with a syntactic problem in the labels, will // return a noop gauge and an error about the labels. // If none of the above apply, this method will return // the appropriate vector member and a nil error. func (v *TimingHistogramVec) WithLabelValuesChecked(lvs ...string) (GaugeMetric, error) { if !v.IsCreated() { if v.IsHidden() { return noop, nil } return noop, errNotRegistered } if v.LabelValueAllowLists != nil { v.LabelValueAllowLists.ConstrainToAllowedList(v.originalLabels, lvs) } else { v.initializeLabelAllowListsOnce.Do(func() { allowListLock.RLock() if allowList, ok := labelValueAllowLists[v.FQName()]; ok { v.LabelValueAllowLists = allowList allowList.ConstrainToAllowedList(v.originalLabels, lvs) } allowListLock.RUnlock() }) } ops, err := v.TimingHistogramVec.GetMetricWithLabelValues(lvs...) if err != nil { return noop, err } return ops.(GaugeMetric), err } // WithLabelValues calls WithLabelValuesChecked // and handles errors as follows. // An error that passes ErrIsNotRegistered is ignored // and the noop gauge is returned; // all other errors cause a panic. func (v *TimingHistogramVec) WithLabelValues(lvs ...string) GaugeMetric { ans, err := v.WithLabelValuesChecked(lvs...) if err == nil || ErrIsNotRegistered(err) { return ans } panic(err) } // WithChecked, if called before this vector has been registered in // at least one registry, will return a noop gauge and // an error that passes ErrIsNotRegistered. // If called on a hidden vector, // will return a noop gauge and a nil error. // If called with a syntactic problem in the labels, will // return a noop gauge and an error about the labels. // If none of the above apply, this method will return // the appropriate vector member and a nil error. func (v *TimingHistogramVec) WithChecked(labels map[string]string) (GaugeMetric, error) { if !v.IsCreated() { if v.IsHidden() { return noop, nil } return noop, errNotRegistered } if v.LabelValueAllowLists != nil { v.LabelValueAllowLists.ConstrainLabelMap(labels) } else { v.initializeLabelAllowListsOnce.Do(func() { allowListLock.RLock() if allowList, ok := labelValueAllowLists[v.FQName()]; ok { v.LabelValueAllowLists = allowList allowList.ConstrainLabelMap(labels) } allowListLock.RUnlock() }) } ops, err := v.TimingHistogramVec.GetMetricWith(labels) return ops.(GaugeMetric), err } // With calls WithChecked and handles errors as follows. // An error that passes ErrIsNotRegistered is ignored // and the noop gauge is returned; // all other errors cause a panic. func (v *TimingHistogramVec) With(labels map[string]string) GaugeMetric { ans, err := v.WithChecked(labels) if err == nil || ErrIsNotRegistered(err) { return ans } panic(err) } // Delete deletes the metric where the variable labels are the same as those // passed in as labels. It returns true if a metric was deleted. // // It is not an error if the number and names of the Labels are inconsistent // with those of the VariableLabels in Desc. However, such inconsistent Labels // can never match an actual metric, so the method will always return false in // that case. func (v *TimingHistogramVec) Delete(labels map[string]string) bool { if !v.IsCreated() { return false // since we haven't created the metric, we haven't deleted a metric with the passed in values } return v.TimingHistogramVec.Delete(labels) } // Reset deletes all metrics in this vector. func (v *TimingHistogramVec) Reset() { if !v.IsCreated() { return } v.TimingHistogramVec.Reset() } // ResetLabelAllowLists resets the label allow list for the TimingHistogramVec. // NOTE: This should only be used in test. func (v *TimingHistogramVec) ResetLabelAllowLists() { v.initializeLabelAllowListsOnce = sync.Once{} v.LabelValueAllowLists = nil } // WithContext returns wrapped TimingHistogramVec with context func (v *TimingHistogramVec) InterfaceWithContext(ctx context.Context) GaugeVecMetric { return &TimingHistogramVecWithContext{ ctx: ctx, TimingHistogramVec: v, } } // TimingHistogramVecWithContext is the wrapper of TimingHistogramVec with context. // Currently the context is ignored. type TimingHistogramVecWithContext struct { *TimingHistogramVec ctx context.Context }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/component-base/metrics/version.go
vendor/k8s.io/component-base/metrics/version.go
/* Copyright 2019 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package metrics import "k8s.io/component-base/version" var ( buildInfo = NewGaugeVec( &GaugeOpts{ Name: "kubernetes_build_info", Help: "A metric with a constant '1' value labeled by major, minor, git version, git commit, git tree state, build date, Go version, and compiler from which Kubernetes was built, and platform on which it is running.", StabilityLevel: ALPHA, }, []string{"major", "minor", "git_version", "git_commit", "git_tree_state", "build_date", "go_version", "compiler", "platform"}, ) ) // RegisterBuildInfo registers the build and version info in a metadata metric in prometheus func RegisterBuildInfo(r KubeRegistry) { info := version.Get() r.MustRegister(buildInfo) buildInfo.WithLabelValues(info.Major, info.Minor, info.GitVersion, info.GitCommit, info.GitTreeState, info.BuildDate, info.GoVersion, info.Compiler, info.Platform).Set(1) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/component-base/metrics/desc.go
vendor/k8s.io/component-base/metrics/desc.go
/* Copyright 2019 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package metrics import ( "fmt" "sync" "github.com/blang/semver/v4" "github.com/prometheus/client_golang/prometheus" "k8s.io/klog/v2" ) // Desc is a prometheus.Desc extension. // // Use NewDesc to create new Desc instances. type Desc struct { // fqName has been built from Namespace, Subsystem, and Name. fqName string // help provides some helpful information about this metric. help string // constLabels is the label names. Their label values are variable. constLabels Labels // variableLabels contains names of labels for which the metric // maintains variable values. variableLabels []string // promDesc is the descriptor used by every Prometheus Metric. promDesc *prometheus.Desc annotatedHelp string // stabilityLevel represents the API guarantees for a given defined metric. stabilityLevel StabilityLevel // deprecatedVersion represents in which version this metric be deprecated. deprecatedVersion string isDeprecated bool isHidden bool isCreated bool createLock sync.RWMutex markDeprecationOnce sync.Once createOnce sync.Once deprecateOnce sync.Once hideOnce sync.Once annotateOnce sync.Once } // NewDesc extends prometheus.NewDesc with stability support. // // The stabilityLevel should be valid stability label, such as "metrics.ALPHA" // and "metrics.STABLE"(Maybe "metrics.BETA" in future). Default value "metrics.ALPHA" // will be used in case of empty or invalid stability label. // // The deprecatedVersion represents in which version this Metric be deprecated. // The deprecation policy outlined by the control plane metrics stability KEP. func NewDesc(fqName string, help string, variableLabels []string, constLabels Labels, stabilityLevel StabilityLevel, deprecatedVersion string) *Desc { d := &Desc{ fqName: fqName, help: help, annotatedHelp: help, variableLabels: variableLabels, constLabels: constLabels, stabilityLevel: stabilityLevel, deprecatedVersion: deprecatedVersion, } d.stabilityLevel.setDefaults() return d } // String formats the Desc as a string. // The stability metadata maybe annotated in 'HELP' section if called after registry, // otherwise not. // e.g. "Desc{fqName: "normal_stable_descriptor", help: "[STABLE] this is a stable descriptor", constLabels: {}, variableLabels: []}" func (d *Desc) String() string { if d.isCreated { return d.promDesc.String() } return prometheus.NewDesc(d.fqName, d.help, d.variableLabels, prometheus.Labels(d.constLabels)).String() } // toPrometheusDesc transform self to prometheus.Desc func (d *Desc) toPrometheusDesc() *prometheus.Desc { return d.promDesc } // DeprecatedVersion returns a pointer to the Version or nil func (d *Desc) DeprecatedVersion() *semver.Version { return parseSemver(d.deprecatedVersion) } func (d *Desc) determineDeprecationStatus(version semver.Version) { selfVersion := d.DeprecatedVersion() if selfVersion == nil { return } d.markDeprecationOnce.Do(func() { if selfVersion.LTE(version) { d.isDeprecated = true } if ShouldShowHidden() { klog.Warningf("Hidden metrics(%s) have been manually overridden, showing this very deprecated metric.", d.fqName) return } if shouldHide(&version, selfVersion) { // TODO(RainbowMango): Remove this log temporarily. https://github.com/kubernetes/kubernetes/issues/85369 // klog.Warningf("This metric(%s) has been deprecated for more than one release, hiding.", d.fqName) d.isHidden = true } }) } // IsHidden returns if metric will be hidden func (d *Desc) IsHidden() bool { return d.isHidden } // IsDeprecated returns if metric has been deprecated func (d *Desc) IsDeprecated() bool { return d.isDeprecated } // IsCreated returns if metric has been created. func (d *Desc) IsCreated() bool { d.createLock.RLock() defer d.createLock.RUnlock() return d.isCreated } // create forces the initialization of Desc which has been deferred until // the point at which this method is invoked. This method will determine whether // the Desc is deprecated or hidden, no-opting if the Desc should be considered // hidden. Furthermore, this function no-opts and returns true if Desc is already // created. func (d *Desc) create(version *semver.Version) bool { if version != nil { d.determineDeprecationStatus(*version) } // let's not create if this metric is slated to be hidden if d.IsHidden() { return false } d.createOnce.Do(func() { d.createLock.Lock() defer d.createLock.Unlock() d.isCreated = true if d.IsDeprecated() { d.initializeDeprecatedDesc() } else { d.initialize() } }) return d.IsCreated() } // ClearState will clear all the states marked by Create. // It intends to be used for re-register a hidden metric. func (d *Desc) ClearState() { d.isDeprecated = false d.isHidden = false d.isCreated = false d.markDeprecationOnce = *new(sync.Once) d.createOnce = *new(sync.Once) d.deprecateOnce = *new(sync.Once) d.hideOnce = *new(sync.Once) d.annotateOnce = *new(sync.Once) d.annotatedHelp = d.help d.promDesc = nil } func (d *Desc) markDeprecated() { d.deprecateOnce.Do(func() { d.annotatedHelp = fmt.Sprintf("(Deprecated since %s) %s", d.deprecatedVersion, d.annotatedHelp) }) } func (d *Desc) annotateStabilityLevel() { d.annotateOnce.Do(func() { d.annotatedHelp = fmt.Sprintf("[%v] %v", d.stabilityLevel, d.annotatedHelp) }) } func (d *Desc) initialize() { d.annotateStabilityLevel() // this actually creates the underlying prometheus desc. d.promDesc = prometheus.NewDesc(d.fqName, d.annotatedHelp, d.variableLabels, prometheus.Labels(d.constLabels)) } func (d *Desc) initializeDeprecatedDesc() { d.markDeprecated() d.initialize() } // GetRawDesc will returns a new *Desc with original parameters provided to NewDesc(). // // It will be useful in testing scenario that the same Desc be registered to different registry. // 1. Desc `D` is registered to registry 'A' in TestA (Note: `D` maybe created) // 2. Desc `D` is registered to registry 'B' in TestB (Note: since 'D' has been created once, thus will be ignored by registry 'B') func (d *Desc) GetRawDesc() *Desc { return NewDesc(d.fqName, d.help, d.variableLabels, d.constLabels, d.stabilityLevel, d.deprecatedVersion) }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/component-base/metrics/collector.go
vendor/k8s.io/component-base/metrics/collector.go
/* Copyright 2019 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package metrics import ( "fmt" "github.com/blang/semver/v4" "github.com/prometheus/client_golang/prometheus" ) // StableCollector extends the prometheus.Collector interface to allow customization of the // metric registration process, it's especially intend to be used in scenario of custom collector. type StableCollector interface { prometheus.Collector // DescribeWithStability sends the super-set of all possible metrics.Desc collected // by this StableCollector to the provided channel. DescribeWithStability(chan<- *Desc) // CollectWithStability sends each collected metrics.Metric via the provide channel. CollectWithStability(chan<- Metric) // Create will initialize all Desc and it intends to be called by registry. Create(version *semver.Version, self StableCollector) bool // ClearState will clear all the states marked by Create. ClearState() // HiddenMetrics tells the list of hidden metrics with fqName. HiddenMetrics() []string } // BaseStableCollector which implements almost all methods defined by StableCollector // is a convenient assistant for custom collectors. // It is recommended to inherit BaseStableCollector when implementing custom collectors. type BaseStableCollector struct { descriptors map[string]*Desc // stores all descriptors by pair<fqName, Desc>, these are collected from DescribeWithStability(). registerable map[string]*Desc // stores registerable descriptors by pair<fqName, Desc>, is a subset of descriptors. hidden map[string]*Desc // stores hidden descriptors by pair<fqName, Desc>, is a subset of descriptors. self StableCollector } // DescribeWithStability sends all descriptors to the provided channel. // Every custom collector should over-write this method. func (bsc *BaseStableCollector) DescribeWithStability(ch chan<- *Desc) { panic(fmt.Errorf("custom collector should over-write DescribeWithStability method")) } // Describe sends all descriptors to the provided channel. // It intended to be called by prometheus registry. func (bsc *BaseStableCollector) Describe(ch chan<- *prometheus.Desc) { for _, d := range bsc.registerable { ch <- d.toPrometheusDesc() } } // CollectWithStability sends all metrics to the provided channel. // Every custom collector should over-write this method. func (bsc *BaseStableCollector) CollectWithStability(ch chan<- Metric) { panic(fmt.Errorf("custom collector should over-write CollectWithStability method")) } // Collect is called by the Prometheus registry when collecting metrics. func (bsc *BaseStableCollector) Collect(ch chan<- prometheus.Metric) { mch := make(chan Metric) go func() { bsc.self.CollectWithStability(mch) close(mch) }() for m := range mch { // nil Metric usually means hidden metrics if m == nil { continue } ch <- prometheus.Metric(m) } } func (bsc *BaseStableCollector) add(d *Desc) { if len(d.fqName) == 0 { panic("nameless metrics will be not allowed") } if bsc.descriptors == nil { bsc.descriptors = make(map[string]*Desc) } if _, exist := bsc.descriptors[d.fqName]; exist { panic(fmt.Sprintf("duplicate metrics (%s) will be not allowed", d.fqName)) } bsc.descriptors[d.fqName] = d } // Init intends to be called by registry. func (bsc *BaseStableCollector) init(self StableCollector) { bsc.self = self dch := make(chan *Desc) // collect all possible descriptions from custom side go func() { bsc.self.DescribeWithStability(dch) close(dch) }() for d := range dch { bsc.add(d) } } func (bsc *BaseStableCollector) trackRegistrableDescriptor(d *Desc) { if bsc.registerable == nil { bsc.registerable = make(map[string]*Desc) } bsc.registerable[d.fqName] = d } func (bsc *BaseStableCollector) trackHiddenDescriptor(d *Desc) { if bsc.hidden == nil { bsc.hidden = make(map[string]*Desc) } bsc.hidden[d.fqName] = d } // Create intends to be called by registry. // Create will return true as long as there is one or more metrics not be hidden. // Otherwise return false, that means the whole collector will be ignored by registry. func (bsc *BaseStableCollector) Create(version *semver.Version, self StableCollector) bool { bsc.init(self) for _, d := range bsc.descriptors { d.create(version) if d.IsHidden() { bsc.trackHiddenDescriptor(d) } else { bsc.trackRegistrableDescriptor(d) } } if len(bsc.registerable) > 0 { return true } return false } // ClearState will clear all the states marked by Create. // It intends to be used for re-register a hidden metric. func (bsc *BaseStableCollector) ClearState() { for _, d := range bsc.descriptors { d.ClearState() } bsc.descriptors = nil bsc.registerable = nil bsc.hidden = nil bsc.self = nil } // HiddenMetrics tells the list of hidden metrics with fqName. func (bsc *BaseStableCollector) HiddenMetrics() (fqNames []string) { for i := range bsc.hidden { fqNames = append(fqNames, bsc.hidden[i].fqName) } return } // Check if our BaseStableCollector implements necessary interface var _ StableCollector = &BaseStableCollector{}
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/component-base/metrics/wrappers.go
vendor/k8s.io/component-base/metrics/wrappers.go
/* Copyright 2019 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package metrics import ( "errors" "github.com/prometheus/client_golang/prometheus" dto "github.com/prometheus/client_model/go" ) // This file contains a series of interfaces which we explicitly define for // integrating with prometheus. We redefine the interfaces explicitly here // so that we can prevent breakage if methods are ever added to prometheus // variants of them. // Collector defines a subset of prometheus.Collector interface methods type Collector interface { Describe(chan<- *prometheus.Desc) Collect(chan<- prometheus.Metric) } // Metric defines a subset of prometheus.Metric interface methods type Metric interface { Desc() *prometheus.Desc Write(*dto.Metric) error } // CounterMetric is a Metric that represents a single numerical value that only ever // goes up. That implies that it cannot be used to count items whose number can // also go down, e.g. the number of currently running goroutines. Those // "counters" are represented by Gauges. // CounterMetric is an interface which defines a subset of the interface provided by prometheus.Counter type CounterMetric interface { Inc() Add(float64) } // CounterVecMetric is an interface which prometheus.CounterVec satisfies. type CounterVecMetric interface { WithLabelValues(...string) CounterMetric With(prometheus.Labels) CounterMetric } // GaugeMetric is an interface which defines a subset of the interface provided by prometheus.Gauge type GaugeMetric interface { Set(float64) Inc() Dec() Add(float64) Write(out *dto.Metric) error SetToCurrentTime() } // GaugeVecMetric is a collection of Gauges that differ only in label values. type GaugeVecMetric interface { // Default Prometheus Vec behavior is that member extraction results in creation of a new element // if one with the unique label values is not found in the underlying stored metricMap. // This means that if this function is called but the underlying metric is not registered // (which means it will never be exposed externally nor consumed), the metric would exist in memory // for perpetuity (i.e. throughout application lifecycle). // // For reference: https://github.com/prometheus/client_golang/blob/v0.9.2/prometheus/gauge.go#L190-L208 // // In contrast, the Vec behavior in this package is that member extraction before registration // returns a permanent noop object. // WithLabelValuesChecked, if called before this vector has been registered in // at least one registry, will return a noop gauge and // an error that passes ErrIsNotRegistered. // If called on a hidden vector, // will return a noop gauge and a nil error. // If called with a syntactic problem in the labels, will // return a noop gauge and an error about the labels. // If none of the above apply, this method will return // the appropriate vector member and a nil error. WithLabelValuesChecked(labelValues ...string) (GaugeMetric, error) // WithLabelValues calls WithLabelValuesChecked // and handles errors as follows. // An error that passes ErrIsNotRegistered is ignored // and the noop gauge is returned; // all other errors cause a panic. WithLabelValues(labelValues ...string) GaugeMetric // WithChecked, if called before this vector has been registered in // at least one registry, will return a noop gauge and // an error that passes ErrIsNotRegistered. // If called on a hidden vector, // will return a noop gauge and a nil error. // If called with a syntactic problem in the labels, will // return a noop gauge and an error about the labels. // If none of the above apply, this method will return // the appropriate vector member and a nil error. WithChecked(labels map[string]string) (GaugeMetric, error) // With calls WithChecked and handles errors as follows. // An error that passes ErrIsNotRegistered is ignored // and the noop gauge is returned; // all other errors cause a panic. With(labels map[string]string) GaugeMetric // Delete asserts that the vec should have no member for the given label set. // The returned bool indicates whether there was a change. // The return will certainly be `false` if the given label set has the wrong // set of label names. Delete(map[string]string) bool // Reset removes all the members Reset() } // ObserverMetric captures individual observations. type ObserverMetric interface { Observe(float64) } // PromRegistry is an interface which implements a subset of prometheus.Registerer and // prometheus.Gatherer interfaces type PromRegistry interface { Register(prometheus.Collector) error MustRegister(...prometheus.Collector) Unregister(prometheus.Collector) bool Gather() ([]*dto.MetricFamily, error) } // Gatherer is the interface for the part of a registry in charge of gathering // the collected metrics into a number of MetricFamilies. type Gatherer interface { prometheus.Gatherer } // Registerer is the interface for the part of a registry in charge of registering // the collected metrics. type Registerer interface { prometheus.Registerer } // GaugeFunc is a Gauge whose value is determined at collect time by calling a // provided function. // // To create GaugeFunc instances, use NewGaugeFunc. type GaugeFunc interface { Metric Collector } func ErrIsNotRegistered(err error) bool { return err == errNotRegistered } var errNotRegistered = errors.New("metric vec is not registered yet")
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false
kubev2v/forklift
https://github.com/kubev2v/forklift/blob/b3b4703e958c25d54c4d48138d9e80ae32fadac3/vendor/k8s.io/component-base/metrics/histogram.go
vendor/k8s.io/component-base/metrics/histogram.go
/* Copyright 2019 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package metrics import ( "context" "sync" "github.com/blang/semver/v4" "github.com/prometheus/client_golang/prometheus" "go.opentelemetry.io/otel/trace" ) // Histogram is our internal representation for our wrapping struct around prometheus // histograms. Summary implements both kubeCollector and ObserverMetric type Histogram struct { ctx context.Context ObserverMetric *HistogramOpts lazyMetric selfCollector } // exemplarHistogramMetric holds a context to extract exemplar labels from, and a historgram metric to attach them to. It implements the metricWithExemplar interface. type exemplarHistogramMetric struct { *Histogram } type exemplarHistogramVec struct { *HistogramVecWithContext observer prometheus.Observer } func (h *Histogram) Observe(v float64) { h.withExemplar(v) } // withExemplar initializes the exemplarMetric object and sets the exemplar value. func (h *Histogram) withExemplar(v float64) { (&exemplarHistogramMetric{h}).withExemplar(v) } // withExemplar attaches an exemplar to the metric. func (e *exemplarHistogramMetric) withExemplar(v float64) { if m, ok := e.Histogram.ObserverMetric.(prometheus.ExemplarObserver); ok { maybeSpanCtx := trace.SpanContextFromContext(e.ctx) if maybeSpanCtx.IsValid() && maybeSpanCtx.IsSampled() { exemplarLabels := prometheus.Labels{ "trace_id": maybeSpanCtx.TraceID().String(), "span_id": maybeSpanCtx.SpanID().String(), } m.ObserveWithExemplar(v, exemplarLabels) return } } e.ObserverMetric.Observe(v) } // NewHistogram returns an object which is Histogram-like. However, nothing // will be measured until the histogram is registered somewhere. func NewHistogram(opts *HistogramOpts) *Histogram { opts.StabilityLevel.setDefaults() h := &Histogram{ HistogramOpts: opts, lazyMetric: lazyMetric{stabilityLevel: opts.StabilityLevel}, } h.setPrometheusHistogram(noopMetric{}) h.lazyInit(h, BuildFQName(opts.Namespace, opts.Subsystem, opts.Name)) return h } // setPrometheusHistogram sets the underlying KubeGauge object, i.e. the thing that does the measurement. func (h *Histogram) setPrometheusHistogram(histogram prometheus.Histogram) { h.ObserverMetric = histogram h.initSelfCollection(histogram) } // DeprecatedVersion returns a pointer to the Version or nil func (h *Histogram) DeprecatedVersion() *semver.Version { return parseSemver(h.HistogramOpts.DeprecatedVersion) } // initializeMetric invokes the actual prometheus.Histogram object instantiation // and stores a reference to it func (h *Histogram) initializeMetric() { h.HistogramOpts.annotateStabilityLevel() // this actually creates the underlying prometheus gauge. h.setPrometheusHistogram(prometheus.NewHistogram(h.HistogramOpts.toPromHistogramOpts())) } // initializeDeprecatedMetric invokes the actual prometheus.Histogram object instantiation // but modifies the Help description prior to object instantiation. func (h *Histogram) initializeDeprecatedMetric() { h.HistogramOpts.markDeprecated() h.initializeMetric() } // WithContext allows the normal Histogram metric to pass in context. The context is no-op now. func (h *Histogram) WithContext(ctx context.Context) ObserverMetric { h.ctx = ctx return h.ObserverMetric } // HistogramVec is the internal representation of our wrapping struct around prometheus // histogramVecs. type HistogramVec struct { *prometheus.HistogramVec *HistogramOpts lazyMetric originalLabels []string } // NewHistogramVec returns an object which satisfies kubeCollector and wraps the // prometheus.HistogramVec object. However, the object returned will not measure // anything unless the collector is first registered, since the metric is lazily instantiated, // and only members extracted after // registration will actually measure anything. func NewHistogramVec(opts *HistogramOpts, labels []string) *HistogramVec { opts.StabilityLevel.setDefaults() fqName := BuildFQName(opts.Namespace, opts.Subsystem, opts.Name) v := &HistogramVec{ HistogramVec: noopHistogramVec, HistogramOpts: opts, originalLabels: labels, lazyMetric: lazyMetric{stabilityLevel: opts.StabilityLevel}, } v.lazyInit(v, fqName) return v } // DeprecatedVersion returns a pointer to the Version or nil func (v *HistogramVec) DeprecatedVersion() *semver.Version { return parseSemver(v.HistogramOpts.DeprecatedVersion) } func (v *HistogramVec) initializeMetric() { v.HistogramOpts.annotateStabilityLevel() v.HistogramVec = prometheus.NewHistogramVec(v.HistogramOpts.toPromHistogramOpts(), v.originalLabels) } func (v *HistogramVec) initializeDeprecatedMetric() { v.HistogramOpts.markDeprecated() v.initializeMetric() } // Default Prometheus Vec behavior is that member extraction results in creation of a new element // if one with the unique label values is not found in the underlying stored metricMap. // This means that if this function is called but the underlying metric is not registered // (which means it will never be exposed externally nor consumed), the metric will exist in memory // for perpetuity (i.e. throughout application lifecycle). // // For reference: https://github.com/prometheus/client_golang/blob/v0.9.2/prometheus/histogram.go#L460-L470 // // In contrast, the Vec behavior in this package is that member extraction before registration // returns a permanent noop object. // WithLabelValues returns the ObserverMetric for the given slice of label // values (same order as the VariableLabels in Desc). If that combination of // label values is accessed for the first time, a new ObserverMetric is created IFF the HistogramVec // has been registered to a metrics registry. func (v *HistogramVec) WithLabelValues(lvs ...string) ObserverMetric { if !v.IsCreated() { return noop } if v.LabelValueAllowLists != nil { v.LabelValueAllowLists.ConstrainToAllowedList(v.originalLabels, lvs) } else { v.initializeLabelAllowListsOnce.Do(func() { allowListLock.RLock() if allowList, ok := labelValueAllowLists[v.FQName()]; ok { v.LabelValueAllowLists = allowList allowList.ConstrainToAllowedList(v.originalLabels, lvs) } allowListLock.RUnlock() }) } return v.HistogramVec.WithLabelValues(lvs...) } // With returns the ObserverMetric for the given Labels map (the label names // must match those of the VariableLabels in Desc). If that label map is // accessed for the first time, a new ObserverMetric is created IFF the HistogramVec has // been registered to a metrics registry. func (v *HistogramVec) With(labels map[string]string) ObserverMetric { if !v.IsCreated() { return noop } if v.LabelValueAllowLists != nil { v.LabelValueAllowLists.ConstrainLabelMap(labels) } else { v.initializeLabelAllowListsOnce.Do(func() { allowListLock.RLock() if allowList, ok := labelValueAllowLists[v.FQName()]; ok { v.LabelValueAllowLists = allowList allowList.ConstrainLabelMap(labels) } allowListLock.RUnlock() }) } return v.HistogramVec.With(labels) } // Delete deletes the metric where the variable labels are the same as those // passed in as labels. It returns true if a metric was deleted. // // It is not an error if the number and names of the Labels are inconsistent // with those of the VariableLabels in Desc. However, such inconsistent Labels // can never match an actual metric, so the method will always return false in // that case. func (v *HistogramVec) Delete(labels map[string]string) bool { if !v.IsCreated() { return false // since we haven't created the metric, we haven't deleted a metric with the passed in values } return v.HistogramVec.Delete(labels) } // Reset deletes all metrics in this vector. func (v *HistogramVec) Reset() { if !v.IsCreated() { return } v.HistogramVec.Reset() } // ResetLabelAllowLists resets the label allow list for the HistogramVec. // NOTE: This should only be used in test. func (v *HistogramVec) ResetLabelAllowLists() { v.initializeLabelAllowListsOnce = sync.Once{} v.LabelValueAllowLists = nil } // WithContext returns wrapped HistogramVec with context func (v *HistogramVec) WithContext(ctx context.Context) *HistogramVecWithContext { return &HistogramVecWithContext{ ctx: ctx, HistogramVec: v, } } // HistogramVecWithContext is the wrapper of HistogramVec with context. type HistogramVecWithContext struct { *HistogramVec ctx context.Context } func (h *exemplarHistogramVec) Observe(v float64) { h.withExemplar(v) } func (h *exemplarHistogramVec) withExemplar(v float64) { if m, ok := h.observer.(prometheus.ExemplarObserver); ok { maybeSpanCtx := trace.SpanContextFromContext(h.HistogramVecWithContext.ctx) if maybeSpanCtx.IsValid() && maybeSpanCtx.IsSampled() { m.ObserveWithExemplar(v, prometheus.Labels{ "trace_id": maybeSpanCtx.TraceID().String(), "span_id": maybeSpanCtx.SpanID().String(), }) return } } h.observer.Observe(v) } // WithLabelValues is the wrapper of HistogramVec.WithLabelValues. func (vc *HistogramVecWithContext) WithLabelValues(lvs ...string) *exemplarHistogramVec { return &exemplarHistogramVec{ HistogramVecWithContext: vc, observer: vc.HistogramVec.WithLabelValues(lvs...), } } // With is the wrapper of HistogramVec.With. func (vc *HistogramVecWithContext) With(labels map[string]string) *exemplarHistogramVec { return &exemplarHistogramVec{ HistogramVecWithContext: vc, observer: vc.HistogramVec.With(labels), } }
go
Apache-2.0
b3b4703e958c25d54c4d48138d9e80ae32fadac3
2026-01-07T09:44:30.792320Z
false