Documentation ¶
Index ¶
- type Cluster
- func (cluster *Cluster) ASGBackedPools() []*NodePool
- func (cluster *Cluster) ChannelOverrides() (map[string]string, error)
- func (cluster *Cluster) KarpenterPools() []*NodePool
- func (cluster Cluster) Name() string
- func (cluster *Cluster) Version(channelVersion channel.ConfigVersion) (*ClusterVersion, error)
- type ClusterStatus
- type ClusterVersion
- type NodePool
- type Problem
- type ProviderID
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster struct { Alias string `json:"alias" yaml:"alias"` APIServerURL string `json:"api_server_url" yaml:"api_server_url"` Channel string `json:"channel" yaml:"channel"` ConfigItems map[string]string `json:"config_items" yaml:"config_items"` CriticalityLevel int32 `json:"criticality_level" yaml:"criticality_level"` Environment string `json:"environment" yaml:"environment"` ID string `json:"id" yaml:"id"` InfrastructureAccount string `json:"infrastructure_account" yaml:"infrastructure_account"` LifecycleStatus string `json:"lifecycle_status" yaml:"lifecycle_status"` LocalID string `json:"local_id" yaml:"local_id"` NodePools []*NodePool `json:"node_pools" yaml:"node_pools"` Provider ProviderID `json:"provider" yaml:"provider"` Region string `json:"region" yaml:"region"` Status *ClusterStatus `json:"status" yaml:"status"` Owner string `json:"owner" yaml:"owner"` AccountName string `json:"account_name" yaml:"account_name"` }
Cluster describes a kubernetes cluster and related configuration.
func SampleCluster ¶
func SampleCluster() *Cluster
func (*Cluster) ASGBackedPools ¶
func (*Cluster) ChannelOverrides ¶
func (*Cluster) KarpenterPools ¶
func (*Cluster) Version ¶
func (cluster *Cluster) Version(channelVersion channel.ConfigVersion) (*ClusterVersion, error)
Version returns the version derived from a sha1 hash of the cluster struct and the channel config version.
type ClusterStatus ¶
type ClusterStatus struct { CurrentVersion string `json:"current_version" yaml:"current_version"` LastVersion string `json:"last_version" yaml:"last_version"` NextVersion string `json:"next_version" yaml:"next_version"` Problems []*Problem `json:"problems" yaml:"problems"` }
ClusterStatus describes the status of a cluster.
type ClusterVersion ¶
ClusterVersion is a combination of configuration version from the configuration repository and a hash of cluster's metadata.
func ParseVersion ¶
func ParseVersion(version string) *ClusterVersion
ParseVersion parses a version string into a ConfigVersion. Invalid version strings are parsed into empty ClusterVersion structs.
func (*ClusterVersion) String ¶
func (version *ClusterVersion) String() string
type NodePool ¶
type NodePool struct { DiscountStrategy string `json:"discount_strategy" yaml:"discount_strategy"` InstanceTypes []string `json:"instance_types" yaml:"instance_types"` Name string `json:"name" yaml:"name"` Profile string `json:"profile" yaml:"profile"` MinSize int64 `json:"min_size" yaml:"min_size"` MaxSize int64 `json:"max_size" yaml:"max_size"` ConfigItems map[string]string `json:"config_items" yaml:"config_items"` // Deprecated, only kept here so the existing clusters don't break InstanceType string }
NodePool describes a node pool in a kubernetes cluster.
func (NodePool) IsKarpenter ¶
func (NodePool) KarpenterInstanceTypeStrategy ¶
func (NodePool) KarpenterRequirements ¶
func (np NodePool) KarpenterRequirements() []v1.NodeSelectorRequirementApplyConfiguration
type Problem ¶
type Problem struct { Detail string `json:"detail" yaml:"detail"` Instance string `json:"instance" yaml:"instance"` Status int32 `json:"status" yaml:"status"` Title string `json:"title" yaml:"title"` Type string `json:"type" yaml:"type"` }
Problem describes a problem.
type ProviderID ¶
type ProviderID string
A provider ID is a string that identifies a cluster provider.
const ( // ZalandoAWSProvider is the provider ID for Zalando managed AWS clusters. ZalandoAWSProvider ProviderID = "zalando-aws" // ZalandoEKSProvider is the provider ID for AWS EKS clusters. ZalandoEKSProvider ProviderID = "zalando-eks" )
Click to show internal directories.
Click to hide internal directories.