helm

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: Apache-2.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package helm provides agent-side label injection into rendered Kubernetes manifests for release tracking. Shared chart utilities and container image extraction are provided by internal/chartutil.

Index

Constants

View Source
const (
	// AppLabelKey is the label key used to identify which application
	// owns a Kubernetes resource. This enables querying all resources
	// belonging to a specific application.
	AppLabelKey = "agent.flightctl.io/app"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Labeler

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

Labeler injects labels into Kubernetes manifests using kubectl kustomize. It leverages kustomize's built-in label transformer which automatically handles all Kubernetes resource types and their pod templates.

func NewLabeler

func NewLabeler(kube *client.Kube, readWriter fileio.ReadWriter) *Labeler

NewLabeler creates a new Labeler that uses kubectl kustomize to inject labels.

func (*Labeler) InjectLabels

func (l *Labeler) InjectLabels(ctx context.Context, input io.Reader, output io.Writer, labels map[string]string) error

InjectLabels reads multi-document YAML from input, injects the provided labels into each Kubernetes resource using kustomize, and writes the modified YAML to output.

This function is designed to be used as a Helm post-renderer. Helm pipes rendered templates through the post-renderer before applying them to the cluster.

Labels are injected using kustomize's label transformer with:

  • includeSelectors: false (avoids modifying immutable selectors)
  • includeTemplates: true (ensures pods inherit labels from their controllers)

This approach automatically handles all Kubernetes resource types including Deployments, StatefulSets, DaemonSets, Jobs, CronJobs, and any future types.

Jump to

Keyboard shortcuts

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