Documentation ¶
Index ¶
- Constants
- func DownloadK8sConfig(kubicornCluster *kcluster.Cluster) (*[]byte, error)
- func GenerateConfig(prometheusCfg []PrometheusCfg) []byte
- func GetConfigPostHook(cluster CommonCluster)
- func GetKubicornProfile(cs *model.ClusterModel) *kcluster.Cluster
- func InstallHelmPostHook(cluster CommonCluster)
- func InstallIngressControllerPostHook(cluster CommonCluster)
- func PersistKubernetesKeys(cluster CommonCluster)
- func ReadCluster(modelCluster *model.ClusterModel) (*kcluster.Cluster, error)
- func RunPostHooks(functionList []func(cluster CommonCluster), createdCluster CommonCluster)
- func UpdatePrometheus()
- func UpdatePrometheusConfig() error
- func UpdatePrometheusPostHook(_ CommonCluster)
- type AKSCluster
- func (c *AKSCluster) AddDefaultsToUpdate(r *components.UpdateClusterRequest)
- func (c *AKSCluster) CheckEqualityToUpdate(r *components.UpdateClusterRequest) error
- func (c *AKSCluster) CreateCluster() error
- func (c *AKSCluster) DeleteCluster() error
- func (c *AKSCluster) DeleteFromDatabase() error
- func (c *AKSCluster) GetAPIEndpoint() (string, error)
- func (c *AKSCluster) GetID() uint
- func (c *AKSCluster) GetK8sConfig() (*[]byte, error)
- func (c *AKSCluster) GetModel() *model.ClusterModel
- func (c *AKSCluster) GetName() string
- func (c *AKSCluster) GetStatus() (*bTypes.GetClusterStatusResponse, error)
- func (c *AKSCluster) GetType() string
- func (c *AKSCluster) Persist() error
- func (c *AKSCluster) UpdateCluster(request *bTypes.UpdateClusterRequest) error
- type AWSCluster
- func (c *AWSCluster) AddDefaultsToUpdate(r *components.UpdateClusterRequest)
- func (c *AWSCluster) CheckEqualityToUpdate(r *components.UpdateClusterRequest) error
- func (c *AWSCluster) CreateCluster() error
- func (c *AWSCluster) DeleteCluster() error
- func (c *AWSCluster) DeleteFromDatabase() error
- func (c *AWSCluster) GetAPIEndpoint() (string, error)
- func (c *AWSCluster) GetID() uint
- func (c *AWSCluster) GetK8sConfig() (*[]byte, error)
- func (c *AWSCluster) GetKubicornCluster() (*kcluster.Cluster, error)
- func (c *AWSCluster) GetModel() *model.ClusterModel
- func (c *AWSCluster) GetName() string
- func (c *AWSCluster) GetStatus() (*components.GetClusterStatusResponse, error)
- func (c *AWSCluster) GetType() string
- func (c *AWSCluster) Persist() error
- func (c *AWSCluster) UpdateCluster(request *components.UpdateClusterRequest) error
- type CommonCluster
- type GKECluster
- func (g *GKECluster) AddDefaultsToUpdate(r *components.UpdateClusterRequest)
- func (g *GKECluster) CheckEqualityToUpdate(r *components.UpdateClusterRequest) error
- func (g *GKECluster) CreateCluster() error
- func (g *GKECluster) DeleteCluster() error
- func (g *GKECluster) DeleteFromDatabase() error
- func (g *GKECluster) GetAPIEndpoint() (string, error)
- func (g *GKECluster) GetID() uint
- func (g *GKECluster) GetK8sConfig() (*[]byte, error)
- func (g *GKECluster) GetModel() *model.ClusterModel
- func (g *GKECluster) GetName() string
- func (g *GKECluster) GetStatus() (*components.GetClusterStatusResponse, error)
- func (g *GKECluster) GetType() string
- func (g *GKECluster) Persist() error
- func (g *GKECluster) UpdateCluster(updateRequest *components.UpdateClusterRequest) error
- type PrometheusCfg
Constants ¶
const ( BootstrapScriptMasterKey = "BOOTSTRAP_SCRIPT_MASTER" BootstrapScriptNodeKey = "BOOTSTRAP_SCRIPT_NODE" BootstrapScriptMasterDefault = "" /* 135-byte string literal not displayed */ BootstrapScriptNodeDefault = "" /* 133-byte string literal not displayed */ )
const's of BootstrapScript values
Variables ¶
This section is empty.
Functions ¶
func DownloadK8sConfig ¶
DownloadK8sConfig downloads the Kubernetes config from the cluster Todo check first if config is locally available
func GenerateConfig ¶
func GenerateConfig(prometheusCfg []PrometheusCfg) []byte
GenerateConfig generates prometheus config
func GetConfigPostHook ¶
func GetConfigPostHook(cluster CommonCluster)
GetConfigPostHook functions with func(*cluster.Cluster) signature
func GetKubicornProfile ¶
func GetKubicornProfile(cs *model.ClusterModel) *kcluster.Cluster
GetKubicornProfile creates *cluster.Cluster from ClusterModel struct
func InstallHelmPostHook ¶
func InstallHelmPostHook(cluster CommonCluster)
InstallHelmPostHook this posthook installs the helm related things
func InstallIngressControllerPostHook ¶
func InstallIngressControllerPostHook(cluster CommonCluster)
InstallIngressControllerPostHook post hooks can't return value, they can log error and/or update state?
func PersistKubernetesKeys ¶
func PersistKubernetesKeys(cluster CommonCluster)
PersistKubernetesKeys is a basic version of persisting keys TODO check if we need this from API or anywhere else
func ReadCluster ¶
func ReadCluster(modelCluster *model.ClusterModel) (*kcluster.Cluster, error)
ReadCluster reads a persisted cluster from the statestore
func RunPostHooks ¶
func RunPostHooks(functionList []func(cluster CommonCluster), createdCluster CommonCluster)
RunPostHooks calls posthook functions with created cluster
func UpdatePrometheus ¶
func UpdatePrometheus()
UpdatePrometheus updates a configmap used by Prometheus
func UpdatePrometheusConfig ¶
func UpdatePrometheusConfig() error
UpdatePrometheusConfig updates the Prometheus configuration
func UpdatePrometheusPostHook ¶
func UpdatePrometheusPostHook(_ CommonCluster)
UpdatePrometheusPostHook updates a configmap used by Prometheus
Types ¶
type AKSCluster ¶
type AKSCluster struct { APIEndpoint string // contains filtered or unexported fields }
AKSCluster struct for AKS cluster
func CreateAKSClusterFromModel ¶
func CreateAKSClusterFromModel(clusterModel *model.ClusterModel) (*AKSCluster, error)
CreateAKSClusterFromModel creates ClusterModel struct from model
func CreateAKSClusterFromRequest ¶
func CreateAKSClusterFromRequest(request *components.CreateClusterRequest) (*AKSCluster, error)
CreateAKSClusterFromRequest creates ClusterModel struct from the request
func (*AKSCluster) AddDefaultsToUpdate ¶
func (c *AKSCluster) AddDefaultsToUpdate(r *components.UpdateClusterRequest)
AddDefaultsToUpdate adds defaults to update request
func (*AKSCluster) CheckEqualityToUpdate ¶
func (c *AKSCluster) CheckEqualityToUpdate(r *components.UpdateClusterRequest) error
CheckEqualityToUpdate validates the update request
func (*AKSCluster) CreateCluster ¶
func (c *AKSCluster) CreateCluster() error
CreateCluster creates a new cluster
func (*AKSCluster) DeleteCluster ¶
func (c *AKSCluster) DeleteCluster() error
DeleteCluster deletes cluster from aks
func (*AKSCluster) DeleteFromDatabase ¶
func (c *AKSCluster) DeleteFromDatabase() error
DeleteFromDatabase deletes model from the database
func (*AKSCluster) GetAPIEndpoint ¶
func (c *AKSCluster) GetAPIEndpoint() (string, error)
GetAPIEndpoint returns the Kubernetes Api endpoint
func (*AKSCluster) GetK8sConfig ¶
func (c *AKSCluster) GetK8sConfig() (*[]byte, error)
GetK8sConfig returns the Kubernetes config
func (*AKSCluster) GetModel ¶
func (c *AKSCluster) GetModel() *model.ClusterModel
GetModel returns the whole clusterModel
func (*AKSCluster) GetName ¶
func (c *AKSCluster) GetName() string
GetName returns the name of the cluster
func (*AKSCluster) GetStatus ¶
func (c *AKSCluster) GetStatus() (*bTypes.GetClusterStatusResponse, error)
GetStatus gets cluster status
func (*AKSCluster) GetType ¶
func (c *AKSCluster) GetType() string
GetType returns the cloud type of the cluster
func (*AKSCluster) UpdateCluster ¶
func (c *AKSCluster) UpdateCluster(request *bTypes.UpdateClusterRequest) error
UpdateCluster updates AKS cluster in cloud
type AWSCluster ¶
type AWSCluster struct { APIEndpoint string // contains filtered or unexported fields }
AWSCluster struct for AWS cluster
func CreateAWSClusterFromModel ¶
func CreateAWSClusterFromModel(clusterModel *model.ClusterModel) (*AWSCluster, error)
CreateAWSClusterFromModel creates ClusterModel struct from the kubicorn model
func CreateAWSClusterFromRequest ¶
func CreateAWSClusterFromRequest(request *components.CreateClusterRequest) (*AWSCluster, error)
CreateAWSClusterFromRequest creates ClusterModel struct from the request
func (*AWSCluster) AddDefaultsToUpdate ¶
func (c *AWSCluster) AddDefaultsToUpdate(r *components.UpdateClusterRequest)
AddDefaultsToUpdate adds defaults to update request
func (*AWSCluster) CheckEqualityToUpdate ¶
func (c *AWSCluster) CheckEqualityToUpdate(r *components.UpdateClusterRequest) error
CheckEqualityToUpdate validates the update request
func (*AWSCluster) CreateCluster ¶
func (c *AWSCluster) CreateCluster() error
CreateCluster creates a new cluster
func (*AWSCluster) DeleteCluster ¶
func (c *AWSCluster) DeleteCluster() error
DeleteCluster deletes cluster from amazon
func (*AWSCluster) DeleteFromDatabase ¶
func (c *AWSCluster) DeleteFromDatabase() error
DeleteFromDatabase deletes model from the database
func (*AWSCluster) GetAPIEndpoint ¶
func (c *AWSCluster) GetAPIEndpoint() (string, error)
GetAPIEndpoint returns the Kubernetes Api endpoint
func (*AWSCluster) GetK8sConfig ¶
func (c *AWSCluster) GetK8sConfig() (*[]byte, error)
GetK8sConfig returns the Kubernetes config
func (*AWSCluster) GetKubicornCluster ¶
func (c *AWSCluster) GetKubicornCluster() (*kcluster.Cluster, error)
GetKubicornCluster returns a Kubicorn cluster
func (*AWSCluster) GetModel ¶
func (c *AWSCluster) GetModel() *model.ClusterModel
GetModel returns the whole clusterModel
func (*AWSCluster) GetName ¶
func (c *AWSCluster) GetName() string
GetName returns the name of the cluster
func (*AWSCluster) GetStatus ¶
func (c *AWSCluster) GetStatus() (*components.GetClusterStatusResponse, error)
GetStatus gets cluster status
func (*AWSCluster) GetType ¶
func (c *AWSCluster) GetType() string
GetType returns the cloud type of the cluster
func (*AWSCluster) UpdateCluster ¶
func (c *AWSCluster) UpdateCluster(request *components.UpdateClusterRequest) error
UpdateCluster updates Amazon cluster in cloud
type CommonCluster ¶
type CommonCluster interface { CreateCluster() error Persist() error GetK8sConfig() (*[]byte, error) GetName() string GetType() string GetStatus() (*bTypes.GetClusterStatusResponse, error) DeleteCluster() error UpdateCluster(*bTypes.UpdateClusterRequest) error GetID() uint GetModel() *model.ClusterModel CheckEqualityToUpdate(*bTypes.UpdateClusterRequest) error AddDefaultsToUpdate(*bTypes.UpdateClusterRequest) GetAPIEndpoint() (string, error) DeleteFromDatabase() error }
CommonCluster interface for clusters
func CreateCommonClusterFromRequest ¶
func CreateCommonClusterFromRequest(createClusterRequest *bTypes.CreateClusterRequest) (CommonCluster, error)
CreateCommonClusterFromRequest creates a CommonCluster from a request
func GetCommonClusterFromModel ¶
func GetCommonClusterFromModel(modelCluster *model.ClusterModel) (CommonCluster, error)
GetCommonClusterFromModel extracts CommonCluster from a ClusterModel
type GKECluster ¶
type GKECluster struct { APIEndpoint string // contains filtered or unexported fields }
GKECluster struct for GKE cluster
func CreateGKEClusterFromModel ¶
func CreateGKEClusterFromModel(clusterModel *model.ClusterModel) (*GKECluster, error)
CreateGKEClusterFromModel creates ClusterModel struct from model
func CreateGKEClusterFromRequest ¶
func CreateGKEClusterFromRequest(request *components.CreateClusterRequest) (*GKECluster, error)
CreateGKEClusterFromRequest creates ClusterModel struct from the request
func (*GKECluster) AddDefaultsToUpdate ¶
func (g *GKECluster) AddDefaultsToUpdate(r *components.UpdateClusterRequest)
AddDefaultsToUpdate adds defaults to update request
func (*GKECluster) CheckEqualityToUpdate ¶
func (g *GKECluster) CheckEqualityToUpdate(r *components.UpdateClusterRequest) error
CheckEqualityToUpdate validates the update request
func (*GKECluster) CreateCluster ¶
func (g *GKECluster) CreateCluster() error
CreateCluster creates a new cluster
func (*GKECluster) DeleteCluster ¶
func (g *GKECluster) DeleteCluster() error
DeleteCluster deletes cluster from google
func (*GKECluster) DeleteFromDatabase ¶
func (g *GKECluster) DeleteFromDatabase() error
DeleteFromDatabase deletes model from the database
func (*GKECluster) GetAPIEndpoint ¶
func (g *GKECluster) GetAPIEndpoint() (string, error)
GetAPIEndpoint returns the Kubernetes Api endpoint
func (*GKECluster) GetK8sConfig ¶
func (g *GKECluster) GetK8sConfig() (*[]byte, error)
GetK8sConfig returns the Kubernetes config
func (*GKECluster) GetModel ¶
func (g *GKECluster) GetModel() *model.ClusterModel
GetModel returns the whole clusterModel
func (*GKECluster) GetName ¶
func (g *GKECluster) GetName() string
GetName returns the name of the cluster
func (*GKECluster) GetStatus ¶
func (g *GKECluster) GetStatus() (*components.GetClusterStatusResponse, error)
GetStatus gets cluster status
func (*GKECluster) GetType ¶
func (g *GKECluster) GetType() string
GetType returns the cloud type of the cluster
func (*GKECluster) UpdateCluster ¶
func (g *GKECluster) UpdateCluster(updateRequest *components.UpdateClusterRequest) error
UpdateCluster updates GKE cluster in cloud
type PrometheusCfg ¶
PrometheusCfg describes Prometheus config