cluster

package
v0.0.0-...-ada06ba Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2023 License: Apache-2.0 Imports: 59 Imported by: 0

Documentation

Index

Constants

View Source
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 CleanStateStore

func CleanStateStore(clusterName string) error

CleanStateStore deletes state store folder by cluster name

func DownloadK8sConfig

func DownloadK8sConfig(kubicornCluster *kcluster.Cluster) ([]byte, error)

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 GetAllMachineTypes

func GetAllMachineTypes(orgId uint, secretId string) (map[string]components.MachineType, error)

GetAllMachineTypes returns all supported machine types

func GetAllMachineTypesByZone

func GetAllMachineTypesByZone(orgId uint, secretId, zone string) (map[string]components.MachineType, error)

GetAllMachineTypesByZone returns all supported machine type by zone

func GetConfigPostHook

func GetConfigPostHook(cluster CommonCluster)

GetConfigPostHook functions with func(*cluster.Cluster) signature

func GetGkeServerConfig

func GetGkeServerConfig(orgId uint, secretId, zone string) (*gke.ServerConfig, error)

GetGkeServerConfig returns all supported K8S versions

func GetKubernetesVersion

func GetKubernetesVersion(orgId uint, secretId, location string) ([]string, error)

GetKubernetesVersion returns a list of supported kubernetes version in the specified subscription

func GetKubicornProfile

func GetKubicornProfile(cs *model.ClusterModel) *kcluster.Cluster

GetKubicornProfile creates *cluster.Cluster from ClusterModel struct

func GetLocations

func GetLocations(orgId uint, secretId string) ([]string, error)

GetLocations returns all the locations that are available for resource providers

func GetMachineTypes

func GetMachineTypes(orgId uint, secretId, location string) (response map[string]components.MachineType, err error)

GetMachineTypes lists all available virtual machine sizes for a subscription in a location.

func GetZones

func GetZones(orgId uint, secretId string) ([]string, error)

GetZones lists all supported zones

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 ListAMIs

func ListAMIs(orgId uint, secretId, region string, tags []*string) ([]*ec2.Image, error)

ListAMIs returns supported AMIs by region and tags

func ListRegions

func ListRegions(orgId uint, secretId, region string) ([]*ec2.Region, error)

ListRegions lists supported regions

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 SetCredentials

func SetCredentials(awscred *credentials.Credentials) func(*session.Options) error

SetCredentials sets AWS credentials in session options

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, orgId uint) (*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) GetAKSClient

func (c *AKSCluster) GetAKSClient() (*azureClient.AKSClient, error)

GetAKSClient creates an AKS client with the credentials

func (*AKSCluster) GetAPIEndpoint

func (c *AKSCluster) GetAPIEndpoint() (string, error)

GetAPIEndpoint returns the Kubernetes Api endpoint

func (*AKSCluster) GetAzureCluster

func (c *AKSCluster) GetAzureCluster() (*banzaiAzureTypes.Value, error)

GetAzureCluster returns cluster from cloud

func (*AKSCluster) GetClusterDetails

func (c *AKSCluster) GetClusterDetails() (*components.ClusterDetailsResponse, error)

GetClusterDetails gets cluster details from cloud

func (*AKSCluster) GetID

func (c *AKSCluster) GetID() uint

GetID returns the specified cluster id

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) GetOrg

func (c *AKSCluster) GetOrg() uint

GetOrg gets org where the cluster belongs

func (*AKSCluster) GetSecretID

func (c *AKSCluster) GetSecretID() string

GetSecretID retrieves the secret id

func (*AKSCluster) GetSecretWithValidation

func (c *AKSCluster) GetSecretWithValidation() (*secret.SecretsItemResponse, error)

GetSecretWithValidation returns secret from vault

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) Persist

func (c *AKSCluster) Persist(status, statusMessage string) error

Persist save the cluster model

func (*AKSCluster) UpdateCluster

func (c *AKSCluster) UpdateCluster(request *bTypes.UpdateClusterRequest) error

UpdateCluster updates AKS cluster in cloud

func (*AKSCluster) UpdateStatus

func (c *AKSCluster) UpdateStatus(status, statusMessage string) error

UpdateStatus updates cluster status in database

func (*AKSCluster) ValidateCreationFields

func (c *AKSCluster) ValidateCreationFields(r *bTypes.CreateClusterRequest) error

ValidateCreationFields validates all field

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, orgId uint) (*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) GetClusterDetails

func (c *AWSCluster) GetClusterDetails() (*components.ClusterDetailsResponse, error)

GetClusterDetails gets cluster details from cloud

