stackit

package
v1.121.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 20, 2026 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StackitPIMPricingSource = "STACKIT PIM API Pricing"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CostConfiguration

type CostConfiguration struct {
	CustomerAccountID     string `json:"customerAccountId"`
	ProjectID             string `json:"projectId"`
	ServiceAccountKeyPath string `json:"serviceAccountKeyPath,omitempty"`
}

CostConfiguration holds the configuration needed to connect to STACKIT Cost API

func (*CostConfiguration) Equals

func (c *CostConfiguration) Equals(config cloud.Config) bool

func (*CostConfiguration) Key

func (c *CostConfiguration) Key() string

func (*CostConfiguration) Provider

func (c *CostConfiguration) Provider() string

func (*CostConfiguration) Sanitize

func (c *CostConfiguration) Sanitize() cloud.Config

func (*CostConfiguration) UnmarshalJSON

func (c *CostConfiguration) UnmarshalJSON(b []byte) error

func (*CostConfiguration) Validate

func (c *CostConfiguration) Validate() error

type CostIntegration

type CostIntegration struct {
	CostConfiguration
	ConnectionStatus cloud.ConnectionStatus
}

func (*CostIntegration) GetCloudCost

func (ci *CostIntegration) GetCloudCost(start time.Time, end time.Time) (*opencost.CloudCostSetRange, error)

func (*CostIntegration) GetStatus

func (ci *CostIntegration) GetStatus() cloud.ConnectionStatus

func (*CostIntegration) RefreshStatus

func (ci *CostIntegration) RefreshStatus() cloud.ConnectionStatus

type STACKIT

type STACKIT struct {
	Clientset               clustercache.ClusterCache
	Config                  models.ProviderConfig
	ClusterRegion           string
	ClusterAccountID        string
	DownloadPricingDataLock sync.RWMutex
	// contains filtered or unexported fields
}

func (*STACKIT) AllNodePricing

func (s *STACKIT) AllNodePricing() (interface{}, error)

func (*STACKIT) ApplyReservedInstancePricing

func (*STACKIT) ApplyReservedInstancePricing(map[string]*models.Node)

func (*STACKIT) ClusterInfo

func (s *STACKIT) ClusterInfo() (map[string]string, error)

func (*STACKIT) ClusterManagementPricing

func (*STACKIT) ClusterManagementPricing() (string, float64, error)

func (*STACKIT) CombinedDiscountForNode

func (s *STACKIT) CombinedDiscountForNode(instanceType string, isPreemptible bool, defaultDiscount, negotiatedDiscount float64) float64

func (*STACKIT) DownloadPricingData

func (s *STACKIT) DownloadPricingData() error

func (*STACKIT) GetAddresses

func (*STACKIT) GetAddresses() ([]byte, error)

func (*STACKIT) GetConfig

func (s *STACKIT) GetConfig() (*models.CustomPricing, error)

func (*STACKIT) GetDisks

func (*STACKIT) GetDisks() ([]byte, error)

func (*STACKIT) GetKey

func (s *STACKIT) GetKey(l map[string]string, n *clustercache.Node) models.Key

func (*STACKIT) GetManagementPlatform

func (s *STACKIT) GetManagementPlatform() (string, error)

func (*STACKIT) GetOrphanedResources

func (*STACKIT) GetOrphanedResources() ([]models.OrphanedResource, error)

func (*STACKIT) GetPVKey

func (s *STACKIT) GetPVKey(pv *clustercache.PersistentVolume, parameters map[string]string, defaultRegion string) models.PVKey

func (*STACKIT) GpuPricing

func (s *STACKIT) GpuPricing(nodeLabels map[string]string) (string, error)

func (*STACKIT) LoadBalancerPricing

func (s *STACKIT) LoadBalancerPricing() (*models.LoadBalancer, error)

func (*STACKIT) NetworkPricing

func (s *STACKIT) NetworkPricing() (*models.Network, error)

func (*STACKIT) NodePricing

func (s *STACKIT) NodePricing(key models.Key) (*models.Node, models.PricingMetadata, error)

func (*STACKIT) PVPricing

func (s *STACKIT) PVPricing(pvk models.PVKey) (*models.PV, error)

func (*STACKIT) PricingSourceStatus

func (s *STACKIT) PricingSourceStatus() map[string]*models.PricingSource

func (*STACKIT) PricingSourceSummary

func (s *STACKIT) PricingSourceSummary() interface{}

func (*STACKIT) Regions

func (s *STACKIT) Regions() []string

func (*STACKIT) ServiceAccountStatus

func (s *STACKIT) ServiceAccountStatus() *models.ServiceAccountStatus

func (*STACKIT) UpdateConfig

func (s *STACKIT) UpdateConfig(r io.Reader, updateType string) (*models.CustomPricing, error)

func (*STACKIT) UpdateConfigFromConfigMap

func (s *STACKIT) UpdateConfigFromConfigMap(a map[string]string) (*models.CustomPricing, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL