mirror of
https://github.com/kubernetes/client-go.git
synced 2025-07-16 16:21:11 +00:00
Add ImageVolumeSource API
Adding the required Kubernetes API so that the kubelet can start using it. This patch also adds the corresponding alpha feature gate as outlined in KEP 4639. Signed-off-by: Sascha Grunert <sgrunert@redhat.com> Kubernetes-commit: f7ca3131e0922563a561134b4ed9eed8d2bdd2c4
This commit is contained in:
parent
5742b23135
commit
485ae13a58
52
applyconfigurations/core/v1/imagevolumesource.go
Normal file
52
applyconfigurations/core/v1/imagevolumesource.go
Normal file
@ -0,0 +1,52 @@
|
||||
/*
|
||||
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 applyconfiguration-gen. DO NOT EDIT.
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
v1 "k8s.io/api/core/v1"
|
||||
)
|
||||
|
||||
// ImageVolumeSourceApplyConfiguration represents a declarative configuration of the ImageVolumeSource type for use
|
||||
// with apply.
|
||||
type ImageVolumeSourceApplyConfiguration struct {
|
||||
Reference *string `json:"reference,omitempty"`
|
||||
PullPolicy *v1.PullPolicy `json:"pullPolicy,omitempty"`
|
||||
}
|
||||
|
||||
// ImageVolumeSourceApplyConfiguration constructs a declarative configuration of the ImageVolumeSource type for use with
|
||||
// apply.
|
||||
func ImageVolumeSource() *ImageVolumeSourceApplyConfiguration {
|
||||
return &ImageVolumeSourceApplyConfiguration{}
|
||||
}
|
||||
|
||||
// WithReference sets the Reference field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Reference field is set to the value of the last call.
|
||||
func (b *ImageVolumeSourceApplyConfiguration) WithReference(value string) *ImageVolumeSourceApplyConfiguration {
|
||||
b.Reference = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithPullPolicy sets the PullPolicy field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the PullPolicy field is set to the value of the last call.
|
||||
func (b *ImageVolumeSourceApplyConfiguration) WithPullPolicy(value v1.PullPolicy) *ImageVolumeSourceApplyConfiguration {
|
||||
b.PullPolicy = &value
|
||||
return b
|
||||
}
|
@ -270,3 +270,11 @@ func (b *VolumeApplyConfiguration) WithEphemeral(value *EphemeralVolumeSourceApp
|
||||
b.Ephemeral = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithImage sets the Image field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Image field is set to the value of the last call.
|
||||
func (b *VolumeApplyConfiguration) WithImage(value *ImageVolumeSourceApplyConfiguration) *VolumeApplyConfiguration {
|
||||
b.Image = value
|
||||
return b
|
||||
}
|
||||
|
@ -50,6 +50,7 @@ type VolumeSourceApplyConfiguration struct {
|
||||
StorageOS *StorageOSVolumeSourceApplyConfiguration `json:"storageos,omitempty"`
|
||||
CSI *CSIVolumeSourceApplyConfiguration `json:"csi,omitempty"`
|
||||
Ephemeral *EphemeralVolumeSourceApplyConfiguration `json:"ephemeral,omitempty"`
|
||||
Image *ImageVolumeSourceApplyConfiguration `json:"image,omitempty"`
|
||||
}
|
||||
|
||||
// VolumeSourceApplyConfiguration constructs a declarative configuration of the VolumeSource type for use with
|
||||
@ -289,3 +290,11 @@ func (b *VolumeSourceApplyConfiguration) WithEphemeral(value *EphemeralVolumeSou
|
||||
b.Ephemeral = value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithImage sets the Image field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Image field is set to the value of the last call.
|
||||
func (b *VolumeSourceApplyConfiguration) WithImage(value *ImageVolumeSourceApplyConfiguration) *VolumeSourceApplyConfiguration {
|
||||
b.Image = value
|
||||
return b
|
||||
}
|
||||
|
@ -5762,6 +5762,15 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
type:
|
||||
scalar: string
|
||||
default: ""
|
||||
- name: io.k8s.api.core.v1.ImageVolumeSource
|
||||
map:
|
||||
fields:
|
||||
- name: pullPolicy
|
||||
type:
|
||||
scalar: string
|
||||
- name: reference
|
||||
type:
|
||||
scalar: string
|
||||
- name: io.k8s.api.core.v1.KeyToPath
|
||||
map:
|
||||
fields:
|
||||
@ -8209,6 +8218,9 @@ var schemaYAML = typed.YAMLObject(`types:
|
||||
- name: hostPath
|
||||
type:
|
||||
namedType: io.k8s.api.core.v1.HostPathVolumeSource
|
||||
- name: image
|
||||
type:
|
||||
namedType: io.k8s.api.core.v1.ImageVolumeSource
|
||||
- name: iscsi
|
||||
type:
|
||||
namedType: io.k8s.api.core.v1.ISCSIVolumeSource
|
||||
|
@ -754,6 +754,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
|
||||
return &applyconfigurationscorev1.HTTPGetActionApplyConfiguration{}
|
||||
case corev1.SchemeGroupVersion.WithKind("HTTPHeader"):
|
||||
return &applyconfigurationscorev1.HTTPHeaderApplyConfiguration{}
|
||||
case corev1.SchemeGroupVersion.WithKind("ImageVolumeSource"):
|
||||
return &applyconfigurationscorev1.ImageVolumeSourceApplyConfiguration{}
|
||||
case corev1.SchemeGroupVersion.WithKind("ISCSIPersistentVolumeSource"):
|
||||
return &applyconfigurationscorev1.ISCSIPersistentVolumeSourceApplyConfiguration{}
|
||||
case corev1.SchemeGroupVersion.WithKind("ISCSIVolumeSource"):
|
||||
|
Loading…
Reference in New Issue
Block a user