providers

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package providers defines the interfaces for the pluggable providers and some helper tooling around them

Index

Constants

This section is empty.

Variables

View Source
var ErrSecretsNotFound = errors.New("secrets.yaml not found")

ErrSecretsNotFound is returned when no secrets.yaml is found for a given cluster

Functions

func LoadNodesYAML

func LoadNodesYAML(provider NodesProvider, clusterName string) ([]byte, error)

LoadNodesYAML gets the YAML bytes from a provider

func LoadSecretsBundle

func LoadSecretsBundle(provider SecretsProvider, clusterName string) (*secrets.Bundle, error)

LoadSecretsBundle gets and unmarshals secrets from a provider.

Types

type NodesProvider

type NodesProvider interface {
	// GetNodes returns the YAML representation of nodes for the given cluster
	GetNodes(clusterName string) ([]byte, error)
}

NodesProvider is an interface for getting nodes from an external source

func NewBinaryNodesProvider

func NewBinaryNodesProvider(binaryPath string) NodesProvider

NewBinaryNodesProvider returns a NodesProvider that delegates getting nodes to a binary

type SecretsProvider

type SecretsProvider interface {
	// Get return secrets.yaml for the given cluster
	// If there is no secrets.yaml for the given cluster, returns nil
	Get(clusterName string) ([]byte, error)

	// Put stores the secrets.yaml for the given cluster
	Put(clusterName string, bundle []byte) error
}

SecretsProvider is an interface for getting and storing talos 'secrets.yaml' files

func NewBinarySecretsProvider

func NewBinarySecretsProvider(binaryPath string) SecretsProvider

NewBinarySecretsProvider returns a SecretsProvider that delegates reading and writing of secrets.yaml to a binary.

func NewFilesystemSecretsProvider

func NewFilesystemSecretsProvider() SecretsProvider

NewFilesystemSecretsProvider returns a SecretsProvider that reads and writes secrets.yaml files with optional SOPS support

Jump to

Keyboard shortcuts

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