k8s

package
v1.5.20 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AgnhostHTTPPort = 80
	AgnhostReplicas = 1
)
View Source
const (
	KapingerHTTPPort  = 8080
	KapingerTCPPort   = 8085
	KapingerUDPPort   = 8086
	MaxAffinityWeight = 100
)
View Source
const (
	Egress  = "egress"
	Ingress = "ingress"
)
View Source
const (
	RetryTimeoutPodsReady  = 5 * time.Minute
	RetryIntervalPodsReady = 5 * time.Second
)
View Source
const ExecSubResources = "exec"

Variables

View Source
var (
	ErrUnknownResourceType = fmt.Errorf("unknown resource type")
	ErrCreateNilResource   = fmt.Errorf("cannot create nil resource")
)
View Source
var ErrDeleteNilResource = fmt.Errorf("cannot create nil resource")
View Source
var ErrLabelMissingFromPod = fmt.Errorf("label missing from pod")

Functions

func CreateResource

func CreateResource(ctx context.Context, obj runtime.Object, clientset *kubernetes.Clientset) error

func DeleteResource

func DeleteResource(ctx context.Context, obj runtime.Object, clientset *kubernetes.Clientset) error

func ExecPod

func ExecPod(ctx context.Context, kubeConfigFilePath, namespace, podName, command string) error

func WaitForPodReady

func WaitForPodReady(ctx context.Context, clientset *kubernetes.Clientset, namespace, labelSelector string) error

Types

type CreateAgnhostStatefulSet

type CreateAgnhostStatefulSet struct {
	AgnhostName        string
	AgnhostNamespace   string
	KubeConfigFilePath string
}

func (*CreateAgnhostStatefulSet) Postvalidate

func (c *CreateAgnhostStatefulSet) Postvalidate() error

func (*CreateAgnhostStatefulSet) Prevalidate

func (c *CreateAgnhostStatefulSet) Prevalidate() error

func (*CreateAgnhostStatefulSet) Run

type CreateDenyAllNetworkPolicy

type CreateDenyAllNetworkPolicy struct {
	NetworkPolicyNamespace string
	KubeConfigFilePath     string
	DenyAllLabelSelector   string
}

func (*CreateDenyAllNetworkPolicy) Postvalidate

func (c *CreateDenyAllNetworkPolicy) Postvalidate() error

func (*CreateDenyAllNetworkPolicy) Prevalidate

func (c *CreateDenyAllNetworkPolicy) Prevalidate() error

func (*CreateDenyAllNetworkPolicy) Run

type CreateKapingerDeployment

type CreateKapingerDeployment struct {
	KapingerNamespace  string
	KapingerReplicas   string
	KubeConfigFilePath string
}

func (*CreateKapingerDeployment) GetKapingerClusterRole

func (c *CreateKapingerDeployment) GetKapingerClusterRole() *rbacv1.ClusterRole

func (*CreateKapingerDeployment) GetKapingerClusterRoleBinding

func (c *CreateKapingerDeployment) GetKapingerClusterRoleBinding() *rbacv1.ClusterRoleBinding

func (*CreateKapingerDeployment) GetKapingerDeployment

func (c *CreateKapingerDeployment) GetKapingerDeployment() *appsv1.Deployment

func (*CreateKapingerDeployment) GetKapingerService

func (c *CreateKapingerDeployment) GetKapingerService() *v1.Service

func (*CreateKapingerDeployment) GetKapingerServiceAccount

func (c *CreateKapingerDeployment) GetKapingerServiceAccount() *v1.ServiceAccount

func (*CreateKapingerDeployment) Postvalidate

func (c *CreateKapingerDeployment) Postvalidate() error

func (*CreateKapingerDeployment) Prevalidate

func (c *CreateKapingerDeployment) Prevalidate() error

func (*CreateKapingerDeployment) Run

type DeleteDenyAllNetworkPolicy

type DeleteDenyAllNetworkPolicy struct {
	NetworkPolicyNamespace string
	KubeConfigFilePath     string
	DenyAllLabelSelector   string
}

func (*DeleteDenyAllNetworkPolicy) Postvalidate

func (d *DeleteDenyAllNetworkPolicy) Postvalidate() error

func (*DeleteDenyAllNetworkPolicy) Prevalidate

func (d *DeleteDenyAllNetworkPolicy) Prevalidate() error

func (*DeleteDenyAllNetworkPolicy) Run

type ExecInPod

type ExecInPod struct {
	PodNamespace       string
	KubeConfigFilePath string
	PodName            string
	Command            string
}

func (*ExecInPod) Postvalidate

func (e *ExecInPod) Postvalidate() error

func (*ExecInPod) Prevalidate

func (e *ExecInPod) Prevalidate() error

func (*ExecInPod) Run

func (e *ExecInPod) Run() error

Jump to

Keyboard shortcuts

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