func (*AWSCluster) GetID

func (c *AWSCluster) GetID() uint

GetID returns the specified cluster id

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) GetOrg

func (c *AWSCluster) GetOrg() uint

GetOrg gets org where the cluster belongs

func (*AWSCluster) GetSecretID

func (c *AWSCluster) GetSecretID() string

GetSecretID retrieves the secret id

func (*AWSCluster) GetSecretWithValidation

func (c *AWSCluster) GetSecretWithValidation() (*secret.SecretsItemResponse, error)

GetSecretWithValidation returns secret from vault

func (*AWSCluster) GetStatus

GetStatus gets cluster status

func (*AWSCluster) GetType

func (c *AWSCluster) GetType() string

GetType returns the cloud type of the cluster

func (*AWSCluster) ListAMIs

func (c *AWSCluster) ListAMIs(region string, tags []*string) ([]*ec2.Image, error)

ListAMIs returns supported AMIs by region and tags

func (*AWSCluster) ListRegions

func (c *AWSCluster) ListRegions(region string) ([]*ec2.Region, error)

ListRegions lists supported regions

func (*AWSCluster) Persist

func (c *AWSCluster) Persist(status, statusMessage string) error

Persist save the cluster model

func (*AWSCluster) UpdateCluster

func (c *AWSCluster) UpdateCluster(request *components.UpdateClusterRequest) error

UpdateCluster updates Amazon cluster in cloud

func (*AWSCluster) UpdateStatus

func (c *AWSCluster) UpdateStatus(status, statusMessage string) error

UpdateStatus updates cluster status in database

func (*AWSCluster) ValidateCreationFields

func (c *AWSCluster) ValidateCreationFields(r *components.CreateClusterRequest) error

ValidateCreationFields validates all field

type CommonCluster

type CommonCluster interface {
	CreateCluster() error
	Persist(string, string) error
	GetK8sConfig() ([]byte, error)
	GetName() string
	GetType() string
	GetStatus() (*bTypes.GetClusterStatusResponse, error)
	DeleteCluster() error
	UpdateCluster(*bTypes.UpdateClusterRequest) error
	GetID() uint
	GetSecretID() string
	GetModel() *model.ClusterModel
	CheckEqualityToUpdate(*bTypes.UpdateClusterRequest) error
	AddDefaultsToUpdate(*bTypes.UpdateClusterRequest)
	GetAPIEndpoint() (string, error)
	DeleteFromDatabase() error
	GetOrg() uint
	UpdateStatus(string, string) error
	GetClusterDetails() (*bTypes.ClusterDetailsResponse, error)
	ValidateCreationFields(r *bTypes.CreateClusterRequest) error
	GetSecretWithValidation() (*secret.SecretsItemResponse, error)
}

CommonCluster interface for clusters

func CreateCommonClusterFromRequest

