Documentation ¶
Index ¶
- Constants
- func CreateScheme() *apiruntime.Scheme
- type ClusterStatus
- type Kube
- type KubeClient
- func (k *KubeClient) Apply(manifests []byte, namespace string) ([]byte, error)
- func (k *KubeClient) Delete(manifests []byte, namespace string) ([]byte, error)
- func (k *KubeClient) FluxPresent(ctx context.Context) (bool, error)
- func (k *KubeClient) GetApplication(ctx context.Context, name string) (*wego.Application, error)
- func (k *KubeClient) GetApplications(ctx context.Context, ns string) ([]wego.Application, error)
- func (k *KubeClient) GetClusterName(ctx context.Context) (string, error)
- func (k *KubeClient) GetClusterStatus(ctx context.Context) ClusterStatus
- func (k *KubeClient) LabelExistsInCluster(ctx context.Context, label string) error
- func (k *KubeClient) SecretPresent(ctx context.Context, secretName, namespace string) (bool, error)
- type KubeHTTP
- func (c *KubeHTTP) Apply(manifests []byte, namespace string) ([]byte, error)
- func (c *KubeHTTP) Delete(manifests []byte, namespace string) ([]byte, error)
- func (c *KubeHTTP) FluxPresent(ctx context.Context) (bool, error)
- func (c *KubeHTTP) GetApplication(ctx context.Context, name string) (*wego.Application, error)
- func (c *KubeHTTP) GetApplications(ctx context.Context, namespace string) ([]wego.Application, error)
- func (c *KubeHTTP) GetClusterName(ctx context.Context) (string, error)
- func (c *KubeHTTP) GetClusterStatus(ctx context.Context) ClusterStatus
- func (c *KubeHTTP) LabelExistsInCluster(ctx context.Context, label string) error
- func (c *KubeHTTP) SecretPresent(ctx context.Context, secretName string, namespace string) (bool, error)
Constants ¶
View Source
const FluxNamespace = "flux-system"
View Source
const WeGOCRDName = "apps.wego.weave.works"
View Source
const WeGONamespace = "wego-system"
Variables ¶
This section is empty.
Functions ¶
func CreateScheme ¶ added in v0.2.0
func CreateScheme() *apiruntime.Scheme
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) SecretPresent(ctx context.Context, string, namespace string) (bool, error) GetApplications(ctx context.Context, namespace string) ([]wego.Application, error) FluxPresent(ctx context.Context) (bool, error) GetClusterName(ctx context.Context) (string, error) GetClusterStatus(ctx context.Context) ClusterStatus GetApplication(ctx context.Context, name string) (*wego.Application, error) LabelExistsInCluster(ctx context.Context, label string) error }
func NewKubeHTTPClient ¶ added in v0.2.0
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(ctx context.Context) (bool, error)
FluxPresent checks flux presence in the cluster
func (*KubeClient) GetApplication ¶
func (k *KubeClient) GetApplication(ctx context.Context, name string) (*wego.Application, error)
func (*KubeClient) GetApplications ¶ added in v0.2.0
func (k *KubeClient) GetApplications(ctx context.Context, ns string) ([]wego.Application, error)
func (*KubeClient) GetClusterName ¶
func (k *KubeClient) GetClusterName(ctx context.Context) (string, error)
func (*KubeClient) GetClusterStatus ¶
func (k *KubeClient) GetClusterStatus(ctx context.Context) ClusterStatus
func (*KubeClient) LabelExistsInCluster ¶ added in v0.2.0
func (k *KubeClient) LabelExistsInCluster(ctx context.Context, label string) error
func (*KubeClient) SecretPresent ¶
SecretPresent checks for a specific secret within a specified namespace
type KubeHTTP ¶ added in v0.2.0
This is an alternative implementation of the kube.Kube interface, specifically designed to query the K8s API directly instead of relying on `kubectl` to be present in the PATH.
func (*KubeHTTP) FluxPresent ¶ added in v0.2.0
func (*KubeHTTP) GetApplication ¶ added in v0.2.0
func (*KubeHTTP) GetApplications ¶ added in v0.2.0
func (*KubeHTTP) GetClusterName ¶ added in v0.2.0
func (*KubeHTTP) GetClusterStatus ¶ added in v0.2.0
func (c *KubeHTTP) GetClusterStatus(ctx context.Context) ClusterStatus
func (*KubeHTTP) LabelExistsInCluster ¶ added in v0.2.0
Click to show internal directories.
Click to hide internal directories.