system

package
v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2026 License: BSD-3-Clause Imports: 7 Imported by: 0

README

System Provider

The System Provider extends the platform-health server to enable hierarchical grouping of related health checks. It does this by defining a named container that holds other provider instances as sub-components, aggregating their health status into a single result.

Usage

Once the System Provider is configured, any query to the platform health server will trigger validation of all sub-components within the system. The system is reported "healthy" if-and-only-if all of its sub-components are "healthy". The worst status among sub-components propagates up to the system level.

Sub-components appear nested in the system's response, making it easy to identify the relationship in health reports.

Configuration

The System Provider is configured through the platform-health server's configuration file. Each instance is defined with its name as the YAML key under components.

  • type (required): Must be system.
  • components: A map of sub-components. Each sub-component is defined with its name as the key and must include a type field specifying its provider type.

Examples

FluxCD System Check
components:
  fluxcd:
    type: system
    components:
      source-controller:
        type: kubernetes
        spec:
          kind: Deployment
          name: source-controller
          namespace: flux-system
      kustomize-controller:
        type: kubernetes
        spec:
          kind: Deployment
          name: kustomize-controller
          namespace: flux-system
      helm-controller:
        type: kubernetes
        spec:
          kind: Deployment
          name: helm-controller
          namespace: flux-system

In this example, the System Provider creates a fluxcd system containing three Kubernetes deployment checks. The fluxcd system will be reported "healthy" only if all three controllers are running.

Nested Systems

Systems can be nested to create deeper hierarchies:

components:
  infrastructure:
    type: system
    components:
      monitoring:
        type: system
        components:
          prometheus:
            type: http
            spec:
              url: https://prometheus.example.com/health
          grafana:
            type: http
            spec:
              url: https://grafana.example.com/api/health
      database:
        type: tcp
        spec:
          host: postgres.example.com
          port: 5432

This creates a hierarchy where infrastructure contains a monitoring subsystem and a database check. The nested structure is reflected in the response, with each system aggregating its sub-components' status.

Documentation

Index

Constants

View Source
const ProviderType = "system"

Variables

This section is empty.

Functions

This section is empty.

Types

type Component

type Component struct {
	provider.Base
	provider.BaseContainer
}

func (*Component) GetHealth

func (c *Component) GetHealth(ctx context.Context) *ph.HealthCheckResponse

func (*Component) GetType

func (c *Component) GetType() string

func (*Component) LogValue

func (c *Component) LogValue() slog.Value

func (*Component) Setup

func (c *Component) Setup() error

Jump to

Keyboard shortcuts

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