internal

package
v0.6.0-alpha Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KUBESLICE_CONTROLLER_NAMESPACE = "kubeslice-controller"
	ProjectObject                  = "projects.controller.kubeslice.io"
	ClusterObject                  = "clusters.controller.kubeslice.io"
	SliceConfigObject              = "sliceconfigs.controller.kubeslice.io"
	ServiceExportConfigObject      = "serviceexportconfigs.controller.kubeslice.io"

	LicenseFileName = "kubeslice-license-file"

	Kind_Component                = "kind"
	Calico_Component              = "calico"
	Controller_Component          = "controller"
	Worker_registration_Component = "worker-registration"
	UI_install_Component          = "ui"
	Worker_Component              = "worker"
	Demo_Component                = "demo"
	CertManager_Component         = "cert-manager"
	Prometheus_Component          = "prometheus"
	SecretObject                  = "secrets"
	OutputFormatYaml              = "yaml"
	OutputFormatJson              = "json"
)
View Source
const (
	PrometheusValuesFileName = "helm-values-Prometheus.yaml"
	PrometheusNamespace      = "monitoring"
)
View Source
const KubeconfigPath = kubesliceDirectory + "/kubeconfig.yaml"
View Source
const (
	ProfileEntDemo = "enterprise-demo"
)
View Source
const UIValuesTemplate = `
kubeslice:
  uiproxy:
    service: 
      type: %s
`

Variables

This section is empty.

Functions

func AddHelmCharts

func AddHelmCharts(ApplicationConfiguration *ConfigurationSpecs)

func ApplyFile

func ApplyFile(fileName, namespace string, cluster *Cluster)

func ApplyIPerfServiceExportManifest

func ApplyIPerfServiceExportManifest(ApplicationConfiguration *ConfigurationSpecs)

func ApplyKubectlManifest

func ApplyKubectlManifest(fileName, namespace string, cluster *Cluster)

func ApplySliceConfiguration

func ApplySliceConfiguration(ApplicationConfiguration *ConfigurationSpecs)

func CreateKindClusters

func CreateKindClusters(ApplicationConfiguration *ConfigurationSpecs)

func CreateKubeConfig

func CreateKubeConfig()

func CreateKubeSliceProject

func CreateKubeSliceProject(ApplicationConfiguration *ConfigurationSpecs, cliOptions *CliOptionsStruct)

func CreateServiceExportConfig

func CreateServiceExportConfig(namespace string, controllerCluster *Cluster, filename string)

func CreateSliceConfig

func CreateSliceConfig(namespace string, controllerCluster *Cluster, filename string)

func DeleteKindClusters

func DeleteKindClusters(ApplicationConfiguration *ConfigurationSpecs)

func DeleteKubeSliceCluster

func DeleteKubeSliceCluster(clusterName string, namespace string, controllerCluster *Cluster)

func DeleteKubeSliceDirectory

func DeleteKubeSliceDirectory()

func DeleteKubeSliceProject

func DeleteKubeSliceProject(projectName string, namespace string, controllerCluster *Cluster)

func DeleteKubectlResources

func DeleteKubectlResources(resourceType string, resourceName string, namespace string, cluster *Cluster)

func DeleteServiceExportConfig

func DeleteServiceExportConfig(serviceExportConfigName string, namespace string, controllerCluster *Cluster)

func DeleteSliceConfig

func DeleteSliceConfig(sliceConfigName string, namespace string, controllerCluster *Cluster)

func DescribeKubeSliceCluster

func DescribeKubeSliceCluster(clusterName string, namespace string, controllerCluster *Cluster)

func DescribeKubeSliceProject

func DescribeKubeSliceProject(projectName string, namespace string, controllerCluster *Cluster)

func DescribeKubectlResources

func DescribeKubectlResources(resourceType string, resourceName string, namespace string, cluster *Cluster)

func DescribeServiceExportConfig

func DescribeServiceExportConfig(serviceExportConfigName string, namespace string, controllerCluster *Cluster)

func DescribeSliceConfig

