kogitoservice

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2021 License: Apache-2.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// AppPropContentHashKey is the annotation key for the content hash of application.properties
	AppPropContentHashKey = "appPropContentHash"
	// ConfigMapApplicationPropertyKey is the file name used as a key for ConfigMaps mounted in Kogito services deployments
	ConfigMapApplicationPropertyKey = "application.properties"
)
View Source
const (
	// AppPropVolumeName is the name of the volume for application.properties
	AppPropVolumeName = "app-prop-config"
)

Variables

This section is empty.

Functions

func IsKafkaResource

func IsKafkaResource(instance api.KogitoInfraInterface) bool

IsKafkaResource checks if provided KogitoInfra instance is for kafka resource

Types

type AppPropsConfigMapHandler

type AppPropsConfigMapHandler interface {
	GetAppPropConfigMapContentHash(service api.KogitoService, appProps map[string]string) (string, *corev1.ConfigMap, error)
}

AppPropsConfigMapHandler ...

func NewAppPropsConfigMapHandler

func NewAppPropsConfigMapHandler(context *operator.Context) AppPropsConfigMapHandler

NewAppPropsConfigMapHandler ...

type AppPropsVolumeHandler

type AppPropsVolumeHandler interface {
	CreateAppPropVolume(service api.KogitoService) corev1.Volume
	CreateAppPropVolumeMount() corev1.VolumeMount
}

AppPropsVolumeHandler ...

func NewAppPropsVolumeHandler

func NewAppPropsVolumeHandler() AppPropsVolumeHandler

NewAppPropsVolumeHandler ...

type DeploymentHandler

type DeploymentHandler interface {
	CreateRequiredDeployment(service api.KogitoService, resolvedImage string, definition ServiceDefinition) *appsv1.Deployment
	IsDeploymentAvailable(kogitoService api.KogitoService) (bool, error)
}

DeploymentHandler ...

func NewDeploymentHandler

func NewDeploymentHandler(context *operator.Context) DeploymentHandler

NewDeploymentHandler ...

type FinalizerHandler

type FinalizerHandler interface {
	AddFinalizer(instance api.KogitoService) error
	HandleFinalization(instance api.KogitoService) error
}

FinalizerHandler ...

func NewFinalizerHandler

func NewFinalizerHandler(context *operator.Context, infraHandler manager.KogitoInfraHandler) FinalizerHandler

NewFinalizerHandler ...

type GrafanaDashboard

type GrafanaDashboard struct {
	Name             string
	RawJSONDashboard string
}

GrafanaDashboard is a structure that contains the fetched dashboards

type GrafanaDashboardManager

type GrafanaDashboardManager interface {
	ConfigureGrafanaDashboards(kogitoService api.KogitoService) error
}

GrafanaDashboardManager ...

func NewGrafanaDashboardManager

func NewGrafanaDashboardManager(context *operator.Context) GrafanaDashboardManager

NewGrafanaDashboardManager ...

type HealthCheckProbeType

type HealthCheckProbeType string

HealthCheckProbeType defines the supported probes for the ServiceDefinition

const (
	// QuarkusHealthCheckProbe probe implemented with Quarkus Microprofile Health. See: https://quarkus.io/guides/microprofile-health.
	// the operator will set the probe to the default path /health/live and /health/ready for liveness and readiness probes, respectively.
	QuarkusHealthCheckProbe HealthCheckProbeType = "quarkus"
	// TCPHealthCheckProbe default health check probe that binds to port 8080
	TCPHealthCheckProbe HealthCheckProbeType = "TCP"
)

type MessagingDeployer

type MessagingDeployer interface {
	CreateRequiredResources(service api.KogitoService) error
}

MessagingDeployer ...

func NewKafkaMessagingDeployer

func NewKafkaMessagingDeployer(context *operator.Context, definition ServiceDefinition, infraHandler manager.KogitoInfraHandler) MessagingDeployer

