Documentation ¶
Index ¶
Constants ¶
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" MaxSurge int32 = 2 )
Constants for the DeployManager
const ( WSO2Dir string = "wso2" FilePersistentDir string = "siddhi-app-persistence" )
Default directories in the docker image
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 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