common

package
v0.0.0-...-e7c744b Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultNodeMinCount = 0
	DefaultNodeMaxCount = 2
)

### [ Constants to common cluster default values ] ### //

View Source
const (
	LabelKey = "nodepool.banzaicloud.io/name"
)

Constants for labeling cluster nodes

View Source
const (
	NodePoolNameTaintKey = "nodepool.banzaicloud.io/name"
)

Constant for tainting head node

View Source
const (
	PipelineSpecificLabelsCommonPart = "banzaicloud.io"
)

Constant for the common part of all possible Pipeline specific label name

View Source
const (
	SpotConfigMapKey = "spot-deploy-config"
)

Variables

This section is empty.

Functions

func ErrorResponseWithStatus

func ErrorResponseWithStatus(c *gin.Context, status int, err error)

ErrorResponseWithStatus aborts the http request with a JSON error response with the given status code and error

func ValidateNodePoolLabels

func ValidateNodePoolLabels(nodePoolName string, labels map[string]string) error

Validate checks whether the node pool labels collide with labels set by Pipeline and also if these are valid Kubernetes labels

func ValidateNodePoolName

func ValidateNodePoolName(nodePoolName string) error

ValidateNodePoolName checks the length and validity of the node pool name

Types

type BanzaiResponse

type BanzaiResponse struct {
	StatusCode int    `json:"status_code,omitempty"`
	Message    string `json:"message,omitempty"`
}

BanzaiResponse describes Pipeline's responses

type CreatorBaseFields

type CreatorBaseFields struct {
	CreatedAt   time.Time `json:"createdAt,omitempty"`
	CreatorName string    `json:"creatorName,omitempty"`
	CreatorId   uint      `json:"creatorId,omitempty"`
}

CreatorBaseFields describes all field which contains info about who created the cluster/application etc

type ErrorResponse

type ErrorResponse struct {
	Code    int    `json:"code,omitempty"`
	Message string `json:"message,omitempty"`
	Error   string `json:"error,omitempty"`
}

ErrorResponse describes Pipeline's responses when an error occurred

Jump to

Keyboard shortcuts

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