kube

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2021 License: MPL-2.0 Imports: 7 Imported by: 14

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterStatus

type ClusterStatus int
const (
	Unknown ClusterStatus = iota
	Unmodified
	FluxInstalled
	WeGOInstalled
)

func (ClusterStatus) String

func (cs ClusterStatus) String() string

Function to translate ClusterStatus to a string

type Kube

type Kube interface {
	Apply(manifests []byte, namespace string) ([]byte, error)
	Delete(manifests []byte, namespace string) ([]byte, error)
	GetClusterName() (string, error)
	GetClusterStatus() ClusterStatus
	FluxPresent() (bool, error)
	SecretPresent(secretName string, namespace string) (bool, error)
	GetApplication(name string) (*wego.Application, error)
}

type KubeClient

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

func New

func New(cliRunner runner.Runner) *KubeClient

func (*KubeClient) Apply

func (k *KubeClient) Apply(manifests []byte, namespace string) ([]byte, error)

func (*KubeClient) Delete

func (k *KubeClient) Delete(manifests []byte, namespace string) ([]byte, error)

func (*KubeClient) FluxPresent

func (k *KubeClient) FluxPresent() (bool, error)

FluxPresent checks flux presence in the cluster

func (*KubeClient) GetApplication

func (k *KubeClient) GetApplication(name string) (*wego.Application, error)

func (*KubeClient) GetClusterName

func (k *KubeClient) GetClusterName() (string, error)

func (*KubeClient) GetClusterStatus

func (k *KubeClient) GetClusterStatus() ClusterStatus

func (*KubeClient) SecretPresent

func (k *KubeClient) SecretPresent(secretName, namespace string) (bool, error)

SecretPresent checks for a specific secret within a specified namespace

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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