k8s

package
v0.35.0 Latest Latest
Warning

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

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

Documentation

Overview

Package k8s provides a client for interacting with a Kubernetes cluster.

Package k8s provides a client for interacting with a Kubernetes cluster.

Index

Constants

View Source
const (
	// ZarfManagedByLabel is used to denote Zarf manages the lifecycle of a resource
	ZarfManagedByLabel = "app.kubernetes.io/managed-by"
	// AgentLabel is used to give instructions to the Zarf agent
	AgentLabel = "zarf.dev/agent"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GeneratedPKI

type GeneratedPKI struct {
	CA   []byte `json:"ca"`
	Cert []byte `json:"cert"`
	Key  []byte `json:"key"`
}

GeneratedPKI is a struct for storing generated PKI data.

type K8s

type K8s struct {
	Clientset  kubernetes.Interface
	RestConfig *rest.Config
	Watcher    watcher.StatusWatcher
	Log        Log
}

K8s is a client for interacting with a Kubernetes cluster.

func New

func New(logger Log) (*K8s, error)

New creates a new K8s client.

func (*K8s) WaitForHealthyCluster

func (k *K8s) WaitForHealthyCluster(ctx context.Context) error

WaitForHealthyCluster checks for an available K8s cluster every second until timeout.

type Log

type Log func(string, ...any)

Log is a function that logs a message.

Jump to

Keyboard shortcuts

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