kubernetes

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package kubernetes implements the logic for remote.kubernetes.secret and remote.kubernetes.configmap component.

Index

Constants

This section is empty.

Variables

View Source
var DefaultArguments = Arguments{
	PollFrequency: 1 * time.Minute,
	PollTimeout:   15 * time.Second,
}

DefaultArguments holds default settings for Arguments.

Functions

This section is empty.

Types

type Arguments

type Arguments struct {
	Namespace     string        `alloy:"namespace,attr"`
	Name          string        `alloy:"name,attr"`
	PollFrequency time.Duration `alloy:"poll_frequency,attr,optional"`
	PollTimeout   time.Duration `alloy:"poll_timeout,attr,optional"`

	// Client settings to connect to Kubernetes.
	Client kubernetes.ClientArguments `alloy:"client,block,optional"`
}

Arguments control the component.

func (*Arguments) SetToDefault

func (args *Arguments) SetToDefault()

SetToDefault implements syntax.Defaulter.

func (*Arguments) Validate

func (args *Arguments) Validate() error

Validate implements syntax.Validator.

type Component

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

Component implements the remote.kubernetes.* component.

func New

func New(opts component.Options, args Arguments, rType ResourceType) (*Component, error)

New returns a new, unstarted remote.kubernetes.* component.

func (*Component) CurrentHealth

func (c *Component) CurrentHealth() component.Health

CurrentHealth returns the current health of the component.

func (*Component) Run

func (c *Component) Run(ctx context.Context) error

Run starts the remote.kubernetes.* component.

func (*Component) Update

func (c *Component) Update(args component.Arguments) (err error)

Update updates the remote.kubernetes.* component. After the update completes, a poll is forced.

type Exports

type Exports struct {
	Data map[string]alloytypes.OptionalSecret `alloy:"data,attr"`
}

Exports holds settings exported by this component.

type ResourceType

type ResourceType string
const (
	TypeSecret    ResourceType = "secret"
	TypeConfigMap ResourceType = "configmap"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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