kubernetesk8s.io/kubernetes/cmd/kubeadm/app/util/dryrun Index | Files

package dryrun

import "k8s.io/kubernetes/cmd/kubeadm/app/util/dryrun"

Index

Functions

func NewWaiter

func NewWaiter() apiclient.Waiter

NewWaiter returns a new Waiter object that talks to the given Kubernetes cluster

func PrintDryRunFile

func PrintDryRunFile(fileName, realDir, printDir string, w io.Writer) error

PrintDryRunFile is a helper method around PrintDryRunFiles

func PrintDryRunFiles

func PrintDryRunFiles(files []FileToPrint, w io.Writer) error

PrintDryRunFiles prints the contents of the FileToPrints given to it to the writer w

func PrintFilesIfDryRunning

func PrintFilesIfDryRunning(needPrintManifest bool, manifestDir string, outputWriter io.Writer) error

PrintFilesIfDryRunning prints the static pod manifests to stdout and informs about the temporary directory to go and lookup when dry running

Types

type FileToPrint

type FileToPrint struct {
	RealPath  string
	PrintPath string
}

FileToPrint represents a temporary file on disk that might want to be aliased when printing Useful for things like loading a file from /tmp/ but saying to the user "Would write file foo to /etc/kubernetes/..."

func NewFileToPrint

func NewFileToPrint(realPath, printPath string) FileToPrint

NewFileToPrint makes a new instance of FileToPrint with the specified arguments

type Waiter

type Waiter struct{}

Waiter is an implementation of apiclient.Waiter that should be used for dry-running

func (*Waiter) SetTimeout

func (w *Waiter) SetTimeout(_ time.Duration)

SetTimeout is a no-op; we don't wait in this implementation

func (*Waiter) WaitForAPI

func (w *Waiter) WaitForAPI() error

WaitForAPI just returns a dummy nil, to indicate that the program should just proceed

func (*Waiter) WaitForControlPlaneComponents

func (w *Waiter) WaitForControlPlaneComponents(podsMap map[string]*v1.Pod, apiServerAddress string) error

WaitForControlPlaneComponents just returns a dummy nil, to indicate that the program should just proceed

func (*Waiter) WaitForKubelet

func (w *Waiter) WaitForKubelet(healthzAddress string, healthzPort int32) error

WaitForKubelet blocks until the kubelet /healthz endpoint returns 'ok'

func (*Waiter) WaitForPodsWithLabel

func (w *Waiter) WaitForPodsWithLabel(kvLabel string) error

WaitForPodsWithLabel just returns a dummy nil, to indicate that the program should just proceed

func (*Waiter) WaitForStaticPodControlPlaneHashes

func (w *Waiter) WaitForStaticPodControlPlaneHashes(_ string) (map[string]string, error)

WaitForStaticPodControlPlaneHashes returns an empty hash for all control plane images;

func (*Waiter) WaitForStaticPodHashChange

func (w *Waiter) WaitForStaticPodHashChange(_, _, _ string) error

WaitForStaticPodHashChange returns a dummy nil error in order for the flow to just continue as we're dryrunning

func (*Waiter) WaitForStaticPodSingleHash

func (w *Waiter) WaitForStaticPodSingleHash(_ string, _ string) (string, error)

WaitForStaticPodSingleHash returns an empty hash but the empty strings there are needed

Source Files

dryrun.go

Version
v1.33.0 (latest)
Published
Apr 23, 2025
Platform
linux/amd64
Imports
10 packages
Last checked
3 hours ago

Tools for package owners.