Add annotation constants to glusterfs plugin.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
This commit is contained in:
Humble Chirammal 2017-06-23 19:03:07 +05:30
parent 8cb70cd0e6
commit a41e1c52ef

View File

@ -81,6 +81,9 @@ const (
absoluteGidMin = 2000 absoluteGidMin = 2000
absoluteGidMax = math.MaxInt32 absoluteGidMax = math.MaxInt32
linuxGlusterMountBinary = "mount.glusterfs" linuxGlusterMountBinary = "mount.glusterfs"
heketiAnn = "heketi-dynamic-provisioner"
glusterTypeAnn = "gluster.org/type"
glusterDescAnn = "Gluster-Internal: Dynamically provisioned PV"
) )
func (plugin *glusterfsPlugin) Init(host volume.VolumeHost) error { func (plugin *glusterfsPlugin) Init(host volume.VolumeHost) error {
@ -721,9 +724,9 @@ func (p *glusterfsVolumeProvisioner) Provision() (*v1.PersistentVolume, error) {
pv.Annotations = map[string]string{ pv.Annotations = map[string]string{
volumehelper.VolumeGidAnnotationKey: gidStr, volumehelper.VolumeGidAnnotationKey: gidStr,
"kubernetes.io/createdby": "heketi-dynamic-provisioner", volumehelper.VolumeDynamicallyCreatedByKey: heketiAnn,
"gluster.org/type": "file", glusterTypeAnn: "file",
"Description": "Gluster: Dynamically provisioned PV", "Description": glusterDescAnn,
v1.MountOptionAnnotation: "auto_unmount", v1.MountOptionAnnotation: "auto_unmount",
} }