in cost-optimization/gke-shift-left-cost/api/manifests.go [78:101]
func (m *Manifests) EstimateCost(pc GCPPriceCatalog) Cost {
m.prepareForCostEstimation()
monthlyRanges := []CostRange{}
if len(m.Deployments) > 0 {
monthlyRanges = append(monthlyRanges, m.estimateDeploymentCost(&pc))
}
if len(m.ReplicaSets) > 0 {
monthlyRanges = append(monthlyRanges, m.estimateReplicaSetCost(&pc))
}
if len(m.StatefulSets) > 0 {
monthlyRanges = append(monthlyRanges, m.estimateStatefulSetCost(&pc))
}
if len(m.DaemonSets) > 0 {
monthlyRanges = append(monthlyRanges, m.estimateDaemonSetCost(&pc))
}
if len(m.VolumeClaims) > 0 {
monthlyRanges = append(monthlyRanges, m.estimateVolumeClaimCost(&pc))
}
return Cost{
MonthlyRanges: monthlyRanges,
}
}