Remove metering ConfigMap dependency.
Signed-off-by: Rao Yunkun <yunkunrao@yunify.com>
This commit is contained in:
@@ -1,7 +1,35 @@
|
||||
package metering
|
||||
|
||||
type PriceInfo struct {
|
||||
CpuPerCorePerHour float64 `json:"cpuPerCorePerHour" yaml:"cpuPerCorePerHour"`
|
||||
MemPerGigabytesPerHour float64 `json:"memPerGigabytesPerHour" yaml:"memPerGigabytesPerHour"`
|
||||
IngressNetworkTrafficPerMegabytesPerHour float64 `json:"ingressNetworkTrafficPerMegabytesPerHour" yaml:"ingressNetworkTrafficPerGiagabytesPerHour"`
|
||||
EgressNetworkTrafficPerMegabytesPerHour float64 `json:"egressNetworkTrafficPerMegabytesPerHour" yaml:"egressNetworkTrafficPerGigabytesPerHour"`
|
||||
PvcPerGigabytesPerHour float64 `json:"pvcPerGigabytesPerHour" yaml:"pvcPerGigabytesPerHour"`
|
||||
CurrencyUnit string `json:"currencyUnit" yaml:"currencyUnit"`
|
||||
}
|
||||
|
||||
type Billing struct {
|
||||
PriceInfo PriceInfo `json:"priceInfo" yaml:"priceInfo"`
|
||||
}
|
||||
|
||||
type Options struct {
|
||||
Enable bool `json:"enable" yaml:"enable"`
|
||||
RetentionDay string `json:"retentionDay" yaml:"retentionDay"`
|
||||
Billing Billing `json:"billing" yaml:"billing"`
|
||||
}
|
||||
|
||||
var DefaultMeteringOption = Options{
|
||||
RetentionDay: "7d",
|
||||
Billing: Billing{
|
||||
PriceInfo: PriceInfo{
|
||||
CpuPerCorePerHour: 0,
|
||||
MemPerGigabytesPerHour: 0,
|
||||
IngressNetworkTrafficPerMegabytesPerHour: 0,
|
||||
EgressNetworkTrafficPerMegabytesPerHour: 0,
|
||||
PvcPerGigabytesPerHour: 0,
|
||||
CurrencyUnit: "",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
func NewMeteringOptions() *Options {
|
||||
|
||||
Reference in New Issue
Block a user