deploymanager

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OperatorName     string = "siddhi-operator"
	OperatorVersion  string = "0.2.2"
	CRDName          string = "SiddhiProcess"
	PVCExtension     string = "-pvc"
	DepCMExtension   string = "-depyml"
	SiddhiExtension  string = ".siddhi"
	DepConfMountPath string = "tmp/configs/"
	SiddhiFilesDir   string = "siddhi-files/"
	DepConfParameter string = "-Dconfig="
	AppConfParameter string = "-Dapps="
	ParserParameter  string = "-Dsiddhi-parser "
	ContainerName    string = "siddhi-runner-runtime"
	Shell            string = "sh"
	SiddhiBin        string = "bin"
	MaxUnavailable   int32  = 0
	MaxSurge         int32  = 2
)

Constants for the DeployManager

View Source
const (
	WSO2Dir           string = "wso2"
	FilePersistentDir string = "siddhi-app-persistence"
)

Default directories in the docker image

View Source
const (
	StatePersistenceConf string = `` /* 209-byte string literal not displayed */

)

State persistence config is the different string constant used by the deployApp() function. This constant holds a YAML object which used to change the deployment.yaml file of the siddhi-runner image.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application struct {
	Name               string                 `json:"appName"`
	ContainerPorts     []corev1.ContainerPort `json:"containerPorts"`
	Apps               map[string]string      `json:"apps"`
	ServiceEnabled     bool                   `json:"serviceEnabled"`
	PersistenceEnabled bool                   `json:"persistenceEnabled"`
	Replicas           int32                  `json:"replicas"`
}

Application contains details about the siddhi app which need in the K8s deployment

type Config

type Config struct {
	StatePersistence StatePersistence `yaml:"statePersistence"`
}

Config contains the siddhi config block

type DeployManager

type DeployManager struct {
	Application   Application
	KubeClient    artifact.KubeClient
	Labels        map[string]string
	Image         Image
	SiddhiProcess *siddhiv1alpha2.SiddhiProcess
}

DeployManager creates and manage the deployment

func (*DeployManager) CreateLabels

func (d *DeployManager) CreateLabels()

CreateLabels creates labels for each deployment

func (*DeployManager) Deploy

func (d *DeployManager) Deploy() (operationResult controllerutil.OperationResult, err error)

Deploy creates a deployment according to the given Application specs. It create and mount volumes, create config maps, populates envs that needs to the deployment.

type Image

type Image struct {
	Name    string
	Home    string
	Secret  string
	Profile string
}

Image holds the docker image details of the deployment

type SPConfig

type SPConfig struct {
	Location string `yaml:"location"`
}

SPConfig contains the state persistence configs

type StatePersistence

type StatePersistence struct {
	SPConfig SPConfig `yaml:"config"`
}

StatePersistence contains the StatePersistence config block

Jump to

Keyboard shortcuts

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