helm

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2024 License: BSD-3-Clause Imports: 10 Imported by: 0

README

Helm Provider

The Helm Provider extends the platform-health server to enable monitoring the status of Helm releases. It does this by interacting with the Helm API to check the status of the specified Helm release.

Usage

Once the Helm Provider is configured, any query to the platform health server will trigger validation of the configured Helm release(s). The server will attempt to check the status of each Helm release, and it will report each release as "healthy" if the Helm release exists and is in deployed state, or "unhealthy" otherwise.

Configuration

The Helm Provider is configured through the platform-health server's configuration file, with component instances listed under the helm key.

  • name (required): The name of the Helm release, used to identify the release in the health reports.
  • chart (required): The chart of the Helm release to monitor.
  • namespace (required): The namespace of the Helm release to monitor.
  • timeout (default: 5s): The maximum time to wait for a status check to be completed before timing out.

For queries to succeed, the platform-health server must be run in a context with appropriate access privileges to list and get the Secret resources that Helm uses internally to track releases. Running "in-cluster", this means an appropriate service account, role and role binding must be configured.

Example
helm:
  - name: example
    chart: example-chart
    namespace: example-namespace
    timeout: 5s

In this example, the Helm Provider will check the status of the Helm release named "example" in the "example-namespace" namespace, using the "example-chart" chart, and it will wait for 5s before timing out. It will not include detailed information about the Helm release in the health reports.

Documentation

Index

Constants

View Source
const TypeHelm = "helm"

Variables

This section is empty.

Functions

This section is empty.

Types

type Helm

type Helm struct {
	Name      string        `mapstructure:"name"`
	Chart     string        `mapstructure:"chart"`
	Namespace string        `mapstructure:"namespace"`
	Timeout   time.Duration `mapstructure:"timeout" default:"5s"`
}

func (*Helm) GetHealth

func (i *Helm) GetHealth(ctx context.Context) *ph.HealthCheckResponse

func (*Helm) GetName

func (i *Helm) GetName() string

func (*Helm) GetType

func (i *Helm) GetType() string

func (*Helm) LogValue

func (i *Helm) LogValue() slog.Value

func (*Helm) SetDefaults

func (i *Helm) SetDefaults()

Jump to

Keyboard shortcuts

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