Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var (
ErrAuthSecretValueNotFound = errors.New("Auth secret value not found")
)
Functions ¶
func Init ¶
func Init( namespace string, kubeConfig *rest.Config, client kube.Client[unstructured.Unstructured], fieldManager string, ) (*action.Configuration, error)
Init setups a Helm config with a Kubernetes client capable of doing SSA and overrides any default namespace with given namespace.
Types ¶
type Auth ¶ added in v0.12.0
type Auth struct { SecretRef *SecretRef `json:"secretRef"` WorkloadIdentity *WorkloadIdentity `json:"workloadIdentity"` }
Auth contains methods for repository/registry authentication.
type Chart ¶
type Chart struct { Name string `json:"name"` // URL of the repository where the Helm chart is hosted. RepoURL string `json:"repoURL"` Version string `json:"version"` // Authentication information for private repositories. Auth *Auth `json:"auth,omitempty"` }
A Helm package that contains information sufficient for installing a set of Kubernetes resources into a Kubernetes cluster.
type ChartReconciler ¶
type ChartReconciler struct { KubeConfig *rest.Config Client kube.Client[unstructured.Unstructured] FieldManager string InventoryManager *inventory.Manager InsecureSkipTLSverify bool Log logr.Logger }
ChartReconciler reads Helm Packages with their desired state and applies them on a Kubernetes cluster. It stores releases in the inventory, but never collects it.
func (*ChartReconciler) Reconcile ¶
func (c *ChartReconciler) Reconcile( ctx context.Context, desiredRelease ReleaseDeclaration, releaseID string, ) (*Release, error)
Reconcile reads a declared Helm Release with its desired state and applies it on a Kubernetes cluster. It upgrades a Helm Chart based on whether it is already installed or not. A successful run stores the release in the inventory, but never collects it. In case an upgrade or installation is interrupted and left in a dangling state, the dangling release secret will be removed and a new upgrade/installation will be run.
type Release ¶
type Release struct { // Name of the installed objects of a Helm Chart. Name string `json:"name"` // Namespaces specifies the Kubernetes namespace where the Helm Chart is installed to. Namespace string `json:"namespace"` Chart Chart `json:"chart"` Values Values `json:"values"` // Version is an int which represents the revision of the release. Version int `json:"-"` }
Release is a running instance of a Chart and the current state in a Kubernetes Cluster.
type ReleaseDeclaration ¶
type ReleaseDeclaration struct { // Name influences the name of the installed objects of a Helm Chart. // When set, the installed objects are suffixed with the chart name. // Defaults to the chart name. Name string `json:"name"` // Namespace specifies the Kubernetes namespace to which the Helm Chart is installed to. // Defaults to default. Namespace string `json:"namespace"` Chart Chart `json:"chart"` Values Values `json:"values"` }
ReleaseDeclaration is a Declaration of the desired state (Release) in a Git repository.
type ReleaseMetadata ¶
type ReleaseMetadata struct {
// contains filtered or unexported fields
}
ReleaseMetadata is a small representation of a Release. Release is a running instance of a Chart. When a chart is installed, the ChartReconciler creates a release to track that installation.
func NewReleaseMetadata ¶
func NewReleaseMetadata(componentID string, name string, namespace string) ReleaseMetadata
NewReleaseMetadata constructs a ReleaseMetadata, which is a small representation of a Release.
func (ReleaseMetadata) ComponentID ¶
func (hr ReleaseMetadata) ComponentID() string
ComponentID is a link to the component this release belongs to.
func (ReleaseMetadata) Namespace ¶
func (hr ReleaseMetadata) Namespace() string
Namespace of the helm release.
type SecretRef ¶ added in v0.12.0
SecretRef is the reference to the secret containing the repository/registry authentication.
type Values ¶
type Values map[string]interface{}
Values provide a way to override Helm Chart template defaults with custom information.
type WorkloadIdentity ¶ added in v0.15.0
type WorkloadIdentity struct {
Provider string `json:"provider"`
}
WorkloadIdentity is a keyless approach used for repository/registry authentication.