Documentation ¶
Index ¶
- Constants
- type ConfigMapListner
- type SiddhiController
- func (sc *SiddhiController) CheckAvailableDeployments(applications []deploymanager.Application) (terminate bool)
- 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) GetDeploymentCount(applications []deploymanager.Application) (count int)
- func (sc *SiddhiController) SetDefaultPendingState()
- func (sc *SiddhiController) SetNotReadyState()
- func (sc *SiddhiController) SyncVersion()
- func (sc *SiddhiController) UpdateDefaultConfigs()
- func (sc *SiddhiController) UpdateErrorStatus(reason string, er error)
- func (sc *SiddhiController) UpdateNotReadytatus()
- func (sc *SiddhiController) UpdatePartialAppStatus(applications []deploymanager.Application)
- func (sc *SiddhiController) UpdatePendingStatus()
- func (sc *SiddhiController) UpdateReadyDeployments(available int, need int)
- func (sc *SiddhiController) UpdateReadyStatus()
- 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.2" 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) CheckAvailableDeployments ¶ added in v0.2.1
func (sc *SiddhiController) CheckAvailableDeployments(applications []deploymanager.Application) (terminate bool)
CheckAvailableDeployments function check the availability of deployments and the replications of the deployments.
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) GetDeploymentCount ¶ added in v0.2.1
func (sc *SiddhiController) GetDeploymentCount(applications []deploymanager.Application) (count int)
GetDeploymentCount returns the deployment count to a given set of applications
func (*SiddhiController) SetDefaultPendingState ¶ added in v0.2.1
func (sc *SiddhiController) SetDefaultPendingState()
SetDefaultPendingState set the default state of a SiddhiProcess object to Pending
func (*SiddhiController) SetNotReadyState ¶ added in v0.2.1
func (sc *SiddhiController) SetNotReadyState()
SetNotReadyState set the state of a SiddhiProcess object to Updating
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) UpdateNotReadytatus ¶ added in v0.2.1
func (sc *SiddhiController) UpdateNotReadytatus()
UpdateNotReadytatus update the status of the CR object to Not Ready status
func (*SiddhiController) UpdatePartialAppStatus ¶ added in v0.2.1
func (sc *SiddhiController) UpdatePartialAppStatus(applications []deploymanager.Application)
UpdatePartialAppStatus update the status of the CR object to Pending status
func (*SiddhiController) UpdatePendingStatus ¶ added in v0.2.1
func (sc *SiddhiController) UpdatePendingStatus()
UpdatePendingStatus update the status of the CR object to Pending status
func (*SiddhiController) UpdateReadyDeployments ¶ added in v0.2.1
func (sc *SiddhiController) UpdateReadyDeployments(available int, need int)
UpdateReadyDeployments update ready attribute of the CR object Ready attribute contains the number of deployments are complete and running out of requested deployments
func (*SiddhiController) UpdateReadyStatus ¶ added in v0.2.1
func (sc *SiddhiController) UpdateReadyStatus()
UpdateReadyStatus update the status of the CR object to Ready status
func (*SiddhiController) UpdateRunningStatus ¶
func (sc *SiddhiController) UpdateRunningStatus( reason string, message string, )
UpdateRunningStatus send events to the SiddhiProcess object using EventRecorder object
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