k8s

package
v0.0.0-...-3064a82 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2021 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewKubeClient

func NewKubeClient(config *rest.Config) (*kubernetes.Clientset, error)

func NewKubeConfig

func NewKubeConfig(masterUrl, kubeConfig string) (*rest.Config, error)

Types

type Command

type Command interface {
	Execute() (string, error)
}

type Controller

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

func NewController

func NewController(nodeInforemer informersV1.NodeInformer) *Controller

func (*Controller) Run

func (c *Controller) Run(threadiness int, stopCh chan struct{})

type NodePatchCommand

type NodePatchCommand struct {
	NodeName  string
	Clientset *kubernetes.Clientset
	Patch     Patch
}

func (*NodePatchCommand) Execute

func (p *NodePatchCommand) Execute() (*v1.Node, error)

type Patch

type Patch struct {
	Op    string            `json:"op"`
	Path  string            `json:"path"`
	Value map[string]string `json:"value"`
}

func NewPatch

func NewPatch(op, path string, value map[string]string) Patch

func NewPatchAddAnnotations

func NewPatchAddAnnotations(value map[string]string) Patch

func NewPatchReplaceAnnotations

func NewPatchReplaceAnnotations(value map[string]string) Patch

Jump to

Keyboard shortcuts

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