universal

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InstallKubectl = InstallType("kubectl")
	InstallHelm    = InstallType("helm")
)
View Source
const (
	KSCTL_SYS_NAMESPACE = "ksctl"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application struct {
	Name        string
	Url         string
	Namespace   string
	Version     string
	Metadata    string
	Maintainer  string
	PostInstall string
	HelmConfig  []WorkLoad
	InstallType
}

func GetApps

func GetApps(storage resources.StorageFactory, name string) (Application, error)

func (Application) String

func (a Application) String() string

type HelmClient

type HelmClient struct {
	// contains filtered or unexported fields
}

func (*HelmClient) InitClient

func (client *HelmClient) InitClient(kubeconfig string) error

func (*HelmClient) InstallChart

func (c *HelmClient) InstallChart(chartVer, chartName, namespace, releaseName string, createNamespace bool, arguments map[string]interface{}) error

func (*HelmClient) ListInstalledCharts

func (c *HelmClient) ListInstalledCharts() error

func (*HelmClient) RepoAdd

func (c *HelmClient) RepoAdd(repoName, repoUrl string) error

type InstallType

type InstallType string

type Kubernetes

type Kubernetes struct {
	Metadata      resources.Metadata
	StorageDriver resources.StorageFactory
	// contains filtered or unexported fields
}

TODO: create a interface so that we can have a mock test for this as well

func (*Kubernetes) ClientInit

func (this *Kubernetes) ClientInit(kubeconfig string) (err error)

func (*Kubernetes) DeleteResourcesFromController

func (this *Kubernetes) DeleteResourcesFromController() error

func (*Kubernetes) DeleteWorkerNodes

func (this *Kubernetes) DeleteWorkerNodes(nodeName string) error

func (*Kubernetes) InstallApplications

func (this *Kubernetes) InstallApplications(apps []string) error

func (*Kubernetes) InstallCNI

func (this *Kubernetes) InstallCNI(app string) error

func (*Kubernetes) KsctlConfigForController

func (this *Kubernetes) KsctlConfigForController(kubeconfig string, globalState *types.StorageDocument, secretKeys map[string][]byte) error

func (*Kubernetes) PodApply

func (this *Kubernetes) PodApply(o *corev1.Pod, ns string) error

type SimpleRESTClientGetter

type SimpleRESTClientGetter struct {
	Namespace  string
	KubeConfig string
}

func NewRESTClientGetter

func NewRESTClientGetter(namespace, kubeConfig string) *SimpleRESTClientGetter

func (*SimpleRESTClientGetter) ToDiscoveryClient

func (*SimpleRESTClientGetter) ToRESTConfig

func (c *SimpleRESTClientGetter) ToRESTConfig() (*rest.Config, error)

func (*SimpleRESTClientGetter) ToRESTMapper

func (c *SimpleRESTClientGetter) ToRESTMapper() (meta.RESTMapper, error)

func (*SimpleRESTClientGetter) ToRawKubeConfigLoader

func (c *SimpleRESTClientGetter) ToRawKubeConfigLoader() clientcmd.ClientConfig

type WorkLoad

type WorkLoad struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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