mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	Merge pull request #44669 from humblec/gluster-metadata-pv
Automatic merge from submit-queue (batch tested with PRs 45081, 44669) Add more metadata about dynamically provisioned PVs using PV annotation This patch add below fields to Gluster dynamic pvs. "Description: "Gluster: dynamically provisioned PVs" "Creator": "heketi-dynamic" "Type": "file" Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
This commit is contained in:
		@@ -696,7 +696,13 @@ func (r *glusterfsVolumeProvisioner) Provision() (*v1.PersistentVolume, error) {
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	gidStr := strconv.FormatInt(int64(gid), 10)
 | 
			
		||||
	pv.Annotations = map[string]string{volumehelper.VolumeGidAnnotationKey: gidStr}
 | 
			
		||||
 | 
			
		||||
	pv.Annotations = map[string]string{
 | 
			
		||||
		volumehelper.VolumeGidAnnotationKey: gidStr,
 | 
			
		||||
		"kubernetes.io/createdby":           "heketi-dynamic-provisioner",
 | 
			
		||||
		"gluster.org/type":                  "file",
 | 
			
		||||
		"Description":                       "Gluster: Dynamically provisioned PV",
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	pv.Spec.Capacity = v1.ResourceList{
 | 
			
		||||
		v1.ResourceName(v1.ResourceStorage): resource.MustParse(fmt.Sprintf("%dGi", sizeGB)),
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user