staticpod

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package staticpod reconciles complete candidate sets into Podmin's owned kubelet manifest directory.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Cluster, NodeGroup, StaticDir, SecretDir, NodeDNS string
	PollInterval, ReconcileTimeout                    time.Duration
	PublishServices                                   func([]manifest.Service)
	Identity                                          IdentityAuthority
}

Config contains runtime configuration; StaticDir must be exclusively Podmin-owned because reconciliation removes stale YAML files.

type IdentityAuthority

type IdentityAuthority interface {
	Issue(string, string, string, time.Time) (workload.Material, error)
	Revision() uint64
}

IdentityAuthority issues workload certificates from synchronized cluster CA state.

type ObjectStore

type ObjectStore interface {
	Get(context.Context, string) ([]byte, string, error)
}

ObjectStore supplies authoritative revision and Pod objects.

type Reconciler

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

Reconciler serializes complete candidate construction and publication.

func NewReconciler

func NewReconciler(config Config, objects ObjectStore, params SecretReader, secrets SecretReader) (*Reconciler, error)

NewReconciler creates a reconciler using injectable directories and providers.

func (*Reconciler) Healthy

func (r *Reconciler) Healthy() bool

Healthy reports whether the most recent reconciliation succeeded.

func (*Reconciler) Reconcile

func (r *Reconciler) Reconcile(ctx context.Context) error

Reconcile stages a complete changed index before sequential per-file atomic commits.

func (*Reconciler) Run

func (r *Reconciler) Run(ctx context.Context, logger *slog.Logger)

Run polls revisions until context cancellation.

func (*Reconciler) Services

func (r *Reconciler) Services() []manifest.Service

Services returns a defensive snapshot of the most recently published Service state.

type SecretReader

type SecretReader interface {
	Get(context.Context, string) ([]byte, error)
}

SecretReader fetches one explicitly named configuration or secret value.

Jump to

Keyboard shortcuts

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