k8s

package
v0.0.0-...-d99d806 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2022 License: Apache-2.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FieldCPU    = "CPU"
	FieldMemory = "Memory"

	GroupLimits   = "Limits"
	GroupRequests = "Requests"
)
View Source
const CraneUpdatedAnnotation = "crane.dyrector.io/restartedAt"

Variables

This section is empty.

Functions

func Delete

func Delete(c context.Context, containerPreName, containerName string) error

func DeleteNamespace

func DeleteNamespace(ctx context.Context, name string, cfg *config.Configuration) error

func Deploy

func Deploy(c context.Context, dog *dogger.DeploymentLogger, deployImageRequest *v1.DeployImageRequest,
	versionData *v1.VersionData) error

func GetDeployments

func GetDeployments(ctx context.Context, namespace string, cfg *config.Configuration) (*kappsv1.DeploymentList, error)

func ListSecrets

func ListSecrets(ctx context.Context, namespace, name string, appConfig *config.Configuration) ([]string, error)

func NewDeleteFacade

func NewDeleteFacade(ctx context.Context, namespace, name string, cfg *config.Configuration) *deleteFacade

func NewDeployFacade

func NewDeployFacade(params *DeployFacadeParams, cfg *config.Configuration) *deployFacade

func WaitForRunningDeployment

func WaitForRunningDeployment(ctx context.Context, namespace, name string, expectedReplicaCount int32,
	timeout time.Duration, cfg *config.Configuration) error

utility method ensuring deployment is running

Types

type Client

type Client struct {
	InClusterConfig      func() (*rest.Config, error)
	BuildConfigFromFlags func(masterUrl, kubeconfigPath string) (*rest.Config, error)
}

func NewClient

func NewClient() *Client

func (*Client) GetClientSet

func (c *Client) GetClientSet(cfg *config.Configuration) (*kubernetes.Clientset, error)

type DeleteFacade

type DeleteFacade interface {
	Delete(namespace, name string) error
}

type DeployFacade

type DeployFacade interface {
	CheckPreConditions() error
	PreDeploy() error
	Deploy() error
	PostDeploy() error
	Clear() error
}

type DeployFacadeParams

type DeployFacadeParams struct {
	Ctx             context.Context
	Image           util.ImageURI
	InstanceConfig  v1.InstanceConfig
	ContainerConfig v1.ContainerConfig
	RuntimeConfig   *string
	Issuer          string
}

type DeployIngressOptions

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

type IngressPortMap

type IngressPortMap struct {
	TCP   map[uint16]string `yaml:"tcp"`
	Ports map[string]int    `yaml:"ports"`
}

9000: "default/example-go:8080" this is/was needed to expose ancient ports - passive ftp

type Namespace

type Namespace struct {
	Name string `json:"name" binding:"required"`
}

namespace entity

func GetNamespaces

func GetNamespaces(cfg *config.Configuration) ([]Namespace, error)

type ResourceError

type ResourceError struct {
	Field    string
	Group    string
	Fallback bool
}

func NewResourceError

func NewResourceError(errorField, errorGroup string, fallback bool) ResourceError

func (ResourceError) Error

func (resourceError ResourceError) Error() string

type ServiceParams

type ServiceParams struct {
	LBAnnotations map[string]string
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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