k8s

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2025 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type K8sApiReference added in v0.1.1

type K8sApiReference struct {
	ApiVersion    schema.GroupVersion
	Kind          string
	OpenapiSchema *openapi_v2.Document
}

func (*K8sApiReference) GetApiDocV2 added in v0.1.1

func (k *K8sApiReference) GetApiDocV2(field string) string

type Kubernetes

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

func NewKubernetes

func NewKubernetes() (*Kubernetes, error)

NewKubernetes creates a new Kubernetes client

func (*Kubernetes) AnalyzeCronJob added in v0.3.2

func (k *Kubernetes) AnalyzeCronJob(r common.Request) (string, error)

AnalyzeCronJob analyzes the cronjobs and returns a list of failures.

func (*Kubernetes) AnalyzeDeployment added in v0.3.1

func (k *Kubernetes) AnalyzeDeployment(ctx context.Context, namespace string) (string, error)

AnalyzeDeployments analyzes the deployments and returns a list of failures.

func (*Kubernetes) AnalyzeIngress added in v0.3.1

func (k *Kubernetes) AnalyzeIngress(r common.Request) (string, error)

func (*Kubernetes) AnalyzeMutatingWebhook added in v0.3.2

func (k *Kubernetes) AnalyzeMutatingWebhook(r common.Request) (string, error)

AnalyzeMutatingWebhook analyzes MutatingWebhookConfiguration resources and returns a list of failures

func (*Kubernetes) AnalyzeNetworkPolicy added in v0.3.2

func (k *Kubernetes) AnalyzeNetworkPolicy(r common.Request) (string, error)

AnalyzeNetworkPolicy analyzes the network policies and returns a list of failures.

func (*Kubernetes) AnalyzeNode added in v0.3.1

func (k *Kubernetes) AnalyzeNode(ctx context.Context, name string) (string, error)

func (*Kubernetes) AnalyzePod added in v0.3.1

func (k *Kubernetes) AnalyzePod(ctx context.Context, namespace string) (string, error)

AnalyzePods analyzes the pods and returns a list of failures.

func (*Kubernetes) AnalyzeService added in v0.3.1

func (k *Kubernetes) AnalyzeService(ctx context.Context, namespace string) (string, error)

AnalyzeServices analyzes the services and returns a list of failures.

func (*Kubernetes) AnalyzeStatefulSet added in v0.3.1

func (k *Kubernetes) AnalyzeStatefulSet(r common.Request) (string, error)

func (*Kubernetes) AnalyzeValidatingWebhook added in v0.3.2

func (k *Kubernetes) AnalyzeValidatingWebhook(r common.Request) (string, error)

AnalyzeValidatingWebhook analyzes ValidatingWebhookConfiguration resources and returns a list of failures

func (*Kubernetes) DeploymentScale added in v0.1.1

func (k *Kubernetes) DeploymentScale(ctx context.Context, namespace, name string, replicas int32) (string, error)

DeploymentScale scales a deployment.

func (*Kubernetes) PodExec

func (k *Kubernetes) PodExec(ctx context.Context, namespace, name, command string) (string, error)

PodExec executes a command in a pod and returns the output.

func (*Kubernetes) PodLogs

func (k *Kubernetes) PodLogs(ctx context.Context, namespace, name string) (string, error)

PodLogs returns the logs of a pod.

func (*Kubernetes) ResourceCreateOrUpdate added in v0.3.1

func (k *Kubernetes) ResourceCreateOrUpdate(ctx context.Context, resource string) (string, error)

func (*Kubernetes) ResourceDelete added in v0.2.1

func (k *Kubernetes) ResourceDelete(ctx context.Context, kind, namespace, name string) (string, error)

func (*Kubernetes) ResourceGet added in v0.2.1

func (k *Kubernetes) ResourceGet(ctx context.Context, kind, namespace, name string) (string, error)

func (*Kubernetes) ResourceList added in v0.2.1

func (k *Kubernetes) ResourceList(ctx context.Context, kind, namespace string) (string, error)

Jump to

Keyboard shortcuts

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