lib

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CRD

type CRD struct {
	Group   string `yaml:"group"`
	Kind    string `yaml:"kind"`
	Version string `yaml:"version"`
}

type Config

type Config struct {
	ApiVersion string   `yaml:"apiVersion"`
	Kind       string   `yaml:"kind"`
	Metadata   Metadata `yaml:"metadata",required`
	Spec       Spec     `yaml:"spec"`
}

type IK8sClient

type IK8sClient interface {
	Pods(namespace string) (*corev1.PodList, error)
	CRDs(group, kind, version string) (*unstructured.UnstructuredList, error)
}

func NewK8sClient

func NewK8sClient(kubeconfig string) (IK8sClient, error)

type Metadata

type Metadata struct {
	Name        string            `yaml:"name",required`
	Labels      map[string]string `yaml:"labels"`
	Annotations map[string]string `yaml:"annotations"`
}

type Pod

type Pod struct {
	Name      string `yaml:"name"`
	Namespace string `yaml:"namespace"`
	State     string `yaml:"state"`
}

type Spec

type Spec struct {
	Crds []CRD `yaml:"crds"`
	Pods []Pod `yaml:"pods"`
}

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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