Documentation
¶
Index ¶
- Constants
- type OVH
- func (c *OVH) AllNodePricing() (interface{}, error)
- func (c *OVH) ApplyReservedInstancePricing(nodes map[string]*models.Node)
- func (c *OVH) ClusterInfo() (map[string]string, error)
- func (c *OVH) ClusterManagementPricing() (string, float64, error)
- func (c *OVH) CombinedDiscountForNode(instanceType string, isPreemptible bool, ...) float64
- func (c *OVH) DownloadPricingData() error
- func (c *OVH) GetAddresses() ([]byte, error)
- func (c *OVH) GetConfig() (*models.CustomPricing, error)
- func (c *OVH) GetDisks() ([]byte, error)
- func (c *OVH) GetKey(labels map[string]string, n *clustercache.Node) models.Key
- func (c *OVH) GetManagementPlatform() (string, error)
- func (c *OVH) GetOrphanedResources() ([]models.OrphanedResource, error)
- func (c *OVH) GetPVKey(pv *clustercache.PersistentVolume, parameters map[string]string, ...) models.PVKey
- func (c *OVH) GpuPricing(nodeLabels map[string]string) (string, error)
- func (c *OVH) LoadBalancerPricing() (*models.LoadBalancer, error)
- func (c *OVH) NetworkPricing() (*models.Network, error)
- func (c *OVH) NodePricing(key models.Key) (*models.Node, models.PricingMetadata, error)
- func (c *OVH) PVPricing(pvk models.PVKey) (*models.PV, error)
- func (c *OVH) PricingSourceStatus() map[string]*models.PricingSource
- func (c *OVH) PricingSourceSummary() interface{}
- func (c *OVH) Regions() []string
- func (c *OVH) ServiceAccountStatus() *models.ServiceAccountStatus
- func (c *OVH) UpdateConfig(r io.Reader, updateType string) (*models.CustomPricing, error)
- func (c *OVH) UpdateConfigFromConfigMap(a map[string]string) (*models.CustomPricing, error)
- type OVHFlavorPricing
Constants ¶
const ( OVHCatalogPricing = "OVH Catalog Pricing" BillingLabel = "ovh.opencost.io/billing" NodepoolLabel = "nodepool" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OVH ¶
type OVH struct {
Clientset clustercache.ClusterCache
Config models.ProviderConfig
Pricing map[string]*OVHFlavorPricing
VolumePricing map[string]float64
ClusterRegion string
ClusterAccountID string
DownloadLock sync.RWMutex
// contains filtered or unexported fields
}
OVH implements the models.Provider interface for OVHcloud.
func (*OVH) AllNodePricing ¶
AllNodePricing returns all cached node pricing data.
func (*OVH) ApplyReservedInstancePricing ¶
ApplyReservedInstancePricing is a no-op for OVH.
func (*OVH) ClusterInfo ¶
ClusterInfo returns metadata about the cluster.
func (*OVH) ClusterManagementPricing ¶
ClusterManagementPricing returns the management cost for the cluster.
func (*OVH) CombinedDiscountForNode ¶
func (c *OVH) CombinedDiscountForNode(instanceType string, isPreemptible bool, defaultDiscount, negotiatedDiscount float64) float64
CombinedDiscountForNode calculates the combined discount for a node.
func (*OVH) DownloadPricingData ¶
DownloadPricingData fetches the OVH public cloud catalog and parses pricing.
func (*OVH) GetAddresses ¶
GetAddresses is not implemented for OVH.
func (*OVH) GetConfig ¶
func (c *OVH) GetConfig() (*models.CustomPricing, error)
GetConfig returns the custom pricing configuration with OVH defaults.
func (*OVH) GetManagementPlatform ¶
GetManagementPlatform detects the management platform from node labels.
func (*OVH) GetOrphanedResources ¶
func (c *OVH) GetOrphanedResources() ([]models.OrphanedResource, error)
GetOrphanedResources is not implemented for OVH.
func (*OVH) GetPVKey ¶
func (c *OVH) GetPVKey(pv *clustercache.PersistentVolume, parameters map[string]string, defaultRegion string) models.PVKey
GetPVKey returns a PVKey for matching persistent volume pricing.
func (*OVH) GpuPricing ¶
GpuPricing returns GPU-specific pricing (not used for OVH).
func (*OVH) LoadBalancerPricing ¶
func (c *OVH) LoadBalancerPricing() (*models.LoadBalancer, error)
LoadBalancerPricing returns static load balancer pricing for OVH.
func (*OVH) NetworkPricing ¶
NetworkPricing returns static network pricing for OVH.
func (*OVH) NodePricing ¶
NodePricing returns pricing for a specific node based on its key.
func (*OVH) PricingSourceStatus ¶
func (c *OVH) PricingSourceStatus() map[string]*models.PricingSource
PricingSourceStatus returns the status of the pricing data source.
func (*OVH) PricingSourceSummary ¶
func (c *OVH) PricingSourceSummary() interface{}
PricingSourceSummary returns the parsed pricing data.
func (*OVH) ServiceAccountStatus ¶
func (c *OVH) ServiceAccountStatus() *models.ServiceAccountStatus
ServiceAccountStatus returns the service account status.
func (*OVH) UpdateConfig ¶
UpdateConfig updates custom pricing from a JSON reader.
func (*OVH) UpdateConfigFromConfigMap ¶
UpdateConfigFromConfigMap updates config from a ConfigMap.