k8sclient

package
v0.0.0-...-d299574 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func Init

func Init(cfg *Config) (cli Client, err error)

func (*Client) CreateCRD

func (cli *Client) CreateCRD(res *unstructured.Unstructured) error

func (*Client) DeleteCRD

func (cli *Client) DeleteCRD(name string) error

func (*Client) FailedPodLog

func (cli *Client) FailedPodLog(pod *corev1.Pod) (string, error)

func (*Client) GetCRD

func (cli *Client) GetCRD(name string) (*unstructured.Unstructured, error)

func (*Client) GetResource

func (cli *Client) GetResource() dynamic.NamespaceableResourceInterface

func (*Client) IsPodFailed

func (cli *Client) IsPodFailed(pod *corev1.Pod) bool

func (*Client) ListPods

func (cli *Client) ListPods() ([]corev1.Pod, error)

func (*Client) UpdateCRD

func (cli *Client) UpdateCRD(res *unstructured.Unstructured) error

type Config

type Config struct {
	Kind           string `json:"kind"             required:"true"`
	Group          string `json:"group"            required:"true"`
	Version        string `json:"version"          required:"true"`
	Namespace      string `json:"namespace"        required:"true"`
	KubeConfigFile string `json:"kube_config_file" required:"true"`
}

func (*Config) SetDefault

func (cfg *Config) SetDefault()

Jump to

Keyboard shortcuts

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