Documentation ¶
Index ¶
- Constants
- Variables
- func ClusterAutoscalerSubchartNameFromApiProvider(apiProvider string) string
- func ClusterAutoscalerSubchartNameFromClusterSpec(cs *ClusterSpec) (string, error)
- func Create(kubeClient *kubernetes.Clientset, arlonNs string, specName string, ...) error
- func Delete(kubeClient *kubernetes.Clientset, ns string, clusterspecName string) error
- func SubchartName(cm *corev1.ConfigMap) (string, error)
- func SubchartNameFromClusterSpec(cs *ClusterSpec) (string, error)
- func ToConfigMap(name string, apiProvider string, cloudProvider string, clusterType string, ...) *corev1.ConfigMap
- func Update(kubeClient *kubernetes.Clientset, arlonNs string, specName string, ...) (dirty bool, err error)
- func ValidApiProvider(apiProvider string) error
- func ValidCloudProviderAndClusterType(cloudProvider string, clusterType string) error
- func ValidValues(vals map[string]bool) string
- func ValidateRegionByProvider(provider string, region string) error
- type ClusterSpec
Constants ¶
View Source
const ( ApiProviderKey = "apiProvider" CloudProviderKey = "cloudProvider" NodeTypeKey = "nodeType" ClusterTypeKey = "type" KubernetesVersionKey = "kubernetesVersion" NodeCountKey = "nodeCount" MasterNodeCountKey = "masterNodeCount" RegionKey = "region" PodCidrBlockKey = "podCidrBlock" SshKeyNameKey = "sshKeyName" TagsKey = "tags" DescriptionKey = "description" ClusterAutoscalerEnabledKey = "clusterAutoscalerEnabled" ClusterAutoscalerMinNodesKey = "clusterAutoscalerMinNodes" ClusterAutoscalerMaxNodesKey = "clusterAutoscalerMaxNodes" )
Variables ¶
View Source
var ( ValidApiProviders = map[string]bool{ // contains filtered or unexported fields } ValidCloudProviders = map[string]bool{ // contains filtered or unexported fields } ValidClusterTypesByCloud = map[string]map[string]bool{ // contains filtered or unexported fields } KubeconfigSecretKeyNameByApiProvider = map[string]string{ "capi": "value", "xplane": "kubeconfig", } )
View Source
var ( ErrInvalidAPIProvider = fmt.Errorf("invalid api provider, the valid values are: %s", ValidValues(ValidApiProviders)) ErrInvalidCloudProvider = fmt.Errorf("invalid cloud provider, the valid values are: %s", ValidValues(ValidCloudProviders)) )
View Source
var ( ValidHelmParamKeys = []string{ RegionKey, SshKeyNameKey, KubernetesVersionKey, PodCidrBlockKey, NodeCountKey, MasterNodeCountKey, NodeTypeKey, ClusterAutoscalerEnabledKey, ClusterAutoscalerMinNodesKey, ClusterAutoscalerMaxNodesKey, } )
Functions ¶
func ClusterAutoscalerSubchartNameFromApiProvider ¶ added in v0.9.0
func ClusterAutoscalerSubchartNameFromClusterSpec ¶
func ClusterAutoscalerSubchartNameFromClusterSpec(cs *ClusterSpec) (string, error)
func Create ¶
func Create( kubeClient *kubernetes.Clientset, arlonNs string, specName string, apiProvider string, cloudProvider string, clusterType string, kubernetesVersion string, nodeType string, nodeCount int, masterNodeCount int, sshKeyName string, region string, clusterAutoscalerEnabled bool, clusterAutoscalerMinNodes int, clusterAutoscalerMaxNodes int, desc string, tags string, ) error
func Delete ¶
func Delete( kubeClient *kubernetes.Clientset, ns string, clusterspecName string, ) error
func SubchartNameFromClusterSpec ¶
func SubchartNameFromClusterSpec(cs *ClusterSpec) (string, error)
func ToConfigMap ¶
func ToConfigMap( name string, apiProvider string, cloudProvider string, clusterType string, kubernetesVersion string, nodeType string, nodeCount int, masterNodeCount int, region string, podCidrBlock string, sshKeyName string, clusterAutoscalerEnabled bool, clusterAutoscalerMinNodes int, clusterAutoscalerMaxNodes int, tags string, description string, ) *corev1.ConfigMap
func Update ¶
func Update( kubeClient *kubernetes.Clientset, arlonNs string, specName string, kubernetesVersion string, nodeType string, nodeCount int, masterNodeCount int, clusterAutoscalerEnabledPtr *bool, clusterAutoscalerMinNodes int, clusterAutoscalerMaxNodes int, desc string, tags string, ) (dirty bool, err error)
func ValidApiProvider ¶
func ValidValues ¶
func ValidateRegionByProvider ¶ added in v0.3.5
ValidateRegionByProvider checks if a supplied region string is valid or not for the given provider.
Types ¶
type ClusterSpec ¶
type ClusterSpec struct { Name string ApiProvider string CloudProvider string Type string KubernetesVersion string NodeType string NodeCount int MasterNodeCount int Region string PodCidrBlock string SshKeyName string Tags string Description string ClusterAutoscalerEnabled bool ClusterAutoscalerMinNodes int ClusterAutoscalerMaxNodes int }
func FromConfigMap ¶
func FromConfigMap(cm *corev1.ConfigMap) (*ClusterSpec, error)
func Get ¶
func Get( kubeClient *kubernetes.Clientset, arlonNs string, specName string, ) (cs *ClusterSpec, err error)
Click to show internal directories.
Click to hide internal directories.