Documentation
¶
Index ¶
- type Client
- func (c *Client) GetClusterInfo(ctx context.Context) (*ClusterInfo, error)
- func (c *Client) GetCurrentContext() string
- func (c *Client) GetEvents(ctx context.Context, namespace string) ([]corev1.Event, error)
- func (c *Client) ListGitRepositories(ctx context.Context, namespace string) ([]Resource, error)
- func (c *Client) ListHelmReleases(ctx context.Context, namespace string) ([]Resource, error)
- func (c *Client) ListHelmRepositories(ctx context.Context, namespace string) ([]Resource, error)
- func (c *Client) ListKustomizations(ctx context.Context, namespace string) ([]Resource, error)
- func (c *Client) ReconcileResource(ctx context.Context, resourceType ResourceType, name, namespace string) error
- func (c *Client) ResumeResource(ctx context.Context, resourceType ResourceType, name, namespace string) error
- func (c *Client) SuspendResource(ctx context.Context, resourceType ResourceType, name, namespace string) error
- func (c *Client) TestConnection(ctx context.Context) error
- type ClusterInfo
- type Condition
- type Resource
- type ResourceType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
client.Client
kubernetes.Interface
Config *rest.Config
Context string
Cluster string
Namespace string
}
Client wraps Kubernetes client functionality for FluxCD resources
func (*Client) GetClusterInfo ¶
func (c *Client) GetClusterInfo(ctx context.Context) (*ClusterInfo, error)
GetClusterInfo returns basic cluster information
func (*Client) GetCurrentContext ¶
GetCurrentContext returns the current Kubernetes context
func (*Client) ListGitRepositories ¶
ListGitRepositories lists all GitRepository resources
func (*Client) ListHelmReleases ¶
ListHelmReleases lists all HelmRelease resources
func (*Client) ListHelmRepositories ¶
ListHelmRepositories lists all HelmRepository resources
func (*Client) ListKustomizations ¶
ListKustomizations lists all Kustomization resources
func (*Client) ReconcileResource ¶
func (c *Client) ReconcileResource(ctx context.Context, resourceType ResourceType, name, namespace string) error
ReconcileResource triggers reconciliation of a FluxCD resource
func (*Client) ResumeResource ¶
func (c *Client) ResumeResource(ctx context.Context, resourceType ResourceType, name, namespace string) error
ResumeResource resumes a FluxCD resource
func (*Client) SuspendResource ¶
func (c *Client) SuspendResource(ctx context.Context, resourceType ResourceType, name, namespace string) error
SuspendResource suspends a FluxCD resource
type ClusterInfo ¶
ClusterInfo contains basic cluster information
type Condition ¶
type Condition struct {
Type string `json:"type"`
Status string `json:"status"`
Reason string `json:"reason"`
Message string `json:"message"`
LastTransitionTime time.Time `json:"lastTransitionTime"`
}
Condition represents a status condition
type Resource ¶
type Resource struct {
Type ResourceType `json:"type"`
Name string `json:"name"`
Namespace string `json:"namespace"`
Ready bool `json:"ready"`
Status string `json:"status"`
Message string `json:"message"`
Age time.Duration `json:"age"`
LastUpdate time.Time `json:"last_update"`
Conditions []Condition `json:"conditions"`
Suspended bool `json:"suspended"`
Source string `json:"source,omitempty"`
Path string `json:"path,omitempty"`
Revision string `json:"revision,omitempty"`
URL string `json:"url,omitempty"`
Chart string `json:"chart,omitempty"`
Version string `json:"version,omitempty"`
}
Resource represents a generic FluxCD resource
type ResourceType ¶
type ResourceType string
ResourceType represents the type of FluxCD resource
const ( ResourceTypeGitRepository ResourceType = "GitRepository" ResourceTypeHelmRepository ResourceType = "HelmRepository" ResourceTypeKustomization ResourceType = "Kustomization" ResourceTypeHelmRelease ResourceType = "HelmRelease" )