Documentation ¶
Index ¶
- func ResolvePath(path string) (string, error)
- type HelmChartOptions
- type HelmClient
- type HelmClientOption
- type KubeClient
- func (c *KubeClient) CheckPodStatus(ctx context.Context, namespace, podName string, ...) (bool, error)
- func (c *KubeClient) CreateNamespace(ctx context.Context, namespace string, labels map[string]string) (*corev1.Namespace, error)
- func (c *KubeClient) CreatePod(ctx context.Context, namespace string, labels map[string]string, name string, ...) (*corev1.Pod, error)
- func (c *KubeClient) DeleteNamespace(ctx context.Context, namespace string) error
- func (c *KubeClient) DeletePod(ctx context.Context, namespace string, name string) error
- func (c *KubeClient) DoHttpRequest(ctx context.Context, namespace string, name string, port uint, path string) ([]byte, error)
- func (c *KubeClient) GetPodsByLabel(ctx context.Context, namespace string, labelMap map[string]string) ([]corev1.Pod, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResolvePath ¶
ResolvePath resolves a path containing $HOME or ~ to an absolute path.
Types ¶
type HelmChartOptions ¶
type HelmClient ¶
type HelmClient struct {
// contains filtered or unexported fields
}
HelmClient is the helm client, that allows to work with helm packages
func NewHelmClient ¶
func NewHelmClient(opts ...HelmClientOption) (*HelmClient, error)
NewHelmClient creates a new helm client
func (*HelmClient) Cleanup ¶
func (c *HelmClient) Cleanup() error
func (*HelmClient) Install ¶
func (c *HelmClient) Install(ctx context.Context, params []string, chartOpts HelmChartOptions) (string, error)
Install deploys the helm chart
func (*HelmClient) Uninstall ¶
func (c *HelmClient) Uninstall(releaseName string) error
type HelmClientOption ¶
type HelmClientOption func(client *HelmClient)
HelmClientOption is a function that can be used to set the fields of the helm Client
func HelmWithChart ¶
func HelmWithChart(chart string) HelmClientOption
HelmWithChart sets a chart value in the HelmClient struct
func HelmWithKubeConfig ¶
func HelmWithKubeConfig(kubeconfig *restclient.Config) HelmClientOption
HelmWithKubeConfig sets a kubeconfig value in the HelmClient struct
func HelmWithNamespace ¶
func HelmWithNamespace(namespace string) HelmClientOption
HelmWithNamespace sets a namespace value in the HelmClient struct
type KubeClient ¶
type KubeClient struct {
// contains filtered or unexported fields
}
KubeClient is a kubernetes client
func NewKubeClient ¶
func NewKubeClient(k8sConfig *rest.Config) (*KubeClient, error)
NewKubeClient creates a new KubeClient instance
func (*KubeClient) CheckPodStatus ¶
func (*KubeClient) CreateNamespace ¶
func (c *KubeClient) CreateNamespace( ctx context.Context, namespace string, labels map[string]string, ) (*corev1.Namespace, error)
CreateNamespace creates a new namespace
func (*KubeClient) CreatePod ¶
func (c *KubeClient) CreatePod(ctx context.Context, namespace string, labels map[string]string, name string, containerName string, image string, ) (*corev1.Pod, error)
CreatePod creates a new pod in the defined namespace
func (*KubeClient) DeleteNamespace ¶
func (c *KubeClient) DeleteNamespace( ctx context.Context, namespace string, ) error
DeleteNamespace deletes the namespace