statefulreplace

package
v0.0.0-...-2e7371b Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	K8sClient *kubernetes.Clientset
)
View Source
var (
	KindShortNames = map[string][]string{
		"Deployment":  {"deploy", "deployments"},
		"StatefulSet": {"sts", "statefulsets"},
		"DaemonSet":   {"ds", "daemonsets"},
	}
)

Functions

func CreateKubeClient

func CreateKubeClient() error

CreateKubeClient creates a global k8s client

func KindName

func KindName(kind string) (string, error)

Types

type Replacement

type Replacement struct {
	Container string `yaml:"container" json:"container"`
	Image     string `yaml:"image" json:"image"`
}

type StatefulReplace

type StatefulReplace struct {
	Namespace    string        `yaml:"namespace" json:"namespace"`
	Kind         string        `yaml:"kind" json:"kind"`
	Name         string        `yaml:"name" json:"name"`
	Replacements []Replacement `yaml:"replacements" json:"replacements"`
}

func LoadConfig

func LoadConfig(f string) (*StatefulReplace, error)

func (*StatefulReplace) ReplaceDaemonSet

func (sr *StatefulReplace) ReplaceDaemonSet() error

func (*StatefulReplace) ReplaceDeployment

func (sr *StatefulReplace) ReplaceDeployment() error

func (*StatefulReplace) ReplaceStatefulSet

func (sr *StatefulReplace) ReplaceStatefulSet() error

func (*StatefulReplace) Run

func (sr *StatefulReplace) Run() error

Jump to

Keyboard shortcuts

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