Merge pull request #92784 from pohly/generic-ephemeral-inline-volumes
generic ephemeral inline volumes
This commit is contained in:
2519
staging/src/k8s.io/api/core/v1/generated.pb.go
generated
2519
staging/src/k8s.io/api/core/v1/generated.pb.go
generated
File diff suppressed because it is too large
Load Diff
@@ -1371,6 +1371,37 @@ message EphemeralContainers {
|
||||
repeated EphemeralContainer ephemeralContainers = 2;
|
||||
}
|
||||
|
||||
// Represents an ephemeral volume that is handled by a normal storage driver.
|
||||
message EphemeralVolumeSource {
|
||||
// Will be used to create a stand-alone PVC to provision the volume.
|
||||
// The pod in which this EphemeralVolumeSource is embedded will be the
|
||||
// owner of the PVC, i.e. the PVC will be deleted together with the
|
||||
// pod. The name of the PVC will be `<pod name>-<volume name>` where
|
||||
// `<volume name>` is the name from the `PodSpec.Volumes` array
|
||||
// entry. Pod validation will reject the pod if the concatenated name
|
||||
// is not valid for a PVC (for example, too long).
|
||||
//
|
||||
// An existing PVC with that name that is not owned by the pod
|
||||
// will *not* be used for the pod to avoid using an unrelated
|
||||
// volume by mistake. Starting the pod is then blocked until
|
||||
// the unrelated PVC is removed. If such a pre-created PVC is
|
||||
// meant to be used by the pod, the PVC has to updated with an
|
||||
// owner reference to the pod once the pod exists. Normally
|
||||
// this should not be necessary, but it may be useful when
|
||||
// manually reconstructing a broken cluster.
|
||||
//
|
||||
// This field is read-only and no changes will be made by Kubernetes
|
||||
// to the PVC after it has been created.
|
||||
//
|
||||
// Required, must not be nil.
|
||||
optional PersistentVolumeClaimTemplate volumeClaimTemplate = 1;
|
||||
|
||||
// Specifies a read-only configuration for the volume.
|
||||
// Defaults to false (read/write).
|
||||
// +optional
|
||||
optional bool readOnly = 2;
|
||||
}
|
||||
|
||||
// Event is a report of an event somewhere in the cluster.
|
||||
message Event {
|
||||
// Standard object's metadata.
|
||||
@@ -2682,6 +2713,23 @@ message PersistentVolumeClaimStatus {
|
||||
repeated PersistentVolumeClaimCondition conditions = 4;
|
||||
}
|
||||
|
||||
// PersistentVolumeClaimTemplate is used to produce
|
||||
// PersistentVolumeClaim objects as part of an EphemeralVolumeSource.
|
||||
message PersistentVolumeClaimTemplate {
|
||||
// May contain labels and annotations that will be copied into the PVC
|
||||
// when creating it. No other fields are allowed and will be rejected during
|
||||
// validation.
|
||||
//
|
||||
// +optional
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
|
||||
|
||||
// The specification for the PersistentVolumeClaim. The entire content is
|
||||
// copied unchanged into the PVC that gets created from this
|
||||
// template. The same fields as in a PersistentVolumeClaim
|
||||
// are also valid here.
|
||||
optional PersistentVolumeClaimSpec spec = 2;
|
||||
}
|
||||
|
||||
// PersistentVolumeClaimVolumeSource references the user's PVC in the same namespace.
|
||||
// This volume finds the bound PV and mounts that volume for the pod. A
|
||||
// PersistentVolumeClaimVolumeSource is, essentially, a wrapper around another
|
||||
@@ -5341,6 +5389,34 @@ message VolumeSource {
|
||||
// CSI (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature).
|
||||
// +optional
|
||||
optional CSIVolumeSource csi = 28;
|
||||
|
||||
// Ephemeral represents a volume that is handled by a cluster storage driver (Alpha feature).
|
||||
// The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts,
|
||||
// and deleted when the pod is removed.
|
||||
//
|
||||
// Use this if:
|
||||
// a) the volume is only needed while the pod runs,
|
||||
// b) features of normal volumes like restoring from snapshot or capacity
|
||||
// tracking are needed,
|
||||
// c) the storage driver is specified through a storage class, and
|
||||
// d) the storage driver supports dynamic volume provisioning through
|
||||
// a PersistentVolumeClaim (see EphemeralVolumeSource for more
|
||||
// information on the connection between this volume type
|
||||
// and PersistentVolumeClaim).
|
||||
//
|
||||
// Use PersistentVolumeClaim or one of the vendor-specific
|
||||
// APIs for volumes that persist for longer than the lifecycle
|
||||
// of an individual pod.
|
||||
//
|
||||
// Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to
|
||||
// be used that way - see the documentation of the driver for
|
||||
// more information.
|
||||
//
|
||||
// A pod can use both types of ephemeral volumes and
|
||||
// persistent volumes at the same time.
|
||||
//
|
||||
// +optional
|
||||
optional EphemeralVolumeSource ephemeral = 29;
|
||||
}
|
||||
|
||||
// Represents a vSphere volume resource.
|
||||
|
||||
@@ -156,6 +156,33 @@ type VolumeSource struct {
|
||||
// CSI (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature).
|
||||
// +optional
|
||||
CSI *CSIVolumeSource `json:"csi,omitempty" protobuf:"bytes,28,opt,name=csi"`
|
||||
// Ephemeral represents a volume that is handled by a cluster storage driver (Alpha feature).
|
||||
// The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts,
|
||||
// and deleted when the pod is removed.
|
||||
//
|
||||
// Use this if:
|
||||
// a) the volume is only needed while the pod runs,
|
||||
// b) features of normal volumes like restoring from snapshot or capacity
|
||||
// tracking are needed,
|
||||
// c) the storage driver is specified through a storage class, and
|
||||
// d) the storage driver supports dynamic volume provisioning through
|
||||
// a PersistentVolumeClaim (see EphemeralVolumeSource for more
|
||||
// information on the connection between this volume type
|
||||
// and PersistentVolumeClaim).
|
||||
//
|
||||
// Use PersistentVolumeClaim or one of the vendor-specific
|
||||
// APIs for volumes that persist for longer than the lifecycle
|
||||
// of an individual pod.
|
||||
//
|
||||
// Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to
|
||||
// be used that way - see the documentation of the driver for
|
||||
// more information.
|
||||
//
|
||||
// A pod can use both types of ephemeral volumes and
|
||||
// persistent volumes at the same time.
|
||||
//
|
||||
// +optional
|
||||
Ephemeral *EphemeralVolumeSource `json:"ephemeral,omitempty" protobuf:"bytes,29,opt,name=ephemeral"`
|
||||
}
|
||||
|
||||
// PersistentVolumeClaimVolumeSource references the user's PVC in the same namespace.
|
||||
@@ -1746,6 +1773,54 @@ type CSIVolumeSource struct {
|
||||
NodePublishSecretRef *LocalObjectReference `json:"nodePublishSecretRef,omitempty" protobuf:"bytes,5,opt,name=nodePublishSecretRef"`
|
||||
}
|
||||
|
||||
// Represents an ephemeral volume that is handled by a normal storage driver.
|
||||
type EphemeralVolumeSource struct {
|
||||
// Will be used to create a stand-alone PVC to provision the volume.
|
||||
// The pod in which this EphemeralVolumeSource is embedded will be the
|
||||
// owner of the PVC, i.e. the PVC will be deleted together with the
|
||||
// pod. The name of the PVC will be `<pod name>-<volume name>` where
|
||||
// `<volume name>` is the name from the `PodSpec.Volumes` array
|
||||
// entry. Pod validation will reject the pod if the concatenated name
|
||||
// is not valid for a PVC (for example, too long).
|
||||
//
|
||||
// An existing PVC with that name that is not owned by the pod
|
||||
// will *not* be used for the pod to avoid using an unrelated
|
||||
// volume by mistake. Starting the pod is then blocked until
|
||||
// the unrelated PVC is removed. If such a pre-created PVC is
|
||||
// meant to be used by the pod, the PVC has to updated with an
|
||||
// owner reference to the pod once the pod exists. Normally
|
||||
// this should not be necessary, but it may be useful when
|
||||
// manually reconstructing a broken cluster.
|
||||
//
|
||||
// This field is read-only and no changes will be made by Kubernetes
|
||||
// to the PVC after it has been created.
|
||||
//
|
||||
// Required, must not be nil.
|
||||
VolumeClaimTemplate *PersistentVolumeClaimTemplate `json:"volumeClaimTemplate,omitempty" protobuf:"bytes,1,opt,name=volumeClaimTemplate"`
|
||||
|
||||
// Specifies a read-only configuration for the volume.
|
||||
// Defaults to false (read/write).
|
||||
// +optional
|
||||
ReadOnly bool `json:"readOnly,omitempty" protobuf:"varint,2,opt,name=readOnly"`
|
||||
}
|
||||
|
||||
// PersistentVolumeClaimTemplate is used to produce
|
||||
// PersistentVolumeClaim objects as part of an EphemeralVolumeSource.
|
||||
type PersistentVolumeClaimTemplate struct {
|
||||
// May contain labels and annotations that will be copied into the PVC
|
||||
// when creating it. No other fields are allowed and will be rejected during
|
||||
// validation.
|
||||
//
|
||||
// +optional
|
||||
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// The specification for the PersistentVolumeClaim. The entire content is
|
||||
// copied unchanged into the PVC that gets created from this
|
||||
// template. The same fields as in a PersistentVolumeClaim
|
||||
// are also valid here.
|
||||
Spec PersistentVolumeClaimSpec `json:"spec" protobuf:"bytes,2,name=spec"`
|
||||
}
|
||||
|
||||
// ContainerPort represents a network port in a single container.
|
||||
type ContainerPort struct {
|
||||
// If specified, this must be an IANA_SVC_NAME and unique within the pod. Each
|
||||
|
||||
@@ -626,6 +626,16 @@ func (EphemeralContainers) SwaggerDoc() map[string]string {
|
||||
return map_EphemeralContainers
|
||||
}
|
||||
|
||||
var map_EphemeralVolumeSource = map[string]string{
|
||||
"": "Represents an ephemeral volume that is handled by a normal storage driver.",
|
||||
"volumeClaimTemplate": "Will be used to create a stand-alone PVC to provision the volume. The pod in which this EphemeralVolumeSource is embedded will be the owner of the PVC, i.e. the PVC will be deleted together with the pod. The name of the PVC will be `<pod name>-<volume name>` where `<volume name>` is the name from the `PodSpec.Volumes` array entry. Pod validation will reject the pod if the concatenated name is not valid for a PVC (for example, too long).\n\nAn existing PVC with that name that is not owned by the pod will *not* be used for the pod to avoid using an unrelated volume by mistake. Starting the pod is then blocked until the unrelated PVC is removed. If such a pre-created PVC is meant to be used by the pod, the PVC has to updated with an owner reference to the pod once the pod exists. Normally this should not be necessary, but it may be useful when manually reconstructing a broken cluster.\n\nThis field is read-only and no changes will be made by Kubernetes to the PVC after it has been created.\n\nRequired, must not be nil.",
|
||||
"readOnly": "Specifies a read-only configuration for the volume. Defaults to false (read/write).",
|
||||
}
|
||||
|
||||
func (EphemeralVolumeSource) SwaggerDoc() map[string]string {
|
||||
return map_EphemeralVolumeSource
|
||||
}
|
||||
|
||||
var map_Event = map[string]string{
|
||||
"": "Event is a report of an event somewhere in the cluster.",
|
||||
"metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata",
|
||||
@@ -1319,6 +1329,16 @@ func (PersistentVolumeClaimStatus) SwaggerDoc() map[string]string {
|
||||
return map_PersistentVolumeClaimStatus
|
||||
}
|
||||
|
||||
var map_PersistentVolumeClaimTemplate = map[string]string{
|
||||
"": "PersistentVolumeClaimTemplate is used to produce PersistentVolumeClaim objects as part of an EphemeralVolumeSource.",
|
||||
"metadata": "May contain labels and annotations that will be copied into the PVC when creating it. No other fields are allowed and will be rejected during validation.",
|
||||
"spec": "The specification for the PersistentVolumeClaim. The entire content is copied unchanged into the PVC that gets created from this template. The same fields as in a PersistentVolumeClaim are also valid here.",
|
||||
}
|
||||
|
||||
func (PersistentVolumeClaimTemplate) SwaggerDoc() map[string]string {
|
||||
return map_PersistentVolumeClaimTemplate
|
||||
}
|
||||
|
||||
var map_PersistentVolumeClaimVolumeSource = map[string]string{
|
||||
"": "PersistentVolumeClaimVolumeSource references the user's PVC in the same namespace. This volume finds the bound PV and mounts that volume for the pod. A PersistentVolumeClaimVolumeSource is, essentially, a wrapper around another type of volume that is owned by someone else (the system).",
|
||||
"claimName": "ClaimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims",
|
||||
@@ -2443,6 +2463,7 @@ var map_VolumeSource = map[string]string{
|
||||
"scaleIO": "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.",
|
||||
"storageos": "StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.",
|
||||
"csi": "CSI (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature).",
|
||||
"ephemeral": "Ephemeral represents a volume that is handled by a cluster storage driver (Alpha feature). The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed.\n\nUse this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity\n tracking are needed,\nc) the storage driver is specified through a storage class, and d) the storage driver supports dynamic volume provisioning through\n a PersistentVolumeClaim (see EphemeralVolumeSource for more\n information on the connection between this volume type\n and PersistentVolumeClaim).\n\nUse PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of an individual pod.\n\nUse CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information.\n\nA pod can use both types of ephemeral volumes and persistent volumes at the same time.",
|
||||
}
|
||||
|
||||
func (VolumeSource) SwaggerDoc() map[string]string {
|
||||
|
||||
@@ -1433,6 +1433,27 @@ func (in *EphemeralContainers) DeepCopyObject() runtime.Object {
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *EphemeralVolumeSource) DeepCopyInto(out *EphemeralVolumeSource) {
|
||||
*out = *in
|
||||
if in.VolumeClaimTemplate != nil {
|
||||
in, out := &in.VolumeClaimTemplate, &out.VolumeClaimTemplate
|
||||
*out = new(PersistentVolumeClaimTemplate)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EphemeralVolumeSource.
|
||||
func (in *EphemeralVolumeSource) DeepCopy() *EphemeralVolumeSource {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(EphemeralVolumeSource)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *Event) DeepCopyInto(out *Event) {
|
||||
*out = *in
|
||||
@@ -2985,6 +3006,24 @@ func (in *PersistentVolumeClaimStatus) DeepCopy() *PersistentVolumeClaimStatus {
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *PersistentVolumeClaimTemplate) DeepCopyInto(out *PersistentVolumeClaimTemplate) {
|
||||
*out = *in
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
in.Spec.DeepCopyInto(&out.Spec)
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PersistentVolumeClaimTemplate.
|
||||
func (in *PersistentVolumeClaimTemplate) DeepCopy() *PersistentVolumeClaimTemplate {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(PersistentVolumeClaimTemplate)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *PersistentVolumeClaimVolumeSource) DeepCopyInto(out *PersistentVolumeClaimVolumeSource) {
|
||||
*out = *in
|
||||
@@ -5763,6 +5802,11 @@ func (in *VolumeSource) DeepCopyInto(out *VolumeSource) {
|
||||
*out = new(CSIVolumeSource)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.Ephemeral != nil {
|
||||
in, out := &in.Ephemeral, &out.Ephemeral
|
||||
*out = new(EphemeralVolumeSource)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -313,6 +313,7 @@ const (
|
||||
PortworxVolume FSType = "portworxVolume"
|
||||
ScaleIO FSType = "scaleIO"
|
||||
CSI FSType = "csi"
|
||||
Ephemeral FSType = "ephemeral"
|
||||
All FSType = "*"
|
||||
)
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
1245
staging/src/k8s.io/api/testdata/HEAD/batch.v1.Job.json
vendored
1245
staging/src/k8s.io/api/testdata/HEAD/batch.v1.Job.json
vendored
File diff suppressed because it is too large
Load Diff
BIN
staging/src/k8s.io/api/testdata/HEAD/batch.v1.Job.pb
vendored
BIN
staging/src/k8s.io/api/testdata/HEAD/batch.v1.Job.pb
vendored
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
1132
staging/src/k8s.io/api/testdata/HEAD/core.v1.Pod.json
vendored
1132
staging/src/k8s.io/api/testdata/HEAD/core.v1.Pod.json
vendored
File diff suppressed because it is too large
Load Diff
BIN
staging/src/k8s.io/api/testdata/HEAD/core.v1.Pod.pb
vendored
BIN
staging/src/k8s.io/api/testdata/HEAD/core.v1.Pod.pb
vendored
Binary file not shown.
1232
staging/src/k8s.io/api/testdata/HEAD/core.v1.Pod.yaml
vendored
1232
staging/src/k8s.io/api/testdata/HEAD/core.v1.Pod.yaml
vendored
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -365,17 +365,96 @@
|
||||
"nodePublishSecretRef": {
|
||||
"name": "142"
|
||||
}
|
||||
},
|
||||
"ephemeral": {
|
||||
"volumeClaimTemplate": {
|
||||
"metadata": {
|
||||
"name": "143",
|
||||
"generateName": "144",
|
||||
"namespace": "145",
|
||||
"selfLink": "146",
|
||||
"uid": "y綸_Ú8參遼ū",
|
||||
"resourceVersion": "16267283576845911679",
|
||||
"generation": 2131277878630553496,
|
||||
"creationTimestamp": null,
|
||||
"deletionGracePeriodSeconds": -2351574817327272831,
|
||||
"labels": {
|
||||
"148": "149"
|
||||
},
|
||||
"annotations": {
|
||||
"150": "151"
|
||||
},
|
||||
"ownerReferences": [
|
||||
{
|
||||
"apiVersion": "152",
|
||||
"kind": "153",
|
||||
"name": "154",
|
||||
"uid": "臷Ľð»ųKĵ\u00264ʑ%:;栍dʪ",
|
||||
"controller": false,
|
||||
"blockOwnerDeletion": false
|
||||
}
|
||||
],
|
||||
"finalizers": [
|
||||
"155"
|
||||
],
|
||||
"clusterName": "156",
|
||||
"managedFields": [
|
||||
{
|
||||
"manager": "157",
|
||||
"operation": "ɍi縱ù墴1Rƥ贫",
|
||||
"apiVersion": "158",
|
||||
"fieldsType": "159"
|
||||
}
|
||||
]
|
||||
},
|
||||
"spec": {
|
||||
"accessModes": [
|
||||
"掊°nʮ閼咎櫸eʔŊƞ究:hoĂɋ瀐"
|
||||
],
|
||||
"selector": {
|
||||
"matchLabels": {
|
||||
"d.iUaC_wYSJfB._.zS-._..3le-Q4-R-083.SD..P.---5.-Z3P__D__6t-2.-m": "wE._._3.-.83_iQ"
|
||||
},
|
||||
"matchExpressions": [
|
||||
{
|
||||
"key": "x--r7v66bm71u-n4f9wk-3--652x01--p--n4-4-t--2/C.A-j..9dfn3Y8d_0_.---M_4FpF_W-1._-vL_i.-_-a--G-I.-_Y33--.8U.6",
|
||||
"operator": "In",
|
||||
"values": [
|
||||
"A.0.__cd..lv-_aLQbI2_-.XFw.8._..._Wxpe..J7r6"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"resources": {
|
||||
"limits": {
|
||||
"\u003c鴒翁杙Ŧ癃8鸖ɱJȉ罴": "587"
|
||||
},
|
||||
"requests": {
|
||||
"Ó6dz娝嘚庎D}埽uʎȺ眖R#yV": "156"
|
||||
}
|
||||
},
|
||||
"volumeName": "166",
|
||||
"storageClassName": "167",
|
||||
"volumeMode": "瘦ɖ緕ȚÍ勅跦Opwǩ曬逴",
|
||||
"dataSource": {
|
||||
"apiGroup": "168",
|
||||
"kind": "169",
|
||||
"name": "170"
|
||||
}
|
||||
}
|
||||
},
|
||||
"readOnly": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"volumeMounts": [
|
||||
{
|
||||
"name": "143",
|
||||
"name": "171",
|
||||
"readOnly": true,
|
||||
"mountPath": "144",
|
||||
"subPath": "145",
|
||||
"mountPropagation": "腿ħ缶.蒅!a",
|
||||
"subPathExpr": "146"
|
||||
"mountPath": "172",
|
||||
"subPath": "173",
|
||||
"mountPropagation": "œȠƬQg鄠[颐o啛更偢ɇ卷荙JLĹ]",
|
||||
"subPathExpr": "174"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -66,12 +66,12 @@ spec:
|
||||
matchLabels:
|
||||
8---jop9641lg.p-g8c2-k-912e5-c-e63-n-3n/E9.8ThjT9s-j41-0-6p-JFHn7y-74.-0MUORQQ.N2.3: 68._bQw.-dG6c-.6--_x.--0wmZk1_8._3s_-_Bq.m_4
|
||||
volumeMounts:
|
||||
- mountPath: "144"
|
||||
mountPropagation: 腿ħ缶.蒅!a
|
||||
name: "143"
|
||||
- mountPath: "172"
|
||||
mountPropagation: œȠƬQg鄠[颐o啛更偢ɇ卷荙JLĹ]
|
||||
name: "171"
|
||||
readOnly: true
|
||||
subPath: "145"
|
||||
subPathExpr: "146"
|
||||
subPath: "173"
|
||||
subPathExpr: "174"
|
||||
volumes:
|
||||
- awsElasticBlockStore:
|
||||
fsType: "43"
|
||||
@@ -133,6 +133,61 @@ spec:
|
||||
resource: "88"
|
||||
emptyDir:
|
||||
sizeLimit: "700"
|
||||
ephemeral:
|
||||
readOnly: true
|
||||
volumeClaimTemplate:
|
||||
metadata:
|
||||
annotations:
|
||||
"150": "151"
|
||||
clusterName: "156"
|
||||
creationTimestamp: null
|
||||
deletionGracePeriodSeconds: -2351574817327272831
|
||||
finalizers:
|
||||
- "155"
|
||||
generateName: "144"
|
||||
generation: 2131277878630553496
|
||||
labels:
|
||||
"148": "149"
|
||||
managedFields:
|
||||
- apiVersion: "158"
|
||||
fieldsType: "159"
|
||||
manager: "157"
|
||||
operation: ɍi縱ù墴1Rƥ贫
|
||||
name: "143"
|
||||
namespace: "145"
|
||||
ownerReferences:
|
||||
- apiVersion: "152"
|
||||
blockOwnerDeletion: false
|
||||
controller: false
|
||||
kind: "153"
|
||||
name: "154"
|
||||
uid: 臷Ľð»ųKĵ&4ʑ%:;栍dʪ
|
||||
resourceVersion: "16267283576845911679"
|
||||
selfLink: "146"
|
||||
uid: y綸_Ú8參遼ū
|
||||
spec:
|
||||
accessModes:
|
||||
- 掊°nʮ閼咎櫸eʔŊƞ究:hoĂɋ瀐
|
||||
dataSource:
|
||||
apiGroup: "168"
|
||||
kind: "169"
|
||||
name: "170"
|
||||
resources:
|
||||
limits:
|
||||
<鴒翁杙Ŧ癃8鸖ɱJȉ罴: "587"
|
||||
requests:
|
||||
Ó6dz娝嘚庎D}埽uʎȺ眖R#yV: "156"
|
||||
selector:
|
||||
matchExpressions:
|
||||
- key: x--r7v66bm71u-n4f9wk-3--652x01--p--n4-4-t--2/C.A-j..9dfn3Y8d_0_.---M_4FpF_W-1._-vL_i.-_-a--G-I.-_Y33--.8U.6
|
||||
operator: In
|
||||
values:
|
||||
- A.0.__cd..lv-_aLQbI2_-.XFw.8._..._Wxpe..J7r6
|
||||
matchLabels:
|
||||
d.iUaC_wYSJfB._.zS-._..3le-Q4-R-083.SD..P.---5.-Z3P__D__6t-2.-m: wE._._3.-.83_iQ
|
||||
storageClassName: "167"
|
||||
volumeMode: 瘦ɖ緕ȚÍ勅跦Opwǩ曬逴
|
||||
volumeName: "166"
|
||||
fc:
|
||||
fsType: "90"
|
||||
lun: -460478410
|
||||
|
||||
@@ -156,6 +156,28 @@ func (pw *prefixWriter) Flush() {
|
||||
}
|
||||
}
|
||||
|
||||
// nestedPrefixWriter implements PrefixWriter by increasing the level
|
||||
// before passing text on to some other writer.
|
||||
type nestedPrefixWriter struct {
|
||||
PrefixWriter
|
||||
indent int
|
||||
}
|
||||
|
||||
var _ PrefixWriter = &prefixWriter{}
|
||||
|
||||
// NewPrefixWriter creates a new PrefixWriter.
|
||||
func NewNestedPrefixWriter(out PrefixWriter, indent int) PrefixWriter {
|
||||
return &nestedPrefixWriter{PrefixWriter: out, indent: indent}
|
||||
}
|
||||
|
||||
func (npw *nestedPrefixWriter) Write(level int, format string, a ...interface{}) {
|
||||
npw.PrefixWriter.Write(level+npw.indent, format, a...)
|
||||
}
|
||||
|
||||
func (npw *nestedPrefixWriter) WriteLine(a ...interface{}) {
|
||||
npw.PrefixWriter.Write(npw.indent, "%s", fmt.Sprintln(a...))
|
||||
}
|
||||
|
||||
func describerMap(clientConfig *rest.Config) (map[schema.GroupKind]ResourceDescriber, error) {
|
||||
c, err := clientset.NewForConfig(clientConfig)
|
||||
if err != nil {
|
||||
@@ -822,6 +844,8 @@ func describeVolumes(volumes []corev1.Volume, w PrefixWriter, space string) {
|
||||
printGlusterfsVolumeSource(volume.VolumeSource.Glusterfs, w)
|
||||
case volume.VolumeSource.PersistentVolumeClaim != nil:
|
||||
printPersistentVolumeClaimVolumeSource(volume.VolumeSource.PersistentVolumeClaim, w)
|
||||
case volume.VolumeSource.Ephemeral != nil:
|
||||
printEphemeralVolumeSource(volume.VolumeSource.Ephemeral, w)
|
||||
case volume.VolumeSource.RBD != nil:
|
||||
printRBDVolumeSource(volume.VolumeSource.RBD, w)
|
||||
case volume.VolumeSource.Quobyte != nil:
|
||||
@@ -1037,6 +1061,18 @@ func printPersistentVolumeClaimVolumeSource(claim *corev1.PersistentVolumeClaimV
|
||||
claim.ClaimName, claim.ReadOnly)
|
||||
}
|
||||
|
||||
func printEphemeralVolumeSource(ephemeral *corev1.EphemeralVolumeSource, w PrefixWriter) {
|
||||
w.Write(LEVEL_2, "Type:\tEphemeralVolume (an inline specification for a volume that gets created and deleted with the pod)\n")
|
||||
if ephemeral.VolumeClaimTemplate != nil {
|
||||
printPersistentVolumeClaim(NewNestedPrefixWriter(w, LEVEL_2),
|
||||
&corev1.PersistentVolumeClaim{
|
||||
ObjectMeta: ephemeral.VolumeClaimTemplate.ObjectMeta,
|
||||
Spec: ephemeral.VolumeClaimTemplate.Spec,
|
||||
}, false /* not a full PVC */)
|
||||
}
|
||||
w.Write(LEVEL_2, "ReadOnly:\t%v\n", ephemeral.ReadOnly)
|
||||
}
|
||||
|
||||
func printRBDVolumeSource(rbd *corev1.RBDVolumeSource, w PrefixWriter) {
|
||||
w.Write(LEVEL_2, "Type:\tRBD (a Rados Block Device mount on the host that shares a pod's lifetime)\n"+
|
||||
" CephMonitors:\t%v\n"+
|
||||
@@ -1535,39 +1571,7 @@ func getPvcs(volumes []corev1.Volume) []corev1.Volume {
|
||||
func describePersistentVolumeClaim(pvc *corev1.PersistentVolumeClaim, events *corev1.EventList, mountPods []corev1.Pod) (string, error) {
|
||||
return tabbedString(func(out io.Writer) error {
|
||||
w := NewPrefixWriter(out)
|
||||
w.Write(LEVEL_0, "Name:\t%s\n", pvc.Name)
|
||||
w.Write(LEVEL_0, "Namespace:\t%s\n", pvc.Namespace)
|
||||
w.Write(LEVEL_0, "StorageClass:\t%s\n", storageutil.GetPersistentVolumeClaimClass(pvc))
|
||||
if pvc.ObjectMeta.DeletionTimestamp != nil {
|
||||
w.Write(LEVEL_0, "Status:\tTerminating (lasts %s)\n", translateTimestampSince(*pvc.ObjectMeta.DeletionTimestamp))
|
||||
} else {
|
||||
w.Write(LEVEL_0, "Status:\t%v\n", pvc.Status.Phase)
|
||||
}
|
||||
w.Write(LEVEL_0, "Volume:\t%s\n", pvc.Spec.VolumeName)
|
||||
printLabelsMultiline(w, "Labels", pvc.Labels)
|
||||
printAnnotationsMultiline(w, "Annotations", pvc.Annotations)
|
||||
w.Write(LEVEL_0, "Finalizers:\t%v\n", pvc.ObjectMeta.Finalizers)
|
||||
storage := pvc.Spec.Resources.Requests[corev1.ResourceStorage]
|
||||
capacity := ""
|
||||
accessModes := ""
|
||||
if pvc.Spec.VolumeName != "" {
|
||||
accessModes = storageutil.GetAccessModesAsString(pvc.Status.AccessModes)
|
||||
storage = pvc.Status.Capacity[corev1.ResourceStorage]
|
||||
capacity = storage.String()
|
||||
}
|
||||
w.Write(LEVEL_0, "Capacity:\t%s\n", capacity)
|
||||
w.Write(LEVEL_0, "Access Modes:\t%s\n", accessModes)
|
||||
if pvc.Spec.VolumeMode != nil {
|
||||
w.Write(LEVEL_0, "VolumeMode:\t%v\n", *pvc.Spec.VolumeMode)
|
||||
}
|
||||
if pvc.Spec.DataSource != nil {
|
||||
w.Write(LEVEL_0, "DataSource:\n")
|
||||
if pvc.Spec.DataSource.APIGroup != nil {
|
||||
w.Write(LEVEL_1, "APIGroup:\t%v\n", *pvc.Spec.DataSource.APIGroup)
|
||||
}
|
||||
w.Write(LEVEL_1, "Kind:\t%v\n", pvc.Spec.DataSource.Kind)
|
||||
w.Write(LEVEL_1, "Name:\t%v\n", pvc.Spec.DataSource.Name)
|
||||
}
|
||||
printPersistentVolumeClaim(w, pvc, true)
|
||||
printPodsMultiline(w, "Mounted By", mountPods)
|
||||
|
||||
if len(pvc.Status.Conditions) > 0 {
|
||||
@@ -1592,6 +1596,50 @@ func describePersistentVolumeClaim(pvc *corev1.PersistentVolumeClaim, events *co
|
||||
})
|
||||
}
|
||||
|
||||
// printPersistentVolumeClaim is used for both PVCs and PersistentVolumeClaimTemplate. For the latter,
|
||||
// we need to skip some fields which have no meaning.
|
||||
func printPersistentVolumeClaim(w PrefixWriter, pvc *corev1.PersistentVolumeClaim, isFullPVC bool) {
|
||||
if isFullPVC {
|
||||
w.Write(LEVEL_0, "Name:\t%s\n", pvc.Name)
|
||||
w.Write(LEVEL_0, "Namespace:\t%s\n", pvc.Namespace)
|
||||
}
|
||||
w.Write(LEVEL_0, "StorageClass:\t%s\n", storageutil.GetPersistentVolumeClaimClass(pvc))
|
||||
if isFullPVC {
|
||||
if pvc.ObjectMeta.DeletionTimestamp != nil {
|
||||
w.Write(LEVEL_0, "Status:\tTerminating (lasts %s)\n", translateTimestampSince(*pvc.ObjectMeta.DeletionTimestamp))
|
||||
} else {
|
||||
w.Write(LEVEL_0, "Status:\t%v\n", pvc.Status.Phase)
|
||||
}
|
||||
}
|
||||
w.Write(LEVEL_0, "Volume:\t%s\n", pvc.Spec.VolumeName)
|
||||
printLabelsMultiline(w, "Labels", pvc.Labels)
|
||||
printAnnotationsMultiline(w, "Annotations", pvc.Annotations)
|
||||
if isFullPVC {
|
||||
w.Write(LEVEL_0, "Finalizers:\t%v\n", pvc.ObjectMeta.Finalizers)
|
||||
}
|
||||
storage := pvc.Spec.Resources.Requests[corev1.ResourceStorage]
|
||||
capacity := ""
|
||||
accessModes := ""
|
||||
if pvc.Spec.VolumeName != "" {
|
||||
accessModes = storageutil.GetAccessModesAsString(pvc.Status.AccessModes)
|
||||
storage = pvc.Status.Capacity[corev1.ResourceStorage]
|
||||
capacity = storage.String()
|
||||
}
|
||||
w.Write(LEVEL_0, "Capacity:\t%s\n", capacity)
|
||||
w.Write(LEVEL_0, "Access Modes:\t%s\n", accessModes)
|
||||
if pvc.Spec.VolumeMode != nil {
|
||||
w.Write(LEVEL_0, "VolumeMode:\t%v\n", *pvc.Spec.VolumeMode)
|
||||
}
|
||||
if pvc.Spec.DataSource != nil {
|
||||
w.Write(LEVEL_0, "DataSource:\n")
|
||||
if pvc.Spec.DataSource.APIGroup != nil {
|
||||
w.Write(LEVEL_1, "APIGroup:\t%v\n", *pvc.Spec.DataSource.APIGroup)
|
||||
}
|
||||
w.Write(LEVEL_1, "Kind:\t%v\n", pvc.Spec.DataSource.Kind)
|
||||
w.Write(LEVEL_1, "Name:\t%v\n", pvc.Spec.DataSource.Name)
|
||||
}
|
||||
}
|
||||
|
||||
func describeContainers(label string, containers []corev1.Container, containerStatuses []corev1.ContainerStatus,
|
||||
resolverFn EnvVarResolverFunc, w PrefixWriter, space string) {
|
||||
statuses := map[string]corev1.ContainerStatus{}
|
||||
|
||||
Reference in New Issue
Block a user