mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-12 20:57:20 +00:00
Merge pull request #4601 from calfonso/nfs_mount_plugin
NFSMount storage plugin for kubelet.
This commit is contained in:
@@ -1054,6 +1054,9 @@ func init() {
|
||||
if err := s.Convert(&in.Secret, &out.Secret, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.Convert(&in.NFS, &out.NFS, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
},
|
||||
func(in *VolumeSource, out *newer.VolumeSource, s conversion.Scope) error {
|
||||
@@ -1072,6 +1075,9 @@ func init() {
|
||||
if err := s.Convert(&in.Secret, &out.Secret, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.Convert(&in.NFS, &out.NFS, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
},
|
||||
|
||||
|
@@ -105,6 +105,8 @@ type VolumeSource struct {
|
||||
GitRepo *GitRepoVolumeSource `json:"gitRepo" description:"git repository at a particular revision"`
|
||||
// Secret represents a secret to populate the volume with
|
||||
Secret *SecretVolumeSource `json:"secret" description:"secret to populate volume with"`
|
||||
// NFS represents an NFS mount on the host that shares a pod's lifetime
|
||||
NFS *NFSVolumeSource `json:"nfs" description:"NFS volume that will be mounted in the host machine "`
|
||||
}
|
||||
|
||||
// HostPathVolumeSource represents bare host directory volume.
|
||||
@@ -1151,6 +1153,19 @@ type ResourceQuotaList struct {
|
||||
Items []ResourceQuota `json:"items" description:"items is a list of ResourceQuota objects"`
|
||||
}
|
||||
|
||||
// NFSVolumeSource represents an NFS Mount that lasts the lifetime of a pod
|
||||
type NFSVolumeSource struct {
|
||||
// Server is the hostname or IP address of the NFS server
|
||||
Server string `json:"server" description:"the hostname or IP address of the NFS server"`
|
||||
|
||||
// Path is the exported NFS share
|
||||
Path string `json:"path" description:"the path that is exported by the NFS server"`
|
||||
|
||||
// Optional: Defaults to false (read/write). ReadOnly here will force
|
||||
// the NFS export to be mounted as read-only permissions
|
||||
ReadOnly bool `json:"readOnly,omitempty" description:"forces the NFS export to be mounted with read-only permissions"`
|
||||
}
|
||||
|
||||
// Secret holds secret data of a certain type. The total bytes of the values in
|
||||
// the Data field must be less than MaxSecretSize bytes.
|
||||
type Secret struct {
|
||||
|
Reference in New Issue
Block a user