wrapper

package
v0.29.6 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeploymentWrapper

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

DeploymentWrapper wrapped kubernetes Deployment

func NewDeploymentWrapper

func NewDeploymentWrapper() *DeploymentWrapper

NewDeploymentWrapper create DeploymentWrapper

func (*DeploymentWrapper) AddArgs

func (d *DeploymentWrapper) AddArgs(args []string) *DeploymentWrapper

AddArgs add args to deployment

func (*DeploymentWrapper) AddCommand

func (d *DeploymentWrapper) AddCommand(cmd []string) *DeploymentWrapper

AddCommand add command to deployment

func (*DeploymentWrapper) AddPersistentVolume

func (d *DeploymentWrapper) AddPersistentVolume(pvcName, mountPath string) *DeploymentWrapper

AddPersistentVolume add persistent volume to deployment

func (*DeploymentWrapper) AddProbe

func (d *DeploymentWrapper) AddProbe(probe *corev1.Probe, probeType string) *DeploymentWrapper

AddProbe add probes to deployment

func (*DeploymentWrapper) Complete

func (d *DeploymentWrapper) Complete() (*appsv1.Deployment, error)

Complete complete Deployment config

func (*DeploymentWrapper) Create

func (d *DeploymentWrapper) Create(opts *Options) *DeploymentWrapper

Create create Deployment from template

func (*DeploymentWrapper) Err

func (d *DeploymentWrapper) Err() error

Err return d.err

func (*DeploymentWrapper) SetResource

func (d *DeploymentWrapper) SetResource(resources *corev1.ResourceRequirements) *DeploymentWrapper

SetResource set resource limit to deployment

func (*DeploymentWrapper) Vaildate

func (d *DeploymentWrapper) Vaildate() bool

Vaildate check if err nil

type Options

type Options struct {
	Name      string
	Namespace string
	Image     string
	Port      string
}

Options template options for containers

type ServiceWrapper

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

ServiceWrapper wrapped kubernetes Service

func NewServiceWrapper

func NewServiceWrapper() *ServiceWrapper

NewServiceWrapper create ServiceWrapper

func (*ServiceWrapper) Complete

func (d *ServiceWrapper) Complete() (*corev1.Service, error)

Complete complete Service config

func (*ServiceWrapper) Create

func (d *ServiceWrapper) Create(opts *Options) *ServiceWrapper

Create create Service from template

func (*ServiceWrapper) Err

func (d *ServiceWrapper) Err() error

Err return d.err

func (*ServiceWrapper) Vaildate

func (d *ServiceWrapper) Vaildate() bool

Vaildate check if err nil

type Wrapper

type Wrapper interface {
	Create() *Wrapper
	Validate() bool
	Err() error
	Complete() (k8sruntime.Object, error)
}

Wrapper wrapper interface for kubernetes resource

Jump to

Keyboard shortcuts

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