k8s

package
v0.9.31 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitClientSet

func InitClientSet(c *Conf) error

InitClientSet ...

func ListDeployWithLabels added in v0.9.10

func ListDeployWithLabels(ns, label string) ([]apps_v1.Deployment, error)

ListDeployWithLabels list deployment by label

func ListStsWithLabels added in v0.9.10

func ListStsWithLabels(ns, label string) ([]apps_v1.StatefulSet, error)

ListStsWithLables list statefulset

func SetDeployImg

func SetDeployImg(id *ContainerPath) error

SetDeployImg ...

func SetDeployImgWithLabel added in v0.9.10

func SetDeployImgWithLabel(id *ContainerPath, label ...string) error

SetDeployImgWithLabel ...

func SetStsImg

func SetStsImg(id *ContainerPath) error

SetStsImg update statefulset image field

func SetStsImgWithLabel added in v0.9.10

func SetStsImgWithLabel(id *ContainerPath, label ...string) error

SetStsImgWithLabel ...

Types

type Bio

type Bio struct {
	Name       string    `json:"name"`
	Containers []*ConBio `json:"containers"`
}

Bio wrap container bio

func GetDBio

func GetDBio(ns, name string) (*Bio, error)

GetDBio get deployment Bio

func GetSBio

func GetSBio(ns, name string) (*Bio, error)

GetSBio get statefulset bio

func ListBios added in v0.9.10

func ListBios(ns string) ([]*Bio, error)

ListBios list deployment bios

func ListStsBios added in v0.9.10

func ListStsBios(ns string) ([]*Bio, error)

ListStsBios list all statefulset bio in :ns

type ConBio

type ConBio struct {
	Name  string `json:"name"`
	Image string `json:"img"`
	Pull  string `json:"pull"`
}

ConBio container bio

type Conf

type Conf struct {
	Mode, ConfFile string
}

Conf ...

type ContainerPath

type ContainerPath struct {
	Ns    string `json:"namespace"`
	Kind  string `json:"kind" binding:"required"`
	Name  string `json:"name" binding:"required"`
	CName string `json:"container_name" binding:"required"`
	Img   string `json:"img" binding:"required"`
}

ContainerPath ...

func (ContainerPath) UpdateResource added in v0.9.15

func (c ContainerPath) UpdateResource(labels ...string) error

Jump to

Keyboard shortcuts

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