func CreateCommonClusterFromRequest(createClusterRequest *bTypes.CreateClusterRequest, orgId uint) (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 DummyCluster

type DummyCluster struct {
	APIEndpoint string
	// contains filtered or unexported fields
}

DummyCluster struct for DC

func CreateDummyClusterFromModel

func CreateDummyClusterFromModel(clusterModel *model.ClusterModel) (*DummyCluster, error)

CreateDummyClusterFromModel creates the cluster from the model

func CreateDummyClusterFromRequest

func CreateDummyClusterFromRequest(request *components.CreateClusterRequest, orgId uint) (*DummyCluster, error)

CreateDummyClusterFromRequest creates ClusterModel struct from the request

func (*DummyCluster) AddDefaultsToUpdate

func (d *DummyCluster) AddDefaultsToUpdate(r *components.UpdateClusterRequest)

AddDefaultsToUpdate adds defaults to update request

func (*DummyCluster) CheckEqualityToUpdate

func (d *DummyCluster) CheckEqualityToUpdate(r *components.UpdateClusterRequest) error

CheckEqualityToUpdate validates the update request

func (*DummyCluster) CreateCluster

func (d *DummyCluster) CreateCluster() error

CreateCluster creates a new cluster

func (*DummyCluster) DeleteCluster

func (d *DummyCluster) DeleteCluster() error

DeleteCluster deletes cluster

func (*DummyCluster) DeleteFromDatabase

func (d *DummyCluster) DeleteFromDatabase() error

DeleteFromDatabase deletes model from the database

func (*DummyCluster) GetAPIEndpoint

func (d *DummyCluster) GetAPIEndpoint() (string, error)

GetAPIEndpoint returns the Kubernetes Api endpoint

func (*DummyCluster) GetClusterDetails

func (d *DummyCluster) GetClusterDetails() (*components.ClusterDetailsResponse, error)

GetClusterDetails gets cluster details from cloud

func (*DummyCluster) GetID

func (d *DummyCluster) GetID() uint

GetID returns the specified cluster id

func (*DummyCluster) GetK8sConfig

func (d *DummyCluster) GetK8sConfig() ([]byte, error)

GetK8sConfig returns the Kubernetes config

func (*DummyCluster) GetModel

func (d *DummyCluster) GetModel() *model.ClusterModel

GetModel returns the whole clusterModel

func (*DummyCluster) GetName

func (d *DummyCluster) GetName() string

GetName returns the name of the cluster

func (*DummyCluster) GetOrg

func (d *DummyCluster) GetOrg() uint

GetOrg gets org where the cluster belongs

func (*DummyCluster) GetSecretID

func (d *DummyCluster) GetSecretID() string

GetSecretID retrieves the secretid

func (*DummyCluster) GetSecretWithValidation

func (d *DummyCluster) GetSecretWithValidation() (*secret.SecretsItemResponse, error)

GetSecretWithValidation returns secret from vault

func (*DummyCluster) GetStatus

GetStatus gets cluster status

func (*DummyCluster) GetType

func (d *DummyCluster) GetType() string

GetType returns the cloud type of the cluster

func (*DummyCluster) Persist

func (d *DummyCluster) Persist(status, statusMessage string) error

Persist save the cluster model

func (*DummyCluster) UpdateCluster

func (d *DummyCluster) UpdateCluster(r *components.UpdateClusterRequest) error

UpdateCluster updates the dummy cluster

func (*DummyCluster) UpdateStatus

func (d *DummyCluster) UpdateStatus(status, statusMessage string) error

UpdateStatus updates cluster status in database

func (*DummyCluster) ValidateCreationFields

func (d *DummyCluster) ValidateCreationFields(r *components.CreateClusterRequest) error

ValidateCreationFields validates all field

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, orgId uint) (*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) GetAllMachineTypes

func (g *GKECluster) GetAllMachineTypes() (map[string]components.MachineType, error)

GetAllMachineTypes lists all supported machine types

func (*GKECluster) GetAllMachineTypesByZone

func (g *GKECluster) GetAllMachineTypesByZone(zone string) (map[string]components.MachineType, error)

GetAllMachineTypesByZone lists supported machine types by zone

func (*GKECluster) GetClusterDetails

func (g *GKECluster) GetClusterDetails() (*components.ClusterDetailsResponse, error)

GetClusterDetails gets cluster details from cloud

func (*GKECluster) GetGkeServerConfig

func (g *GKECluster) GetGkeServerConfig(zone string) (*gke.ServerConfig, error)

GetGkeServerConfig returns configuration info about the Kubernetes Engine service.

func (*GKECluster) GetGoogleCluster

func (g *GKECluster) GetGoogleCluster() (*gke.Cluster, error)

GetGoogleCluster returns with a Cluster from GKE

func (*GKECluster) GetID

func (g *GKECluster) GetID() uint

GetID returns the specified cluster id

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) GetOrg

func (g *GKECluster) GetOrg() uint

GetOrg gets org where the cluster belongs

func (*GKECluster) GetSecretID

func (g *GKECluster) GetSecretID() string

GetSecretID retrieves the secret id

func (*GKECluster) GetSecretWithValidation

func (g *GKECluster) GetSecretWithValidation() (*secret.SecretsItemResponse, error)

GetSecretWithValidation returns secret from vault

func (*GKECluster) GetStatus

GetStatus gets cluster status

func (*GKECluster) GetType

func (g *GKECluster) GetType() string

GetType returns the cloud type of the cluster

func (*GKECluster) GetZones

func (g *GKECluster) GetZones() ([]string, error)

GetZones lists supported zones

func (*GKECluster) Persist

func (g *GKECluster) Persist(status, statusMessage string) error

Persist save the cluster model

func (*GKECluster) UpdateCluster

func (g *GKECluster) UpdateCluster(updateRequest *components.UpdateClusterRequest) error

UpdateCluster updates GKE cluster in cloud

func (*GKECluster) UpdateStatus

func (g *GKECluster) UpdateStatus(status, statusMessage string) error

UpdateStatus updates cluster status in database

func (*GKECluster) ValidateCreationFields

func (g *GKECluster) ValidateCreationFields(r *components.CreateClusterRequest) error

ValidateCreationFields validates all field

type KubeCluster

