func ExtractStorageResourceRequirement(resources v1.ResourceRequirements) v1.ResourceRequirements {
	filterStorage := func(list v1.ResourceList) v1.ResourceList {
		newlist := make(v1.ResourceList)
		for k, v := range list {
			if k != v1.ResourceStorage && k != "iops" {
				continue
			}
			newlist[k] = v
		}
		return newlist
	}
	return v1.ResourceRequirements{
		Limits:   filterStorage(resources.Limits),
		Requests: filterStorage(resources.Requests),
	}
}
ExtractStorageResourceRequirement filters resource requirements for Pods.
package k8sutil
import (
	"context"
	"strconv"
	"github.com/arangodb/kube-arangodb/pkg/util/k8sutil/inspector/persistentvolumeclaim"
	"github.com/arangodb/kube-arangodb/pkg/util/errors"
	v1 "k8s.io/api/core/v1"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"github.com/arangodb/kube-arangodb/pkg/util/constants"
)
func IsPersistentVolumeClaimMarkedForDeletion(pvc *v1.PersistentVolumeClaim) bool {
	return pvc.DeletionTimestamp != nil
}
func IsPersistentVolumeClaimFileSystemResizePending(pvc *v1.PersistentVolumeClaim) bool {
	for _, c := range pvc.Status.Conditions {
		if c.Type == v1.PersistentVolumeClaimFileSystemResizePending && c.Status == v1.ConditionTrue {
			return true
		}
	}
	return false
}
func CreatePersistentVolumeClaimName(deploymentName, role, id string) string {
	return deploymentName + "-" + role + "-" + stripArangodPrefix(id)
}