Documentation
¶
Index ¶
- Constants
- func InitializeRedisClient(address string, password string, db int) *redis.Client
- func InitializeRedisClientFromConfig(ctx context.Context, config *Config, sugar *zap.SugaredLogger) *redis.Client
- func ParseCsvIpAddressString(csv string) []net.IP
- type ComputeConfiguration
- type ComputeCost
- type ComputeType
- type Config
- type MetricsContainer
- type MetricsNode
- type MetricsNodeList
- type MetricsPod
- type MetricsPodList
- type WeightedInteruptionRate
- type WeightedLatencyRate
- type WeightedNode
- type WeightedPod
- type WorkloadPriorityEnum
Constants ¶
View Source
const ( AnnotationDiskType = "ultron.io/disk-type" AnnotationInstanceType = "ultron.io/instance-type" AnnotationManaged = "ultron.io/managed" AnnotationNetworkType = "ultron.io/network-type" AnnotationStorageSizeGb = "ultron.io/storage-size-gb" AnnotationWorkloadPriority = "ultron.io/workload-priority" BlockTypeCertificate = "CERTIFICATE" BlockTypeRsaPrivateKey = "RSA PRIVATE KEY" CacheKeyWeightedNodes = "ULTRON_WEIGHTED_NODES" CacheKeyDurableComputeConfigurations = "ULTRON_DURABLE_CONFIGURATION" CacheKeyDurableComputeConfigurationLatencyRates = "ULTRON_DURABLE_COMPUTECONFIGURATION_LATENCY_RATES" CacheKeyEphemeralComputeConfigurations = "ULTRON_EPHEMERAL_COMPUTECONFIGURATION" CacheKeyEphemeralComputeConfigurationInteruptionRates = "ULTRON_EPHEMERAL_COMPUTECONFIGURATION_INTERUPTION_RATES" ComputeTypeDurable ComputeType = "durable" ComputeTypeEphemeral ComputeType = "ephemeral" DefaultDiskType = "SSD" DefaultNetworkType = "isolated" DefaultStorageSizeGB = 10.0 DefaultDurableInstanceType = "ultron.durable" DefaultEphemeralInstanceType = "ultron.ephemeral" DefaultWorkloadPriority = WorkloadPriorityLow EnvServerAddress = "ULTRON_SERVER_ADDRESS" EnvServerCertificateOrganization = "ULTRON_SERVER_CERTIFICATE_ORGANIZATION" EnvServerCertificateCommonName = "ULTRON_SERVER_CERTIFICATE_COMMON_NAME" EnvServerCertificateDnsNames = "ULTRON_SERVER_CERTIFICATE_DNS_NAMES" EnvServerCertificateIpAddresses = "ULTRON_SERVER_CERTIFICATE_IP_ADDRESSES" EnvServerCertificateExportPath = "ULTRON_SERVER_CERTIFICATE_EXPORT_PATH" EnvRedisServerAddress = "ULTRON_SERVER_REDIS_ADDRESS" EnvRedisServerPassword = "ULTRON_SERVER_REDIS_PASSWORD" EnvRedisServerDatabase = "ULTRON_SERVER_REDIS_DATABASE" EnvKubernetesConfig = "KUBECONFIG" EnvKubernetesServiceHost = "KUBERNETES_SERVICE_HOST" EnvKubernetesServicePort = "KUBERNETES_SERVICE_PORT" LabelHostName = "kubernetes.io/hostname" LabelInstanceType = "node.kubernetes.io/instance-type" MetadataName = "metadata.name" TopicNodeObserve = "ULTRON_TOPIC_NODE_OBSERVE" TopicPodObserve = "ULTRON_TOPIC_POD_OBSERVE" WeightKeyCpuAvailable = "cpu_available" WeightKeyCpuLimit = "cpu_limit" WeightKeyCpuRequested = "cpu_requested" WeightKeyCpuTotal = "cpu_total" WeightKeyCpuUsage = "cpu_usage" WeightKeyInterruptionRate = "interruption_rate" WeightKeyLatencyRate = "latency_rate" WeightKeyMemoryAvailable = "memory_available" WeightKeyMemoryLimit = "memory_limit" WeightKeyMemoryRequested = "memory_requested" WeightKeyMemoryTotal = "memory_total" WeightKeyMemoryUsage = "memory_usage" WeightKeyStorageAvailable = "storage_available" WeightKeyStorageRequested = "storage_requested" WeightKeyStorageTotal = "storage_total" WeightKeyStorageUsage = "storage_usage" WeightKeyPrice = "price" WeightKeyPriceMedian = "price_median" WorkloadPriorityLow WorkloadPriorityEnum = false WorkloadPriorityHigh WorkloadPriorityEnum = true )
Variables ¶
This section is empty.
Functions ¶
func InitializeRedisClient ¶ added in v0.1.3
func InitializeRedisClientFromConfig ¶ added in v0.1.4
func InitializeRedisClientFromConfig(ctx context.Context, config *Config, sugar *zap.SugaredLogger) *redis.Client
func ParseCsvIpAddressString ¶ added in v0.3.2
Types ¶
type ComputeConfiguration ¶
type ComputeConfiguration struct { Identifier *string `json:"identifier,omitempty"` Provider *string `json:"provider,omitempty"` Location *string `json:"location,omitempty"` DataCenter *string `json:"dataCenter,omitempty"` OsType *string `json:"osType,omitempty"` OsVersion *string `json:"osVersion,omitempty"` CloudNetworkTypes []string `json:"cloudNetworkTypes,omitempty"` VCpuType *string `json:"vCpuType,omitempty"` VCpu *int64 `json:"vCpu,omitempty"` RamGb *int64 `json:"ramGb,omitempty"` VolumeGb *int64 `json:"volumeGb,omitempty"` VolumeType *string `json:"volumeType,omitempty"` Cost *ComputeCost `json:"cost,omitempty"` ComputeType ComputeType `json:"computeType,omitempty"` }
type ComputeCost ¶ added in v0.0.6
type ComputeType ¶
type ComputeType string
type Config ¶ added in v0.1.3
type Config struct { RedisServerAddress string RedisServerPassword string RedisServerDatabase int ServerAddress string CertificateOrganization string CertificateCommonName string CertificateDnsNamesCSV string CertificateIpAddressesCSV string CertificateExportPath string }
func LoadConfig ¶ added in v0.1.3
type MetricsContainer ¶ added in v0.2.0
type MetricsContainer struct { Name string Usage corev1.ResourceList }
type MetricsNode ¶ added in v0.2.0
type MetricsNode struct { Name string Usage corev1.ResourceList }
type MetricsNodeList ¶ added in v0.2.0
type MetricsNodeList struct {
Items []MetricsNode
}
type MetricsPod ¶ added in v0.2.0
type MetricsPod struct { Name string Namespace string Containers []MetricsContainer }
type MetricsPodList ¶ added in v0.2.0
type MetricsPodList struct {
Items []MetricsPod
}
type WeightedInteruptionRate ¶
type WeightedLatencyRate ¶
type WeightedNode ¶
type WeightedNode struct { Annotations map[string]string Selector map[string]string Weights map[string]float64 InterruptionRate WeightedInteruptionRate LatencyRate WeightedLatencyRate }
type WeightedPod ¶
type WorkloadPriorityEnum ¶ added in v0.5.0
type WorkloadPriorityEnum bool
func (WorkloadPriorityEnum) String ¶ added in v0.5.0
func (p WorkloadPriorityEnum) String() string
Click to show internal directories.
Click to hide internal directories.