func DescribeSliceConfig(sliceConfigName string, namespace string, controllerCluster *Cluster)

func EditKubeSliceCluster

func EditKubeSliceCluster(clusterName string, namespace string, controllerCluster *Cluster)

func EditKubeSliceProject

func EditKubeSliceProject(projectName string, namespace string, controllerCluster *Cluster)

func EditKubectlResources

func EditKubectlResources(resourceType string, resourceName string, namespace string, cluster *Cluster)

func EditServiceExportConfig

func EditServiceExportConfig(serviceExportConfigName string, namespace string, controllerCluster *Cluster)

func EditSliceConfig

func EditSliceConfig(sliceConfigName string, namespace string, controllerCluster *Cluster)

func GatherNetworkInformation

func GatherNetworkInformation(ApplicationConfiguration *ConfigurationSpecs)

func GenerateIPerfManifests

func GenerateIPerfManifests()

func GenerateIPerfServiceExportManifest

func GenerateIPerfServiceExportManifest(ApplicationConfiguration *ConfigurationSpecs)

func GenerateKindConfiguration

func GenerateKindConfiguration(ApplicationConfiguration *ConfigurationSpecs)

func GenerateKubeSliceDirectory

func GenerateKubeSliceDirectory()

func GenerateSliceConfiguration

func GenerateSliceConfiguration(ApplicationConfiguration *ConfigurationSpecs, worker []string, sliceConfigName string, namespace string)

func GetKubeSliceCluster

func GetKubeSliceCluster(clusterName string, namespace string, controllerCluster *Cluster, outputFormat string)

func GetKubeSliceProject

func GetKubeSliceProject(projectName string, namespace string, controllerCluster *Cluster)

func GetKubectlResources

func GetKubectlResources(resourceType string, resourceName string, namespace string, cluster *Cluster, outputFormat string)

func GetSecretName

func GetSecretName(workerName string, namespace string, controllerCluster *Cluster) string

func GetSecrets

func GetSecrets(workerName string, namespace string, controllerCluster *Cluster, outputFormat string)

func GetServiceExportConfig

func GetServiceExportConfig(serviceExportConfigName string, namespace string, controllerCluster *Cluster)

func GetSliceConfig

func GetSliceConfig(sliceConfigName string, namespace string, controllerCluster *Cluster)

func GetUIAdminToken

func GetUIAdminToken(cc *Cluster, username, projectName string) string

func GetUIEndpoint

func GetUIEndpoint(cc *Cluster, profile string) string

func InstallCalico

func InstallCalico(clusterConfig *ClusterConfiguration)

func InstallCertManager

func InstallCertManager(ApplicationConfiguration *ConfigurationSpecs)

func InstallIPerf

func InstallIPerf(ApplicationConfiguration *ConfigurationSpecs)

func InstallKubeSliceController

func InstallKubeSliceController(ApplicationConfiguration *ConfigurationSpecs)

func InstallKubeSliceUI

func InstallKubeSliceUI(ApplicationConfiguration *ConfigurationSpecs)

func InstallKubeSliceWorker

func InstallKubeSliceWorker(ApplicationConfiguration *ConfigurationSpecs)

func InstallPrometheus

func InstallPrometheus(ApplicationConfiguration *ConfigurationSpecs)

func LicenseVerification

func LicenseVerification(message string, cluster Cluster, namespace string)

func PodVerification

func PodVerification(message string, cluster Cluster, namespace string)

func PrintNextSteps

func PrintNextSteps(verificationOnly bool, ApplicationConfiguration *ConfigurationSpecs)

func RegisterWorkerClusters

func RegisterWorkerClusters(ApplicationConfiguration *ConfigurationSpecs, cliOptions *CliOptionsStruct)

func Retry

func Retry(backoffLimit int, sleep time.Duration, f func() error) (err error)

Retry tries to execute the funtion, If failed reattempts till backoffLimit

func RolloutRestartIPerf

func RolloutRestartIPerf(ApplicationConfiguration *ConfigurationSpecs)

