Documentation ¶
Index ¶
- Variables
- func GetAllNodesCost()
- func GetClusterNodes() []v1.Node
- func GetClusterPersistentVolumeClaims() []v1.PersistentVolumeClaim
- func GetClusterPods() []v1.Pod
- func GetClusterSummary()
- func GetClusterVolumes() []v1.PersistentVolume
- func GetGroupByName(groupClient *groups.GroupClient, groupName string) *groups_v1.Group
- func GetPodCost(podName string)
- func GetPodsCostForLabel(label string)
- func GetSavings()
- func PrintGroup(group *groups_v1.Group)
- func ProvideClientSetInstance(clientset *kubernetes.Clientset)
- func SaveUserCosts(cpuCostPerCPUPerHour, memCostPerGBPerHour, storageCostPerGBPerHour string) bool
- type Cost
- type PersistentVolumeClaim
- type Pod
- type Price
Constants ¶
This section is empty.
Variables ¶
var ClientSetInstance *kubernetes.Clientset
ClientSetInstance helps in accessing kubernetes apis through client.
Functions ¶
func GetAllNodesCost ¶
func GetAllNodesCost()
GetAllNodesCost returns the cumulative cost of all the nodes.
func GetClusterNodes ¶
GetClusterNodes returns the list of nodes in the cluster.
func GetClusterPersistentVolumeClaims ¶
func GetClusterPersistentVolumeClaims() []v1.PersistentVolumeClaim
GetClusterPersistentVolumeClaims returns the list of persistent volume claims for the cluster.
func GetClusterPods ¶
GetClusterPods returns the list of pods in cluster.
func GetClusterVolumes ¶
func GetClusterVolumes() []v1.PersistentVolume
GetClusterVolumes returns list of persistent volumes for the cluster.
func GetGroupByName ¶
func GetGroupByName(groupClient *groups.GroupClient, groupName string) *groups_v1.Group
GetGroupByName return group CRD by name.
func GetPodCost ¶
func GetPodCost(podName string)
GetPodCost returns the cumulative cost for the pods.
func GetPodsCostForLabel ¶
func GetPodsCostForLabel(label string)
GetPodsCostForLabel returns pods cost for given label.
func PrintGroup ¶
PrintGroup displays the group information.
func ProvideClientSetInstance ¶
func ProvideClientSetInstance(clientset *kubernetes.Clientset)
ProvideClientSetInstance sets the client set instance.
func SaveUserCosts ¶
SaveUserCosts stores the cpu, memory and storage cost per unit per hour in the cluster as config maps.
Types ¶
type Cost ¶
Cost details
func GetGroupDetails ¶
func GetGroupDetails(group *groups_v1.Group) (*metrics.GroupMetrics, *metrics.GroupMetrics, *Cost)
GetGroupDetails returns aggregated metrics (cpu, memory, storage) and cost (total, cpu, memory and storage) of a Group
type PersistentVolumeClaim ¶
type PersistentVolumeClaim struct {
// contains filtered or unexported fields
}
PersistentVolumeClaim details
type Price ¶
Price information. NOTE: All fields are Per unit resource per hour
func GetUserCosts ¶
func GetUserCosts() *Price
GetUserCosts gives the cpu, memory and storage cost per unit per hour which are stored in the cluster as config maps.