type KubeCluster struct {
	APIEndpoint string
	// contains filtered or unexported fields
}

KubeCluster struct for Build your own cluster

func CreateKubernetesClusterFromModel

func CreateKubernetesClusterFromModel(clusterModel *model.ClusterModel) (*KubeCluster, error)

CreateKubernetesClusterFromModel converts ClusterModel to KubeCluster

func CreateKubernetesClusterFromRequest

func CreateKubernetesClusterFromRequest(request *components.CreateClusterRequest, orgId uint) (*KubeCluster, error)

CreateKubernetesClusterFromRequest creates ClusterModel struct from the request

func (*KubeCluster) AddDefaultsToUpdate

func (b *KubeCluster) AddDefaultsToUpdate(*components.UpdateClusterRequest)

AddDefaultsToUpdate adds defaults to update request, in this case no update function

func (*KubeCluster) CheckEqualityToUpdate

func (b *KubeCluster) CheckEqualityToUpdate(*components.UpdateClusterRequest) error

CheckEqualityToUpdate validates the update request, in this case no update function

func (*KubeCluster) CreateCluster

func (b *KubeCluster) CreateCluster() error

CreateCluster creates a new cluster

func (*KubeCluster) DeleteCluster

func (b *KubeCluster) DeleteCluster() error

DeleteCluster deletes cluster from cloud, in this case no delete function

func (*KubeCluster) DeleteFromDatabase

func (b *KubeCluster) DeleteFromDatabase() error

DeleteFromDatabase deletes model from the database

func (*KubeCluster) GetAPIEndpoint

func (b *KubeCluster) GetAPIEndpoint() (string, error)

GetAPIEndpoint returns the Kubernetes Api endpoint

func (*KubeCluster) GetClusterDetails

func (b *KubeCluster) GetClusterDetails() (*components.ClusterDetailsResponse, error)

GetClusterDetails gets cluster details from cloud

func (*KubeCluster) GetID

func (b *KubeCluster) GetID() uint

GetID returns the specified cluster id

func (*KubeCluster) GetK8sConfig

func (b *KubeCluster) GetK8sConfig() ([]byte, error)

GetK8sConfig returns the Kubernetes config

func (*KubeCluster) GetModel

func (b *KubeCluster) GetModel() *model.ClusterModel

GetModel returns the whole clusterModel

func (*KubeCluster) GetName

func (b *KubeCluster) GetName() string

GetName returns the name of the cluster

func (*KubeCluster) GetOrg

func (b *KubeCluster) GetOrg() uint

GetOrg returns the specified organization id

func (*KubeCluster) GetSecretID

func (b *KubeCluster) GetSecretID() string

GetSecretID returns the specified secret id

func (*KubeCluster) GetSecretWithValidation

func (b *KubeCluster) GetSecretWithValidation() (*secret.SecretsItemResponse, error)

GetSecretWithValidation returns secret from vault

func (*KubeCluster) GetStatus

GetStatus gets cluster status

func (*KubeCluster) GetType

func (b *KubeCluster) GetType() string

GetType returns the cloud type of the cluster

func (*KubeCluster) Persist

func (b *KubeCluster) Persist(status, statusMessage string) error

Persist save the cluster model

func (*KubeCluster) UpdateCluster

func (b *KubeCluster) UpdateCluster(*components.UpdateClusterRequest) error

UpdateCluster updates cluster in cloud, in this case no update function

func (*KubeCluster) UpdateStatus

func (b *KubeCluster) UpdateStatus(status, statusMessage string) error

UpdateStatus updates cluster status in database

func (*KubeCluster) ValidateCreationFields

func (b *KubeCluster) ValidateCreationFields(r *components.CreateClusterRequest) error

ValidateCreationFields validates all field

type PrometheusCfg

type PrometheusCfg struct {
	Endpoint     string
	Name         string
	CaFilePath   string
	CertFilePath string
	KeyFile      string
}

PrometheusCfg describes Prometheus config

type ServiceAccount

type ServiceAccount struct {
	Type                   string `json:"type"`
	ProjectId              string `json:"project_id"`
	PrivateKeyId           string `json:"private_key_id"`
	PrivateKey             string `json:"private_key"`
	ClientEmail            string `json:"client_email"`
	ClientId               string `json:"client_id"`
	AuthUri                string `json:"auth_uri"`
	TokenUri               string `json:"token_uri"`
	AuthProviderX50CertUrl string `json:"auth_provider_x509_cert_url"`
	ClientX509CertUrl      string `json:"client_x509_cert_url"`
}

ServiceAccount describes a GKE service account

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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