Documentation
¶
Index ¶
- func CreateOrUpdateCattleHelmChart(helmChart helmv1.HelmChart, namespaces ...string) (*helmv1.HelmChart, error)
- func DeleteCattleHelmChart(namespace string, name string) error
- func GetKubernetesConfig() (*rest.Config, error)
- func GetNamespaces() ([]string, error)
- func ListCattleHelmCharts(namespaces ...string) ([]helmv1.HelmChart, error)
- func ListHelmChartReleases(namespace string) ([]*release.Release, error)
- func NewCattleHelmChartClient() (*versioned.Clientset, error)
- func SetupHelmConfiguration(namespace string) (*action.Configuration, error)
- type ExtendedCattleHelmChart
- type ReleaseWithWorkloadStatus
- type WorkloadStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateOrUpdateCattleHelmChart ¶
func CreateOrUpdateCattleHelmChart(helmChart helmv1.HelmChart, namespaces ...string) (*helmv1.HelmChart, error)
CreateOrUpdateCattleHelmChart creates or updates a Helm chart. It automatically handles resource version conflicts.
func DeleteCattleHelmChart ¶
DeleteCattleHelmChart deletes a Helm chart by name and namespace.
func GetKubernetesConfig ¶
GetKubernetesConfig returns Kubernetes config If KUBECONFIG environment variable is set, it will use that file Otherwise, it will use in-cluster configuration (ServiceAccount)
func GetNamespaces ¶
GetNamespaces returns a list of kubernetes namespaces
func ListCattleHelmCharts ¶
ListCattleHelmCharts lists Helm charts in the specified namespaces. If no namespace is provided, charts in all namespaces are listed.
func ListHelmChartReleases ¶
ListHelmChartReleases lists all Helm charts in the given namespace. Returns a slice of release.Release pointers and any error encountered.
func NewCattleHelmChartClient ¶
NewCattleHelmChartClient creates a new clientset for interacting with Cattle Helm Charts. It returns an error if the Kubernetes configuration cannot be created.
func SetupHelmConfiguration ¶
func SetupHelmConfiguration(namespace string) (*action.Configuration, error)
SetupHelmConfiguration sets up the Helm configuration with the given namespace. Returns an action.Configuration object and any error encountered.
Types ¶
type ExtendedCattleHelmChart ¶
type ExtendedCattleHelmChart struct { *helmv1.HelmChart InstallerJobLogs string `json:"installer_job_logs,omitempty"` InstallerJobCompleted bool `json:"installer_job_completed"` }
ExtendedCattleHelmChart is a Helm chart with additional fields
func GetCattleHelmChart ¶
func GetCattleHelmChart(namespace string, name string) (*ExtendedCattleHelmChart, error)
GetCattleHelmChart retrieves a specific Helm chart by name and namespace.
type ReleaseWithWorkloadStatus ¶
type ReleaseWithWorkloadStatus struct { *release.Release Manifest interface{} `json:"manifest"` Workloads []WorkloadStatus `json:"workloads"` }
ReleaseWithWorkloadStatus represents a Helm chart release with the status of its workloads.
func GetHelmChartRelease ¶
func GetHelmChartRelease(namespace, releaseName string) (*ReleaseWithWorkloadStatus, error)
GetHelmChartRelease returns a Helm chart release with the given namespace and release name.
func GetHelmChartReleaseWithWorkloads ¶
func GetHelmChartReleaseWithWorkloads(namespace, releaseName string) (*ReleaseWithWorkloadStatus, error)
GetHelmChartReleaseWithWorkloads returns a Helm chart release with the status of its workloads.
type WorkloadStatus ¶
type WorkloadStatus struct { Status interface{} `json:"status"` Name string `json:"name"` Kind string `json:"kind"` }
WorkloadStatus represents the status of a Kubernetes workload.