Documentation
¶
Index ¶
- Constants
- type ConfigMapListner
- type SiddhiController
- func (sc *SiddhiController) CheckDeployments(applications []deploymanager.Application)
- func (sc *SiddhiController) CleanArtifacts(oldApps []deploymanager.Application, newApps []deploymanager.Application) (err error)
- func (sc *SiddhiController) CreateArtifacts(applications []deploymanager.Application)
- func (sc *SiddhiController) SyncVersion()
- func (sc *SiddhiController) UpdateDefaultConfigs()
- func (sc *SiddhiController) UpdateErrorStatus(reason string, er error)
- func (sc *SiddhiController) UpdateReady(available int, need int)
- func (sc *SiddhiController) UpdateRunningStatus(reason string, message string)
- func (sc *SiddhiController) UpdateWarningStatus(reason string, er error)
- func (sc *SiddhiController) UpgradeVersion()
- type Status
Constants ¶
const ( OperatorCMName string = "siddhi-operator-config" SiddhiHome string = "/home/siddhi_user/siddhi-runner/" SiddhiImage string = "siddhiio/siddhi-runner-alpine:5.1.0-beta" SiddhiProfile string = "runner" AutoCreateIngress bool = true )
Controller configs
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigMapListner ¶
type ConfigMapListner struct { SiddhiProcess string `json:"siddhiProcess"` Changed bool `json:"changed"` }
ConfigMapListner holds the change details of a config map
type SiddhiController ¶
type SiddhiController struct { SiddhiProcess *siddhiv1alpha2.SiddhiProcess EventRecorder record.EventRecorder Logger logr.Logger KubeClient artifact.KubeClient Image deploymanager.Image AutoCreateIngress bool TLS string }
SiddhiController control all deployments of the SiddhiProcess
func (*SiddhiController) CheckDeployments ¶
func (sc *SiddhiController) CheckDeployments(applications []deploymanager.Application)
CheckDeployments function check the availability of deployments and the replications of the deployments.
func (*SiddhiController) CleanArtifacts ¶
func (sc *SiddhiController) CleanArtifacts( oldApps []deploymanager.Application, newApps []deploymanager.Application, ) (err error)
CleanArtifacts function delete the k8s artifacts that are not relavant when user changes the existing SiddhiProcess When user change stateful siddhi process to stateless the unwanted artifacts will be deleted by this function
func (*SiddhiController) CreateArtifacts ¶
func (sc *SiddhiController) CreateArtifacts(applications []deploymanager.Application)
CreateArtifacts simply create all the k8s artifacts which needed in the siddhiApps list. This function creates deployment, service, and ingress. If ingress was available the it will update the ingress.
func (*SiddhiController) SyncVersion ¶
func (sc *SiddhiController) SyncVersion()
SyncVersion synchronize the siddhi process internal version number this simply assing Status.CurrentVersion value to the Status.PreviousVersion and update the siddhi process this funtionality used for version controlling inside a siddhi process
func (*SiddhiController) UpdateDefaultConfigs ¶
func (sc *SiddhiController) UpdateDefaultConfigs()
UpdateDefaultConfigs updates the default configs of Image, TLS, and ingress creation
func (*SiddhiController) UpdateErrorStatus ¶
func (sc *SiddhiController) UpdateErrorStatus( reason string, er error, )
UpdateErrorStatus update the status of the CR object and send events to the SiddhiProcess object using EventRecorder object These status can be Warning, Error
func (*SiddhiController) UpdateReady ¶
func (sc *SiddhiController) UpdateReady(available int, need int)
UpdateReady update ready attribute of the CR object Ready attribute contains the number of deployments are complete and running out of requested deployments
func (*SiddhiController) UpdateRunningStatus ¶
func (sc *SiddhiController) UpdateRunningStatus( reason string, message string, )
UpdateRunningStatus update the status of the CR object and send events to the SiddhiProcess object using EventRecorder object These status can be Pending, Running
func (*SiddhiController) UpdateWarningStatus ¶
func (sc *SiddhiController) UpdateWarningStatus( reason string, er error, )
UpdateWarningStatus update the status of the CR object and send events to the SiddhiProcess object using EventRecorder object These status can be Warning, Error
func (*SiddhiController) UpgradeVersion ¶
func (sc *SiddhiController) UpgradeVersion()
UpgradeVersion upgrade the siddhi process internal version number