client

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2022 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Kubernetes    kubernetespkg.Interface
	APIExtensions apiextensionspkg.Interface
	Planter       planterpkg.Interface
	REST          restpkg.Interface
	Config        *restpkg.Config

	ClusterRole       string
	Namespace         string
	NamePrefix        string
	PartOf            string
	ManagedBy         string
	OperatorImageName string
	CachePath         string

	Context contextpkg.Context
	Log     logging.Logger
}

func NewClient

func NewClient(kubernetes kubernetespkg.Interface, apiExtensions apiextensionspkg.Interface, planter planterpkg.Interface, rest restpkg.Interface, config *restpkg.Config, context contextpkg.Context, clusterRole string, namespace string, namePrefix string, partOf string, managedBy string, operatorImageName string, cachePath string, logName string) *Client

func (*Client) ConfigClusterFromFile

func (self *Client) ConfigClusterFromFile(namespace string, clusterName string, path string, context string) (*resources.Cluster, error)

func (*Client) CreateClusterFromFile

func (self *Client) CreateClusterFromFile(namespace string, clusterName string, path string, context string) (*resources.Cluster, error)

func (*Client) CreateClusterRoleBinding

func (self *Client) CreateClusterRoleBinding(clusterRoleBinding *rbac.ClusterRoleBinding) (*rbac.ClusterRoleBinding, error)

func (*Client) CreateClusterWithURL

func (self *Client) CreateClusterWithURL(namespace string, clusterName string, url string, context string) (*resources.Cluster, error)

func (*Client) CreateCustomResourceDefinition

func (self *Client) CreateCustomResourceDefinition(customResourceDefinition *apiextensions.CustomResourceDefinition) (*apiextensions.CustomResourceDefinition, error)

func (*Client) CreateDeployment

func (self *Client) CreateDeployment(deployment *apps.Deployment) (*apps.Deployment, error)

func (*Client) CreateNamespace

func (self *Client) CreateNamespace(namespace *core.Namespace) (*core.Namespace, error)

func (*Client) CreatePod

func (self *Client) CreatePod(pod *core.Pod) (*core.Pod, error)

func (*Client) CreateRole

func (self *Client) CreateRole(role *rbac.Role) (*rbac.Role, error)

func (*Client) CreateRoleBinding

func (self *Client) CreateRoleBinding(roleBinding *rbac.RoleBinding) (*rbac.RoleBinding, error)

func (*Client) CreateSeedFromFile

func (self *Client) CreateSeedFromFile(namespace string, seedName string, path string, planted bool) (*resources.Seed, error)

func (*Client) CreateSeedWithURL

func (self *Client) CreateSeedWithURL(namespace string, seedName string, url string, planted bool) (*resources.Seed, error)

func (*Client) CreateService

func (self *Client) CreateService(service *core.Service) (*core.Service, error)

func (*Client) CreateServiceAccount

func (self *Client) CreateServiceAccount(serviceAccount *core.ServiceAccount) (*core.ServiceAccount, error)

func (*Client) DefaultSecurityContext

func (self *Client) DefaultSecurityContext() *core.SecurityContext

func (*Client) DeleteCluster

func (self *Client) DeleteCluster(namespace string, clusterName string) error

func (*Client) DeletePlugin

func (self *Client) DeletePlugin(name string) error

func (*Client) DeleteSeed

func (self *Client) DeleteSeed(namespace string, seedName string) error

func (*Client) Exec

func (self *Client) Exec(namespace string, podName string, containerName string, stdin io.Reader, stdout io.Writer, command ...string) error

func (*Client) GetCluster

func (self *Client) GetCluster(namespace string, clusterName string) (*resources.Cluster, error)

func (*Client) GetClusterKubeConfig

func (self *Client) GetClusterKubeConfig(namespace string, clusterName string) (string, error)

func (*Client) GetContent

func (self *Client) GetContent(url string) (string, error)

func (*Client) GetOperatorServiceAccount

func (self *Client) GetOperatorServiceAccount() (*core.ServiceAccount, error)

func (*Client) GetSeed

func (self *Client) GetSeed(namespace string, seedName string) (*resources.Seed, error)

func (*Client) GetSeedContent

func (self *Client) GetSeedContent(namespace string, seedName string, planted bool) (string, error)

func (*Client) InstallOperator

func (self *Client) InstallOperator(sourceRegistryHost string, wait bool) error

func (*Client) Labels

func (self *Client) Labels(appName string, component string, namespace string) map[string]string

func (*Client) ListClusters

func (self *Client) ListClusters() (*resources.ClusterList, error)

func (*Client) ListPluginPaths

func (self *Client) ListPluginPaths() ([]string, error)

func (*Client) ListPlugins

func (self *Client) ListPlugins() ([]string, error)

func (*Client) ListSeeds

func (self *Client) ListSeeds() (*resources.SeedList, error)

func (*Client) PlantSeed

func (self *Client) PlantSeed(seed *resources.Seed, content string) (*resources.Seed, error)

func (*Client) SetPlugin

func (self *Client) SetPlugin(name string, path string) error

func (*Client) SetSeedPlanted

func (self *Client) SetSeedPlanted(namespace string, seedName string, planted bool) (*resources.Seed, error)

func (*Client) UninstallOperator

func (self *Client) UninstallOperator(wait bool)

func (*Client) UpdateClusterSpec

func (self *Client) UpdateClusterSpec(cluster *resources.Cluster) (*resources.Cluster, error)

func (*Client) UpdateClusterStatus

func (self *Client) UpdateClusterStatus(cluster *resources.Cluster) (*resources.Cluster, error)

func (*Client) UpdateSeedSpec

func (self *Client) UpdateSeedSpec(seed *resources.Seed) (*resources.Seed, error)

func (*Client) UpdateSeedStatus

func (self *Client) UpdateSeedStatus(seed *resources.Seed) (*resources.Seed, error)

func (*Client) VolumeSource

func (self *Client) VolumeSource(size string) core.VolumeSource

func (*Client) WaitForDeletion

func (self *Client) WaitForDeletion(name string, condition func() bool)

func (*Client) WaitForDeployment

func (self *Client) WaitForDeployment(namespace string, appName string) (*apps.Deployment, error)

func (*Client) WaitForPod

func (self *Client) WaitForPod(namespace string, appName string) (*core.Pod, error)

func (*Client) WriteToContainer

func (self *Client) WriteToContainer(namespace string, podName string, containerName string, reader io.Reader, targetPath string, permissions *int64) error

Jump to

Keyboard shortcuts

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