Documentation ¶
Index ¶
- Constants
- func GenerateDataIndexWorkflowProperties(workflow *operatorapi.SonataFlow, platform *operatorapi.SonataFlowPlatform) (*properties.Properties, error)
- func GenerateJobServiceWorkflowProperties(workflow *operatorapi.SonataFlow, platform *operatorapi.SonataFlowPlatform) (*properties.Properties, error)
- func GenerateServiceURL(protocol string, namespace string, name string) string
- func SetServiceUrlsInWorkflowStatus(pl *operatorapi.SonataFlowPlatform, workflow *operatorapi.SonataFlow)
- type DataIndexHandler
- func (d DataIndexHandler) ConfigurePersistence(containerSpec *corev1.Container) *corev1.Container
- func (d DataIndexHandler) GenerateServiceProperties() (*properties.Properties, error)
- func (d DataIndexHandler) GetContainerName() string
- func (d DataIndexHandler) GetEnvironmentVariables() []corev1.EnvVar
- func (d DataIndexHandler) GetLocalServiceBaseUrl() string
- func (d DataIndexHandler) GetPodResourceRequirements() corev1.ResourceRequirements
- func (d DataIndexHandler) GetReplicaCount() int32
- func (d DataIndexHandler) GetServiceBaseUrl() string
- func (d DataIndexHandler) GetServiceCmName() string
- func (d DataIndexHandler) GetServiceImageName(persistenceType constants.PersistenceType) string
- func (d DataIndexHandler) GetServiceName() string
- func (d DataIndexHandler) IsServiceEnabled() bool
- func (d DataIndexHandler) IsServiceEnabledInSpec() bool
- func (d DataIndexHandler) IsServiceSetInSpec() bool
- func (d DataIndexHandler) MergeContainerSpec(containerSpec *corev1.Container) (*corev1.Container, error)
- func (d DataIndexHandler) MergePodSpec(podSpec corev1.PodSpec) (corev1.PodSpec, error)
- func (d DataIndexHandler) SetServiceUrlInPlatformStatus(clusterRefPlatform *operatorapi.SonataFlowPlatform)
- func (d DataIndexHandler) SetServiceUrlInWorkflowStatus(workflow *operatorapi.SonataFlow)
- type JobServiceHandler
- func (j JobServiceHandler) ConfigurePersistence(containerSpec *corev1.Container) *corev1.Container
- func (j JobServiceHandler) GenerateServiceProperties() (*properties.Properties, error)
- func (j JobServiceHandler) GetContainerName() string
- func (j JobServiceHandler) GetEnvironmentVariables() []corev1.EnvVar
- func (j JobServiceHandler) GetLocalServiceBaseUrl() string
- func (j JobServiceHandler) GetPodResourceRequirements() corev1.ResourceRequirements
- func (j JobServiceHandler) GetReplicaCount() int32
- func (j JobServiceHandler) GetServiceBaseUrl() string
- func (j JobServiceHandler) GetServiceCmName() string
- func (j JobServiceHandler) GetServiceImageName(persistenceType constants.PersistenceType) string
- func (j JobServiceHandler) GetServiceName() string
- func (j JobServiceHandler) IsServiceEnabled() bool
- func (j JobServiceHandler) IsServiceEnabledInSpec() bool
- func (j JobServiceHandler) IsServiceSetInSpec() bool
- func (j JobServiceHandler) MergeContainerSpec(containerSpec *corev1.Container) (*corev1.Container, error)
- func (j JobServiceHandler) MergePodSpec(podSpec corev1.PodSpec) (corev1.PodSpec, error)
- func (j JobServiceHandler) SetServiceUrlInPlatformStatus(clusterRefPlatform *operatorapi.SonataFlowPlatform)
- func (j JobServiceHandler) SetServiceUrlInWorkflowStatus(workflow *operatorapi.SonataFlow)
- type PlatformServiceHandler
- type ServiceAppPropertyHandler
Constants ¶
const DefaultHTTPServicePortInt = 8080
Variables ¶
This section is empty.
Functions ¶
func GenerateDataIndexWorkflowProperties ¶
func GenerateDataIndexWorkflowProperties(workflow *operatorapi.SonataFlow, platform *operatorapi.SonataFlowPlatform) (*properties.Properties, error)
GenerateDataIndexWorkflowProperties returns the set of application properties required for the workflow to interact with the Data Index. For the calculation this function considers if the Data Index is present in the SonataFlowPlatform, if not present, no properties. Never nil.
func GenerateJobServiceWorkflowProperties ¶
func GenerateJobServiceWorkflowProperties(workflow *operatorapi.SonataFlow, platform *operatorapi.SonataFlowPlatform) (*properties.Properties, error)
GenerateJobServiceWorkflowProperties returns the set of application properties required for the workflow to interact with the Job Service. For the calculation this function considers if the Job Service is present in the SonataFlowPlatform, if not present, no properties. Never nil.
func GenerateServiceURL ¶
func SetServiceUrlsInWorkflowStatus ¶
func SetServiceUrlsInWorkflowStatus(pl *operatorapi.SonataFlowPlatform, workflow *operatorapi.SonataFlow)
Types ¶
type DataIndexHandler ¶
type DataIndexHandler struct {
// contains filtered or unexported fields
}
func (DataIndexHandler) ConfigurePersistence ¶
func (d DataIndexHandler) ConfigurePersistence(containerSpec *corev1.Container) *corev1.Container
func (DataIndexHandler) GenerateServiceProperties ¶
func (d DataIndexHandler) GenerateServiceProperties() (*properties.Properties, error)
func (DataIndexHandler) GetContainerName ¶
func (d DataIndexHandler) GetContainerName() string
func (DataIndexHandler) GetEnvironmentVariables ¶
func (d DataIndexHandler) GetEnvironmentVariables() []corev1.EnvVar
func (DataIndexHandler) GetLocalServiceBaseUrl ¶
func (d DataIndexHandler) GetLocalServiceBaseUrl() string
func (DataIndexHandler) GetPodResourceRequirements ¶
func (d DataIndexHandler) GetPodResourceRequirements() corev1.ResourceRequirements
func (DataIndexHandler) GetReplicaCount ¶
func (d DataIndexHandler) GetReplicaCount() int32
func (DataIndexHandler) GetServiceBaseUrl ¶
func (d DataIndexHandler) GetServiceBaseUrl() string
func (DataIndexHandler) GetServiceCmName ¶
func (d DataIndexHandler) GetServiceCmName() string
func (DataIndexHandler) GetServiceImageName ¶
func (d DataIndexHandler) GetServiceImageName(persistenceType constants.PersistenceType) string
func (DataIndexHandler) GetServiceName ¶
func (d DataIndexHandler) GetServiceName() string
func (DataIndexHandler) IsServiceEnabled ¶
func (d DataIndexHandler) IsServiceEnabled() bool
func (DataIndexHandler) IsServiceEnabledInSpec ¶
func (d DataIndexHandler) IsServiceEnabledInSpec() bool
func (DataIndexHandler) IsServiceSetInSpec ¶
func (d DataIndexHandler) IsServiceSetInSpec() bool
func (DataIndexHandler) MergeContainerSpec ¶
func (DataIndexHandler) MergePodSpec ¶
func (DataIndexHandler) SetServiceUrlInPlatformStatus ¶
func (d DataIndexHandler) SetServiceUrlInPlatformStatus(clusterRefPlatform *operatorapi.SonataFlowPlatform)
func (DataIndexHandler) SetServiceUrlInWorkflowStatus ¶
func (d DataIndexHandler) SetServiceUrlInWorkflowStatus(workflow *operatorapi.SonataFlow)
type JobServiceHandler ¶
type JobServiceHandler struct {
// contains filtered or unexported fields
}
func (JobServiceHandler) ConfigurePersistence ¶
func (j JobServiceHandler) ConfigurePersistence(containerSpec *corev1.Container) *corev1.Container
func (JobServiceHandler) GenerateServiceProperties ¶
func (j JobServiceHandler) GenerateServiceProperties() (*properties.Properties, error)
func (JobServiceHandler) GetContainerName ¶
func (j JobServiceHandler) GetContainerName() string
func (JobServiceHandler) GetEnvironmentVariables ¶
func (j JobServiceHandler) GetEnvironmentVariables() []corev1.EnvVar
func (JobServiceHandler) GetLocalServiceBaseUrl ¶
func (j JobServiceHandler) GetLocalServiceBaseUrl() string
func (JobServiceHandler) GetPodResourceRequirements ¶
func (j JobServiceHandler) GetPodResourceRequirements() corev1.ResourceRequirements
func (JobServiceHandler) GetReplicaCount ¶
func (j JobServiceHandler) GetReplicaCount() int32
func (JobServiceHandler) GetServiceBaseUrl ¶
func (j JobServiceHandler) GetServiceBaseUrl() string
func (JobServiceHandler) GetServiceCmName ¶
func (j JobServiceHandler) GetServiceCmName() string
func (JobServiceHandler) GetServiceImageName ¶
func (j JobServiceHandler) GetServiceImageName(persistenceType constants.PersistenceType) string
func (JobServiceHandler) GetServiceName ¶
func (j JobServiceHandler) GetServiceName() string
func (JobServiceHandler) IsServiceEnabled ¶
func (j JobServiceHandler) IsServiceEnabled() bool
func (JobServiceHandler) IsServiceEnabledInSpec ¶
func (j JobServiceHandler) IsServiceEnabledInSpec() bool
func (JobServiceHandler) IsServiceSetInSpec ¶
func (j JobServiceHandler) IsServiceSetInSpec() bool
func (JobServiceHandler) MergeContainerSpec ¶
func (JobServiceHandler) MergePodSpec ¶
func (JobServiceHandler) SetServiceUrlInPlatformStatus ¶
func (j JobServiceHandler) SetServiceUrlInPlatformStatus(clusterRefPlatform *operatorapi.SonataFlowPlatform)
func (JobServiceHandler) SetServiceUrlInWorkflowStatus ¶
func (j JobServiceHandler) SetServiceUrlInWorkflowStatus(workflow *operatorapi.SonataFlow)
type PlatformServiceHandler ¶
type PlatformServiceHandler interface { // GetContainerName returns the name of the service's container in the deployment. GetContainerName() string // GetServiceImageName returns the image name of the service's container. It takes in the service and persistence types and returns a string // that contains the FQDN of the image, including the tag. GetServiceImageName(persistenceName constants.PersistenceType) string // GetServiceName returns the name of the kubernetes service prefixed with the platform name GetServiceName() string // GetServiceCmName returns the name of the configmap associated to the service GetServiceCmName() string // GetEnvironmentVariables returns the env variables to be injected to the service container GetEnvironmentVariables() []corev1.EnvVar // GetPodResourceRequirements returns the pod's memory and CPU resource requirements // Values for job service taken from // https://github.com/parodos-dev/orchestrator-helm-chart/blob/52d09eda56fdbed3060782df29847c97f172600f/charts/orchestrator/values.yaml#L68-L72 GetPodResourceRequirements() corev1.ResourceRequirements // GetReplicaCount Returns the default pod replica count for the given service GetReplicaCount() int32 // MergeContainerSpec performs a merge with override using the containerSpec argument and the expected values based on the service's pod template specifications. The returning // object is the merged result MergeContainerSpec(containerSpec *corev1.Container) (*corev1.Container, error) // ConfigurePersistence sets the persistence's image and environment values when it is defined in the Persistence field of the service, overriding any existing value. ConfigurePersistence(containerSpec *corev1.Container) *corev1.Container // MergePodSpec performs a merge with override between the podSpec argument and the expected values based on the service's pod template specification. The returning // object is the result of the merge MergePodSpec(podSpec corev1.PodSpec) (corev1.PodSpec, error) // GenerateServiceProperties returns a property object that contains the application properties required by the service deployment GenerateServiceProperties() (*properties.Properties, error) // IsServiceSetInSpec returns true if the service is set in the spec. IsServiceSetInSpec() bool // IsServiceEnabledInSpec returns true if the service is enabled in the spec. IsServiceEnabledInSpec() bool // GetLocalServiceBaseUrl returns the base url of the local service GetLocalServiceBaseUrl() string // GetServiceBaseUrl returns the base url of the service, based on whether using local or cluster-scoped service. GetServiceBaseUrl() string // IsServiceEnabled returns true if the service is enabled in either the spec or the status.clusterPlatformRef. IsServiceEnabled() bool // SetServiceUrlInPlatformStatus sets the service url in the platform's status. if reconciled instance does not have service set in spec AND // if cluster referenced platform has said service enabled, use the cluster platform's service SetServiceUrlInPlatformStatus(clusterRefPlatform *operatorapi.SonataFlowPlatform) // SetServiceUrlInWorkflowStatus sets the service url in a workflow's status. SetServiceUrlInWorkflowStatus(workflow *operatorapi.SonataFlow) }
func NewDataIndexHandler ¶
func NewDataIndexHandler(platform *operatorapi.SonataFlowPlatform) PlatformServiceHandler
func NewJobServiceHandler ¶
func NewJobServiceHandler(platform *operatorapi.SonataFlowPlatform) PlatformServiceHandler
type ServiceAppPropertyHandler ¶
type ServiceAppPropertyHandler interface { WithUserProperties(userProperties string) ServiceAppPropertyHandler Build() string }
func NewServiceAppPropertyHandler ¶
func NewServiceAppPropertyHandler(serviceHandler PlatformServiceHandler) (ServiceAppPropertyHandler, error)
NewServiceAppPropertyHandler creates the default service configurations property handler The set of properties is initialized with the operator provided immutable properties. The set of defaultManagedProperties is initialized with the operator provided properties that the user might override.