models

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const AUTO_SELECT_NODE string = "autoSelectNode"
View Source
const AutoSelectShell string = "*"
View Source
const MaxSessionLimitReachedMsg = "session-limit-reached"
View Source
const ShellNotSupported string = "%s is not supported for the selected image"
View Source
const TerminalAccessBaseImageVar = "${base_image}"
View Source
const TerminalAccessClusterIdTemplateVar = "${cluster_id}"
View Source
const TerminalAccessClusterRoleBindingTemplate = TerminalAccessPodNameTemplate + "-crb"
View Source
const TerminalAccessClusterRoleBindingTemplateName = "terminal-access-role-binding"
View Source
const TerminalAccessNamespaceVar = "${default_namespace}"
View Source
const TerminalAccessNodeNameVar = "${node_name}"
View Source
const TerminalAccessPodNameTemplate = "terminal-access-" + TerminalAccessClusterIdTemplateVar + "-" + TerminalAccessUserIdTemplateVar + "-" + TerminalAccessRandomIdVar
View Source
const TerminalAccessPodNameVar = "${pod_name}"
View Source
const TerminalAccessPodTemplateName = "terminal-access-pod"
View Source
const TerminalAccessRandomIdVar = "${random_id}"
View Source
const TerminalAccessRoleTemplateName = "terminal-access-role"
View Source
const TerminalAccessServiceAccountTemplate = TerminalAccessPodNameTemplate + "-sa"
View Source
const TerminalAccessServiceAccountTemplateName = "terminal-access-service-account"
View Source
const TerminalAccessUserIdTemplateVar = "${user_id}"

Variables

This section is empty.

Functions

This section is empty.

Types

type ChartStatus

type ChartStatus int
const (
	CHARTSTATUS_NEW                    ChartStatus = 1
	CHARTSTATUS_DEPLOYMENT_IN_PROGRESS ChartStatus = 2
	CHARTSTATUS_SUCCESS                ChartStatus = 3
	CHARTSTATUS_ERROR                  ChartStatus = 4
	CHARTSTATUS_ROLLBACK               ChartStatus = 5
	CHARTSTATUS_UNKNOWN                ChartStatus = 6
)

func (ChartStatus) String

func (s ChartStatus) String() string

type ChartsViewEditorType added in v0.6.4

type ChartsViewEditorType string
const (
	EDITOR_TYPE_BASIC    ChartsViewEditorType = "BASIC"
	EDITOR_TYPE_ADVANCED ChartsViewEditorType = "ADVANCED"
	//default value
	EDITOR_TYPE_UNDEFINED ChartsViewEditorType = "UNDEFINED"
)

type Container added in v0.6.19

type Container struct {
	ContainerName string `json:"containerName"`
	Image         string `json:"image"`
}

type DeploymentType

type DeploymentType int
const (
	DEPLOYMENTTYPE_UNKNOWN DeploymentType = iota
	DEPLOYMENTTYPE_DEPLOY
	DEPLOYMENTTYPE_ROLLBACK
	DEPLOYMENTTYPE_STOP
	DEPLOYMENTTYPE_START
)

func (DeploymentType) String

func (d DeploymentType) String() string

type HelmValues

type HelmValues struct {
	AppName           string    `sql:"app_name,pk"`
	TargetEnvironment string    `sql:"environment,pk"` //target environment
	Values            string    `sql:"values_yaml"`
	Active            bool      `sql:"active,notnull"`
	CreatedOn         time.Time `sql:"created_on"`
	CreatedBy         int32     `sql:"created_by"`
	UpdatedOn         time.Time `sql:"updated_on"`
	UpdatedBy         int32     `sql:"updated_by"`
	// contains filtered or unexported fields
}

type HelmValuesService

type HelmValuesService interface {
	AddHelmValues(manifest *HelmValues) error
	GetHelmValues(appName, targetEnvironment string) (*HelmValues, error)
}

type HelmValuesServiceImpl

type HelmValuesServiceImpl struct {
	Logger *zap.SugaredLogger
	// contains filtered or unexported fields
}

func NewHelmValuesServiceImpl

func NewHelmValuesServiceImpl(Logger *zap.SugaredLogger, dbConnection *pg.DB) *HelmValuesServiceImpl

func (HelmValuesServiceImpl) AddHelmValues

func (impl HelmValuesServiceImpl) AddHelmValues(manifest *HelmValues) error

func (HelmValuesServiceImpl) GetHelmValues