NewKafkaMessagingDeployer handles messaging resources creation. These resources can be required by the deployed service through a bound KogitoInfra.

func NewKnativeMessagingDeployer

func NewKnativeMessagingDeployer(context *operator.Context, definition ServiceDefinition, infraHandler manager.KogitoInfraHandler) MessagingDeployer

NewKnativeMessagingDeployer ...

type PrometheusManager

type PrometheusManager interface {
	ConfigurePrometheus(kogitoService api.KogitoService) error
}

PrometheusManager ...

func NewPrometheusManager

func NewPrometheusManager(context *operator.Context) PrometheusManager

NewPrometheusManager ...

type ServiceDefinition

type ServiceDefinition struct {
	// DefaultImageName is the name of the default image distributed for Kogito, e.g. kogito-jobs-service, kogito-data-index and so on
	// can be empty, in this case Request.Name will be used as image name
	DefaultImageName string
	// DefaultImageTag is the default image tag to use for this service. If left empty, will use the minor version of the operator, e.g. 0.11
	DefaultImageTag string
	// Request made for the service
	Request controller.Request
	// OnDeploymentCreate applies custom deployment configuration in the required Deployment resource
	OnDeploymentCreate func(deployment *appsv1.Deployment) error
	// OnObjectsCreate applies custom object creation in the service deployment logic.
	// E.g. if you need an additional Kubernetes resource, just create your own map that the API will append to its managed resources.
	// The "objectLists" array is the List object reference of the types created.
	// For example: if a ConfigMap is created, then ConfigMapList empty reference should be added to this list
	OnObjectsCreate func(kogitoService api.KogitoService) (resources map[reflect.Type][]resource.KubernetesResource, objectLists []runtime.Object, err error)
	// OnGetComparators is called during the deployment phase to compare the deployed resources against the created ones
	// Use this hook to add your comparators to override a specific comparator or to add your own if you have created extra objects via OnObjectsCreate
	// Use framework.NewComparatorBuilder() to build your own
	OnGetComparators func(comparator compare.ResourceComparator)
	// SingleReplica if set to true, avoids that the service has more than one pod replica
	SingleReplica bool
	// KafkaTopics is a collection of Kafka Topics to be created within the service
	KafkaTopics []string
	// HealthCheckProbe is the probe that needs to be configured in the service. Defaults to TCPHealthCheckProbe
	HealthCheckProbe HealthCheckProbeType
	// CustomService indicates that the service can be built within the cluster
	// A custom service means that could be built by a third party, not being provided by the Kogito Team Services catalog (such as Data Index, Management Console and etc.).
	CustomService bool
	// contains filtered or unexported fields
}

ServiceDefinition defines the structure for a Kogito Service

type ServiceDeployer

type ServiceDeployer interface {
	// Deploy deploys the Kogito Service in the Kubernetes cluster according to a given ServiceDefinition
	Deploy() (reconcileAfter time.Duration, err error)
}

ServiceDeployer is the API to handle a Kogito Service deployment by Operator SDK controllers

func NewServiceDeployer

func NewServiceDeployer(context *operator.Context, definition ServiceDefinition, serviceType api.KogitoService, infraHandler manager.KogitoInfraHandler) ServiceDeployer

NewServiceDeployer creates a new ServiceDeployer to handle a custom Kogito Service instance to be handled by Operator SDK controller.

type ServiceHandler

type ServiceHandler interface {
	GetKogitoServiceEndpoint(kogitoService api.KogitoService) string
}

ServiceHandler ...

func NewKogitoServiceHandler

func NewKogitoServiceHandler(context *operator.Context) ServiceHandler

NewKogitoServiceHandler ...

type StatusHandler

type StatusHandler interface {
	HandleStatusUpdate(instance api.KogitoService, err *error)
}

StatusHandler ...

func NewStatusHandler

func NewStatusHandler(context *operator.Context) StatusHandler

NewStatusHandler ...

Jump to

Keyboard shortcuts

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