func SetKubeConfigPath

func SetKubeConfigPath()

func SetWorker

func SetWorker(worker []string, filename string)

func UninstallCertManager

func UninstallCertManager(ApplicationConfiguration *ConfigurationSpecs)

func UninstallKubeSliceController

func UninstallKubeSliceController(ApplicationConfiguration *ConfigurationSpecs)

func UninstallKubeSliceUI

func UninstallKubeSliceUI(ApplicationConfiguration *ConfigurationSpecs)

func UninstallKubeSliceWorker

func UninstallKubeSliceWorker(ApplicationConfiguration *ConfigurationSpecs, workersToUninstall map[string]string)

func VerifyExecutables

func VerifyExecutables(ApplicationConfiguration *ConfigurationSpecs)

Types

type CliOptionsStruct

type CliOptionsStruct struct {
	ObjectType   string   // "project", "cluster", "sliceConfig"
	ObjectName   string   // "projectName", "clusterName", "sliceConfigName"
	Namespace    string   // namespace for the workloads
	FileName     string   // path to the resource description file
	Cluster      *Cluster // cluster
	OutputFormat string
}

type Cluster

type Cluster struct {
	Name                string `yaml:"name"`
	ContextName         string `yaml:"context_name"`
	KubeConfigPath      string `yaml:"kube_config_path"`
	ControlPlaneAddress string `yaml:"control_plane_address"`
	NodeIP              string `yaml:"node_ip"`
}

type ClusterConfiguration

type ClusterConfiguration struct {
	Profile           string    `yaml:"profile"`
	KubeConfigPath    string    `yaml:"kube_config_path"`
	ControllerCluster Cluster   `yaml:"controller"`
	WorkerClusters    []Cluster `yaml:"workers"`
	ClusterType       string    `yaml:"cluster_type"`
}

type Configuration

type Configuration struct {
	ClusterConfiguration   ClusterConfiguration   `yaml:"cluster_configuration"`
	KubeSliceConfiguration KubeSliceConfiguration `yaml:"kubeslice_configuration"`
	HelmChartConfiguration HelmChartConfiguration `yaml:"helm_chart_configuration"`
}

type ConfigurationSpecs

type ConfigurationSpecs struct {
	Configuration Configuration `yaml:"configuration"`
}

type HelmChart

type HelmChart struct {
	ChartName string `yaml:"chart_name"`
	Version   string `yaml:"version"`
	// Values to be passed as --set arguments to helm install
	Values map[string]interface{} `yaml:"values"`
}

type HelmChartConfiguration

type HelmChartConfiguration struct {
	RepoAlias        string           `yaml:"repo_alias"`
	RepoUrl          string           `yaml:"repo_url"`
	CertManagerChart HelmChart        `yaml:"cert_manager_chart"`
	ControllerChart  HelmChart        `yaml:"controller_chart"`
	WorkerChart      HelmChart        `yaml:"worker_chart"`
	UIChart          HelmChart        `yaml:"ui_chart"`
	PrometheusChart  HelmChart        `yaml:"prometheus_chart"`
	HelmUsername     string           `yaml:"helm_username"`
	HelmPassword     string           `yaml:"helm_password"`
	ImagePullSecret  ImagePullSecrets `yaml:"image_pull_secret"`
	UseLocal         bool             `yaml:"use_local"`
}

type ImagePullSecrets

type ImagePullSecrets struct {
	Registry string `yaml:"registry"`
	Username string `yaml:"username"`
	Password string `yaml:"password"`
	Email    string `yaml:"email"`
}

type KubeSliceConfiguration

type KubeSliceConfiguration struct {
	ProjectName  string   `yaml:"project_name"`
	ProjectUsers []string `yaml:"project_users"`
}

type PodVerificationStatus

type PodVerificationStatus int
const (
	PodVerificationStatusSuccess PodVerificationStatus = iota
	PodVerificationStatusInProgress
	PodVerificationStatusFailed
)

Jump to

Keyboard shortcuts

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