func (impl HelmValuesServiceImpl) GetHelmValues(appName, targetEnvironment string) (*HelmValues, error)

type NodeTaints added in v0.6.19

type NodeTaints struct {
	Key    string `json:"key"`
	Value  string `json:"value"`
	Effect string `json:"effect,omitempty"`
}

type TerminalAccessTemplates added in v0.6.10

type TerminalAccessTemplates struct {
	Id           int    `sql:"id,pk"`
	TemplateName string `sql:"template_name"`
	TemplateData string `sql:"template_data"`
	sql.AuditLog
	// contains filtered or unexported fields
}

type TerminalPodStatus added in v0.6.10

type TerminalPodStatus string
const (
	TerminalPodStarting   TerminalPodStatus = "Starting"
	TerminalPodRunning    TerminalPodStatus = "Running"
	TerminalPodTerminated TerminalPodStatus = "Terminated"
	TerminalPodError      TerminalPodStatus = "Error"
)

type UserTerminalAccessData added in v0.6.10

type UserTerminalAccessData struct {
	Id        int    `sql:"id,pk"`
	UserId    int32  `sql:"user_id"`
	ClusterId int    `sql:"cluster_id"`
	NodeName  string `sql:"node_name"`
	PodName   string `sql:"pod_name"`
	Status    string `sql:"status"`
	Metadata  string `sql:"metadata"`
	sql.AuditLog
	// contains filtered or unexported fields
}

type UserTerminalPodEvents added in v0.6.15

type UserTerminalPodEvents struct {
	Status         string      `json:"status"`
	ErrorReason    string      `json:"errorReason"`
	EventsResponse interface{} `json:"eventsResponse"`
}

type UserTerminalSessionConfig added in v0.6.10

type UserTerminalSessionConfig struct {
	MaxSessionPerUser                 int    `env:"MAX_SESSION_PER_USER" envDefault:"5"`
	TerminalPodStatusSyncTimeInSecs   int    `env:"TERMINAL_POD_STATUS_SYNC_In_SECS" envDefault:"600"`
	TerminalPodDefaultNamespace       string `env:"TERMINAL_POD_DEFAULT_NAMESPACE" envDefault:"default"`
	TerminalPodInActiveDurationInMins int    `env:"TERMINAL_POD_INACTIVE_DURATION_IN_MINS" envDefault:"10"`
}

type UserTerminalSessionRequest added in v0.6.10

type UserTerminalSessionRequest struct {
	Id            int          `json:"id"`
	UserId        int32        `json:"userId"`
	ClusterId     int          `json:"clusterId" validate:"number,gt=0"`
	NodeName      string       `json:"nodeName" validate:"required,min=1"`
	BaseImage     string       `json:"baseImage" validate:"required,min=1"`
	ShellName     string       `json:"shellName" validate:"required,min=1"`
	Namespace     string       `json:"namespace" validate:"required,min=1"`
	NodeTaints    []NodeTaints `json:"taints"`
	Manifest      string       `json:"manifest"`
	PodName       string       `json:"podName"`
	ContainerName string       `json:"containerName"`
	ForceDelete   bool         `json:"forceDelete"`
	DebugNode     bool         `json:"debugNode"`
}

type UserTerminalSessionResponse added in v0.6.10

type UserTerminalSessionResponse struct {
	UserTerminalSessionId string            `json:"userTerminalSessionId"`
	UserId                int32             `json:"userId"`
	TerminalAccessId      int               `json:"terminalAccessId"`
	Status                TerminalPodStatus `json:"status"`
	ErrorReason           string            `json:"errorReason"`
	PodName               string            `json:"podName"`
	NodeName              string            `json:"nodeName"`
	IsValidShell          bool              `json:"isValidShell"`
	ShellName             string            `json:"shellName"`
	Containers            []Container       `json:"containers"`
	PodExists             bool              `json:"podExists"`
	DebugNode             bool              `json:"debugNode"`
	NameSpace             string            `json:"namespace"`
}

type UserTerminalShellSessionRequest added in v0.6.10

type UserTerminalShellSessionRequest struct {
	TerminalAccessId int    `json:"terminalAccessId" validate:"number,gt=0"`
	ShellName        string `json:"shellName" validate:"required,min=1"`
	NameSpace        string `json:"namespace" validate:"required,min=1"`
	ContainerName    string `json:"containerName"`
}

Jump to

Keyboard shortcuts

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