mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 23:47:50 +00:00
Add flocker volume plugin
Flocker [1] is an open-source container data volume manager for Dockerized applications. This PR adds a volume plugin for Flocker. The plugin interfaces the Flocker Control Service REST API [2] to attachment attach the volume to the pod. Each kubelet host should run Flocker agents (Container Agent and Dataset Agent). The kubelet will also require environment variables that contain the host and port of the Flocker Control Service. (see Flocker architecture [3] for more). - `FLOCKER_CONTROL_SERVICE_HOST` - `FLOCKER_CONTROL_SERVICE_PORT` The contribution introduces a new 'flocker' volume type to the API with fields: - `datasetName`: which indicates the name of the dataset in Flocker added to metadata; - `size`: a human-readable number that indicates the maximum size of the requested dataset. Full documentation can be found docs/user-guide/volumes.md and examples can be found at the examples/ folder [1] https://clusterhq.com/flocker/introduction/ [2] https://docs.clusterhq.com/en/1.3.1/reference/api.html [3] https://docs.clusterhq.com/en/1.3.1/concepts/architecture.html
This commit is contained in:
@@ -790,6 +790,18 @@ func convert_api_FCVolumeSource_To_v1_FCVolumeSource(in *api.FCVolumeSource, out
|
||||
return autoconvert_api_FCVolumeSource_To_v1_FCVolumeSource(in, out, s)
|
||||
}
|
||||
|
||||
func autoconvert_api_FlockerVolumeSource_To_v1_FlockerVolumeSource(in *api.FlockerVolumeSource, out *FlockerVolumeSource, s conversion.Scope) error {
|
||||
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||
defaulting.(func(*api.FlockerVolumeSource))(in)
|
||||
}
|
||||
out.DatasetName = in.DatasetName
|
||||
return nil
|
||||
}
|
||||
|
||||
func convert_api_FlockerVolumeSource_To_v1_FlockerVolumeSource(in *api.FlockerVolumeSource, out *FlockerVolumeSource, s conversion.Scope) error {
|
||||
return autoconvert_api_FlockerVolumeSource_To_v1_FlockerVolumeSource(in, out, s)
|
||||
}
|
||||
|
||||
func autoconvert_api_GCEPersistentDiskVolumeSource_To_v1_GCEPersistentDiskVolumeSource(in *api.GCEPersistentDiskVolumeSource, out *GCEPersistentDiskVolumeSource, s conversion.Scope) error {
|
||||
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||
defaulting.(func(*api.GCEPersistentDiskVolumeSource))(in)
|
||||
@@ -1777,6 +1789,14 @@ func autoconvert_api_PersistentVolumeSource_To_v1_PersistentVolumeSource(in *api
|
||||
} else {
|
||||
out.FC = nil
|
||||
}
|
||||
if in.Flocker != nil {
|
||||
out.Flocker = new(FlockerVolumeSource)
|
||||
if err := convert_api_FlockerVolumeSource_To_v1_FlockerVolumeSource(in.Flocker, out.Flocker, s); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.Flocker = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -2984,6 +3004,14 @@ func autoconvert_api_VolumeSource_To_v1_VolumeSource(in *api.VolumeSource, out *
|
||||
} else {
|
||||
out.CephFS = nil
|
||||
}
|
||||
if in.Flocker != nil {
|
||||
out.Flocker = new(FlockerVolumeSource)
|
||||
if err := convert_api_FlockerVolumeSource_To_v1_FlockerVolumeSource(in.Flocker, out.Flocker, s); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.Flocker = nil
|
||||
}
|
||||
if in.DownwardAPI != nil {
|
||||
out.DownwardAPI = new(DownwardAPIVolumeSource)
|
||||
if err := convert_api_DownwardAPIVolumeSource_To_v1_DownwardAPIVolumeSource(in.DownwardAPI, out.DownwardAPI, s); err != nil {
|
||||
@@ -3771,6 +3799,18 @@ func convert_v1_FCVolumeSource_To_api_FCVolumeSource(in *FCVolumeSource, out *ap
|
||||
return autoconvert_v1_FCVolumeSource_To_api_FCVolumeSource(in, out, s)
|
||||
}
|
||||
|
||||
func autoconvert_v1_FlockerVolumeSource_To_api_FlockerVolumeSource(in *FlockerVolumeSource, out *api.FlockerVolumeSource, s conversion.Scope) error {
|
||||
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||
defaulting.(func(*FlockerVolumeSource))(in)
|
||||
}
|
||||
out.DatasetName = in.DatasetName
|
||||
return nil
|
||||
}
|
||||
|
||||
func convert_v1_FlockerVolumeSource_To_api_FlockerVolumeSource(in *FlockerVolumeSource, out *api.FlockerVolumeSource, s conversion.Scope) error {
|
||||
return autoconvert_v1_FlockerVolumeSource_To_api_FlockerVolumeSource(in, out, s)
|
||||
}
|
||||
|
||||
func autoconvert_v1_GCEPersistentDiskVolumeSource_To_api_GCEPersistentDiskVolumeSource(in *GCEPersistentDiskVolumeSource, out *api.GCEPersistentDiskVolumeSource, s conversion.Scope) error {
|
||||
if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
|
||||
defaulting.(func(*GCEPersistentDiskVolumeSource))(in)
|
||||
@@ -4758,6 +4798,14 @@ func autoconvert_v1_PersistentVolumeSource_To_api_PersistentVolumeSource(in *Per
|
||||
} else {
|
||||
out.FC = nil
|
||||
}
|
||||
if in.Flocker != nil {
|
||||
out.Flocker = new(api.FlockerVolumeSource)
|
||||
if err := convert_v1_FlockerVolumeSource_To_api_FlockerVolumeSource(in.Flocker, out.Flocker, s); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.Flocker = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -5965,6 +6013,14 @@ func autoconvert_v1_VolumeSource_To_api_VolumeSource(in *VolumeSource, out *api.
|
||||
} else {
|
||||
out.CephFS = nil
|
||||
}
|
||||
if in.Flocker != nil {
|
||||
out.Flocker = new(api.FlockerVolumeSource)
|
||||
if err := convert_v1_FlockerVolumeSource_To_api_FlockerVolumeSource(in.Flocker, out.Flocker, s); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.Flocker = nil
|
||||
}
|
||||
if in.DownwardAPI != nil {
|
||||
out.DownwardAPI = new(api.DownwardAPIVolumeSource)
|
||||
if err := convert_v1_DownwardAPIVolumeSource_To_api_DownwardAPIVolumeSource(in.DownwardAPI, out.DownwardAPI, s); err != nil {
|
||||
@@ -6022,6 +6078,7 @@ func init() {
|
||||
autoconvert_api_Event_To_v1_Event,
|
||||
autoconvert_api_ExecAction_To_v1_ExecAction,
|
||||
autoconvert_api_FCVolumeSource_To_v1_FCVolumeSource,
|
||||
autoconvert_api_FlockerVolumeSource_To_v1_FlockerVolumeSource,
|
||||
autoconvert_api_GCEPersistentDiskVolumeSource_To_v1_GCEPersistentDiskVolumeSource,
|
||||
autoconvert_api_GitRepoVolumeSource_To_v1_GitRepoVolumeSource,
|
||||
autoconvert_api_GlusterfsVolumeSource_To_v1_GlusterfsVolumeSource,
|
||||
@@ -6139,6 +6196,7 @@ func init() {
|
||||
autoconvert_v1_Event_To_api_Event,
|
||||
autoconvert_v1_ExecAction_To_api_ExecAction,
|
||||
autoconvert_v1_FCVolumeSource_To_api_FCVolumeSource,
|
||||
autoconvert_v1_FlockerVolumeSource_To_api_FlockerVolumeSource,
|
||||
autoconvert_v1_GCEPersistentDiskVolumeSource_To_api_GCEPersistentDiskVolumeSource,
|
||||
autoconvert_v1_GitRepoVolumeSource_To_api_GitRepoVolumeSource,
|
||||
autoconvert_v1_GlusterfsVolumeSource_To_api_GlusterfsVolumeSource,
|
||||
|
||||
Reference in New Issue
Block a user