k8s

package
v0.0.0-...-585cebd Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2022 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DepLabelName is label applied to deployment
	DepLabelName = "kratos/deployment"
	// CronLabelName is label applied to cronjob
	CronLabelName = "kratos/cronjob"
	// SecretLabelName is the label applied to secrets
	SecretLabelName = "kratos/secret"
	// ConfigMapsLabelName is the label applied to configmaps
	ConfigMapsLabelName = "kratos/configmaps"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Clientset  kubernetes.Interface
	RestConfig *rest.Config
	ConfigMaps
	Cronjob
	Deployment
	Ingress
	Secrets
	Service
}

Client contain the kubernetes clientset and the supported Kubernetes objects

func New

func New(kubeconfig string, conf *config.Config) (*Client, error)

New return a a Client

func (*Client) CheckVersionDepency

func (c *Client) CheckVersionDepency() error

CheckVersionDepency check if depency are meet

type ConfigMaps

type ConfigMaps interface {
	CreateUpdate(string, string) error
	Delete(string, string) error
	List(string) ([]corev1.ConfigMap, error)
}

ConfigMaps is the interface for configMaps

type Cronjob

type Cronjob interface {
	CreateUpdate(string, string) error
	Delete(string, string) error
	List(string) ([]batchv1.CronJob, error)
}

Cronjob is the interface for cronjob

type Deployment

type Deployment interface {
	CreateUpdate(string, string) error
	Delete(string, string) error
	List(string) ([]appsv1.Deployment, error)
}

Deployment is the interface for deployment

type Ingress

type Ingress interface {
	CheckIngressClassExist(string) error
	CreateUpdate(string, string) error
	Delete(string, string) error
	List(string) ([]netv1.Ingress, error)
}

Ingress is the interface

type Secrets

type Secrets interface {
	CreateUpdate(string, string) error
	Delete(string, string) error
	DeleteConfig(string, string) error
	Get(string, string) (*corev1.Secret, error)
	List(string) ([]corev1.Secret, error)
	SaveConfig(string, string, string, string) error
}

Secrets is the interface for secrets

type Service

type Service interface {
	CreateUpdate(string, string) error
	Delete(string, string) error
	List(string) ([]corev1.Service, error)
}

Service is the interface for service

Jump to

Keyboard shortcuts

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