api

package
v1.4.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (

	// MonitoringDefaultPath default path
	MonitoringDefaultPath = "/metrics"

	// MonitoringDefaultScheme default scheme
	MonitoringDefaultScheme = "http"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ArtifactInterface

type ArtifactInterface interface {
	GetGroupID() string
	SetGroupID(groupID string)
	GetArtifactID() string
	SetArtifactID(artifactID string)
	GetVersion() string
	SetVersion(version string)
}

ArtifactInterface ...

type BuildsInterface

type BuildsInterface interface {
	GetNew() []string
	SetNew(newBuilds []string)
	GetPending() []string
	SetPending(pendingBuilds []string)
	GetRunning() []string
	SetRunning(runningBuilds []string)
	GetComplete() []string
	SetComplete(completeBuilds []string)
	GetFailed() []string
	SetFailed(failedBuilds []string)
	GetError() []string
	SetError(errorBuilds []string)
	GetCancelled() []string
	SetCancelled(cancelled []string)
}

BuildsInterface ...

type ConditionInterface

type ConditionInterface interface {
	GetType() ConditionType
	GetStatus() corev1.ConditionStatus
	GetLastTransitionTime() metav1.Time
	GetReason() KogitoServiceConditionReason
	GetMessage() string
}

ConditionInterface defines the detailed condition for the resource

type ConditionMetaInterface

type ConditionMetaInterface interface {
	SetDeployed() bool
	SetProvisioning() bool
	SetFailed(reason KogitoServiceConditionReason, err error)
	GetConditions() []ConditionInterface
	SetConditions(conditions []ConditionInterface)
}

ConditionMetaInterface defines the base information for kogito services conditions

type ConditionType

type ConditionType string

ConditionType is the type of condition

const (
	// DeployedConditionType - The KogitoService is deployed
	DeployedConditionType ConditionType = "Deployed"
	// ProvisioningConditionType - The KogitoService is being provisioned
	ProvisioningConditionType ConditionType = "Provisioning"
	// FailedConditionType - The KogitoService is in a failed state
	FailedConditionType ConditionType = "Failed"
)

type ConfigVolumeInterface

type ConfigVolumeInterface interface {
	ConfigVolumeSourceInterface
	GetName() string
	SetName(name string)
	ToKubeVolume() v1.Volume
}

ConfigVolumeInterface ...

type ConfigVolumeSourceInterface

type ConfigVolumeSourceInterface interface {
	GetSecret() *v1.SecretVolumeSource
	SetSecret(secret *v1.SecretVolumeSource)
	GetConfigMap() *v1.ConfigMapVolumeSource
	SetConfigMap(configMap *v1.ConfigMapVolumeSource)
}

ConfigVolumeSourceInterface ...

type GitSourceInterface

type GitSourceInterface interface {
	GetURI() string
	SetURI(uri string)
	GetReference() string
	SetReference(reference string)
	GetContextDir() string
	SetContextDir(context string)
}

GitSourceInterface ...

type Image

type Image struct {
	Domain    string `json:"domain,omitempty"`
	Namespace string `json:"namespace,omitempty"`
	Name      string `json:"name,omitempty"`
	Tag       string `json:"tag,omitempty"`
}

Image is a definition of a Docker image.

func (*Image) IsEmpty

func (i *Image) IsEmpty() bool

IsEmpty verifies if this Image instance is empty.

func (*Image) String

func (i *Image) String() string

String representation of this Image.

type KogitoBuildConditionReason

type KogitoBuildConditionReason string

KogitoBuildConditionReason ...

const (
	// OperatorFailureReason when operator fails to reconcile.
	OperatorFailureReason KogitoBuildConditionReason = "OperatorFailure"
	// BuildFailureReason when build fails.
	BuildFailureReason KogitoBuildConditionReason = "BuildFailure"
)

type KogitoBuildConditionType

type KogitoBuildConditionType string

KogitoBuildConditionType ...

const (
	// KogitoBuildSuccessful condition for a successful build.
	KogitoBuildSuccessful KogitoBuildConditionType = "Successful"
	// KogitoBuildFailure condition for a failure build.
	KogitoBuildFailure KogitoBuildConditionType = "Failed"
	// KogitoBuildRunning condition for a running build.
	KogitoBuildRunning KogitoBuildConditionType = "Running"
)

type KogitoBuildConditionsInterface

type KogitoBuildConditionsInterface interface {
	GetType() KogitoBuildConditionType
	GetStatus() corev1.ConditionStatus
	GetLastTransitionTime() metav1.Time
	GetReason() KogitoBuildConditionReason
	GetMessage() string
}

KogitoBuildConditionsInterface ...

type KogitoBuildInterface

type KogitoBuildInterface interface {
	metav1.Object
	runtime.Object
	// GetSpec gets the Kogito Service specification structure.
	GetSpec() KogitoBuildSpecInterface
	// GetStatus gets the Kogito Service Status structure.
	GetStatus() KogitoBuildStatusInterface
}

KogitoBuildInterface ...

type KogitoBuildSpecInterface

type KogitoBuildSpecInterface interface {
	GetType() KogitoBuildType
	SetType(buildType KogitoBuildType)
	IsDisableIncremental() bool
	SetDisableIncremental(disableIncremental bool)
	GetEnv() []corev1.EnvVar
	SetEnv(env []corev1.EnvVar)
	GetGitSource() GitSourceInterface
	SetGitSource(gitSource GitSourceInterface)
	GetRuntime() RuntimeType
	SetRuntime(runtime RuntimeType)
	GetWebHooks() []WebHookSecretInterface
	SetWebHooks(webhooks []WebHookSecretInterface)
	IsNative() bool
	SetNative(native bool)
	GetResources() corev1.ResourceRequirements
	SetResources(resources corev1.ResourceRequirements)
	GetMavenMirrorURL() string
	SetMavenMirrorURL(mavenMirrorURL string)
	GetBuildImage() string
	SetBuildImage(buildImage string)
	GetRuntimeImage() string
	SetRuntimeImage(runtime string)
	GetTargetKogitoRuntime() string
	SetTargetKogitoRuntime(targetRuntime string)
	GetArtifact() ArtifactInterface
	SetArtifact(artifact ArtifactInterface)
	IsEnableMavenDownloadOutput() bool
	SetEnableMavenDownloadOutput(enableMavenDownloadOutput bool)
}

KogitoBuildSpecInterface ...

type KogitoBuildStatusInterface

type KogitoBuildStatusInterface interface {
	GetLatestBuild() string
	SetLatestBuild(latestBuild string)
	GetConditions() []KogitoBuildConditionsInterface
	SetConditions(conditions []KogitoBuildConditionsInterface)
	AddCondition(condition KogitoBuildConditionsInterface)
	GetBuilds() BuildsInterface
	SetBuilds(builds BuildsInterface)
}

KogitoBuildStatusInterface ...

type KogitoBuildType

type KogitoBuildType string

KogitoBuildType describes the build types supported by the KogitoBuild CR

const (
	// BinaryBuildType builds takes an uploaded binary file already compiled and creates a Kogito service image from it.
	BinaryBuildType KogitoBuildType = "Binary"
	// RemoteSourceBuildType builds pulls the source code from a Git repository, builds the binary and then the final Kogito service image.
	RemoteSourceBuildType KogitoBuildType = "RemoteSource"
	// LocalSourceBuildType builds takes an uploaded resource files such as DRL (rules), DMN (decision) or BPMN (process), builds the binary and the final Kogito service image.
	LocalSourceBuildType KogitoBuildType = "LocalSource"
)

type KogitoCloudEventInfoInterface

type KogitoCloudEventInfoInterface interface {
	GetType() string
	GetSource() string
}

KogitoCloudEventInfoInterface ...

type KogitoCloudEventsStatusInterface

type KogitoCloudEventsStatusInterface interface {
	GetConsumes() []KogitoCloudEventInfoInterface
	SetConsumes(consumes []KogitoCloudEventInfoInterface)
	GetProduces() []KogitoCloudEventInfoInterface
	SetProduces(produces []KogitoCloudEventInfoInterface)
}

KogitoCloudEventsStatusInterface ...

type KogitoInfraConditionInterface

type KogitoInfraConditionInterface interface {
	GetType() KogitoInfraConditionType
	SetType(infraConditionType KogitoInfraConditionType)
	GetStatus() v1.ConditionStatus
	SetStatus(status v1.ConditionStatus)
	GetLastTransitionTime() metav1.Time
	SetLastTransitionTime(lastTransitionTime metav1.Time)
	GetMessage() string
	SetMessage(message string)
	GetReason() KogitoInfraConditionReason
	SetReason(reason KogitoInfraConditionReason)
}

KogitoInfraConditionInterface ...

type KogitoInfraConditionReason

type KogitoInfraConditionReason string

KogitoInfraConditionReason describes the reasons for reconciliation failure

const (
	// ReconciliationFailure generic failure on reconciliation
	ReconciliationFailure KogitoInfraConditionReason = "ReconciliationFailure"
	// ResourceNotFound target resource not found
	ResourceNotFound KogitoInfraConditionReason = "ResourceNotFound"
	// ResourceAPINotFound API not available in the cluster
	ResourceAPINotFound KogitoInfraConditionReason = "ResourceAPINotFound"
	// UnsupportedAPIKind API defined in the KogitoInfra CR not supported
	UnsupportedAPIKind KogitoInfraConditionReason = "UnsupportedAPIKind"
	// ResourceNotReady related resource is not ready
	ResourceNotReady KogitoInfraConditionReason = "ResourceNotReady"
	// ResourceConfigError related resource is not configured properly
	ResourceConfigError KogitoInfraConditionReason = "ResourceConfigError"
	// ResourceMissingResourceConfig related resource is missing a config information to continue
	ResourceMissingResourceConfig KogitoInfraConditionReason = "ResourceMissingConfig"
)

type KogitoInfraConditionType

type KogitoInfraConditionType string

KogitoInfraConditionType ...

const (
	// SuccessInfraConditionType ...
	SuccessInfraConditionType KogitoInfraConditionType = "Success"
	// FailureInfraConditionType ...
	FailureInfraConditionType KogitoInfraConditionType = "Failure"
)

type KogitoInfraInterface

type KogitoInfraInterface interface {
	metav1.Object
	runtime.Object
	// GetSpec gets the Kogito Service specification structure.
	GetSpec() KogitoInfraSpecInterface
	// GetStatus gets the Kogito Service Status structure.
	GetStatus() KogitoInfraStatusInterface
}

KogitoInfraInterface ...

type KogitoInfraSpecInterface

type KogitoInfraSpecInterface interface {
	GetResource() ResourceInterface
	GetInfraProperties() map[string]string
}

KogitoInfraSpecInterface ...

type KogitoInfraStatusInterface

type KogitoInfraStatusInterface interface {
	GetCondition() KogitoInfraConditionInterface
	SetCondition(condition KogitoInfraConditionInterface)
	GetRuntimeProperties() RuntimePropertiesMap
	AddRuntimeProperties(runtimeType RuntimeType, runtimeProperties RuntimePropertiesInterface)
	GetVolumes() []KogitoInfraVolumeInterface
	SetVolumes(infraVolumes []KogitoInfraVolumeInterface)
}

KogitoInfraStatusInterface ...

type KogitoInfraVolumeInterface

type KogitoInfraVolumeInterface interface {
	GetMount() v1.VolumeMount
	GetNamedVolume() ConfigVolumeInterface
}

KogitoInfraVolumeInterface ...

type KogitoProbeInterface

type KogitoProbeInterface interface {
	GetLivenessProbe() corev1.Probe
	SetLivenessProbe(livenessProbe corev1.Probe)
	GetReadinessProbe() corev1.Probe
	SetReadinessProbe(readinessProbe corev1.Probe)
}

KogitoProbeInterface ...

type KogitoRuntimeInterface

type KogitoRuntimeInterface interface {
	KogitoService
	// GetSpec gets the Kogito Service specification structure.
	GetRuntimeSpec() KogitoRuntimeSpecInterface
	// GetStatus gets the Kogito Service Status structure.
	GetRuntimeStatus() KogitoRuntimeStatusInterface
}

KogitoRuntimeInterface ...

type KogitoRuntimeListInterface

type KogitoRuntimeListInterface interface {
	runtime.Object
	// GetItems gets all items
	GetItems() []KogitoRuntimeInterface
}

KogitoRuntimeListInterface ...

type KogitoRuntimeSpecInterface

type KogitoRuntimeSpecInterface interface {
	KogitoServiceSpecInterface
	IsEnableIstio() bool
	SetEnableIstio(enableIstio bool)
}

KogitoRuntimeSpecInterface ...

type KogitoRuntimeStatusInterface

type KogitoRuntimeStatusInterface interface {
	KogitoServiceStatusInterface
}

KogitoRuntimeStatusInterface ...

type KogitoService

type KogitoService interface {
	metav1.Object
	runtime.Object
	// GetSpec gets the Kogito Service specification structure.
	GetSpec() KogitoServiceSpecInterface
	// GetStatus gets the Kogito Service Status structure.
	GetStatus() KogitoServiceStatusInterface
}

KogitoService defines the interface for any Kogito service that the operator can handle, e.g. Data Index, Jobs Service, Runtimes, etc.

type KogitoServiceConditionReason

type KogitoServiceConditionReason string

KogitoServiceConditionReason is the type of reason

const (
	// CreateResourceFailedReason - Unable to create the requested resources
	CreateResourceFailedReason KogitoServiceConditionReason = "CreateResourceFailed"
	// KogitoInfraNotReadyReason - Unable to deploy Kogito Infra
	KogitoInfraNotReadyReason KogitoServiceConditionReason = "KogitoInfraNotReadyReason"
	// ServiceReconciliationFailure - Unable to determine the error
	ServiceReconciliationFailure KogitoServiceConditionReason = "ReconciliationFailure"
	// MessagingIntegrationFailureReason ...
	MessagingIntegrationFailureReason KogitoServiceConditionReason = "MessagingProvisionFailure"
	// MonitoringIntegrationFailureReason ...
	MonitoringIntegrationFailureReason KogitoServiceConditionReason = "MonitoringIntegrationFailure"
	// InternalServiceNotReachable ...
	InternalServiceNotReachable KogitoServiceConditionReason = "InternalServiceNotReachable"
)

type KogitoServiceList

type KogitoServiceList interface {
	runtime.Object
	// GetItems get all items
	GetItems() []KogitoService
}

KogitoServiceList defines a base interface for Kogito Service list.

type KogitoServiceSpecInterface

type KogitoServiceSpecInterface interface {
	GetReplicas() *int32
	SetReplicas(replicas int32)
	GetEnvs() []corev1.EnvVar
	SetEnvs(envs []corev1.EnvVar)
	AddEnvironmentVariable(name, value string)
	AddEnvironmentVariableFromSecret(variableName, secretName, secretKey string)
	GetImage() string
	SetImage(image string)
	GetResources() corev1.ResourceRequirements
	SetResources(resources corev1.ResourceRequirements)
	AddResourceRequest(name, value string)
	AddResourceLimit(name, value string)
	GetDeploymentLabels() map[string]string
	SetDeploymentLabels(labels map[string]string)
	AddDeploymentLabel(name, value string)
	GetServiceLabels() map[string]string
	SetServiceLabels(labels map[string]string)
	AddServiceLabel(name, value string)
	GetRuntime() RuntimeType
	IsInsecureImageRegistry() bool
	GetPropertiesConfigMap() string
	GetInfra() []string
	AddInfra(name string)
	GetMonitoring() MonitoringInterface
	SetMonitoring(monitoring MonitoringInterface)
	GetConfig() map[string]string
	GetProbes() KogitoProbeInterface
	SetProbes(probes KogitoProbeInterface)
}

KogitoServiceSpecInterface defines the interface for the Kogito service specification, it's the basic structure for any Kogito service.

type KogitoServiceStatusInterface

type KogitoServiceStatusInterface interface {
	ConditionMetaInterface
	GetDeploymentConditions() []appsv1.DeploymentCondition
	SetDeploymentConditions(deploymentConditions []appsv1.DeploymentCondition)
	GetImage() string
	SetImage(image string)
	GetExternalURI() string
	SetExternalURI(uri string)
	GetCloudEvents() KogitoCloudEventsStatusInterface
	SetCloudEvents(cloudEvents KogitoCloudEventsStatusInterface)
}

KogitoServiceStatusInterface defines the basic interface for the Kogito Service status.

type KogitoSupportingServiceInterface

type KogitoSupportingServiceInterface interface {
	KogitoService
	// GetSpec gets the Kogito Service specification structure.
	GetSupportingServiceSpec() KogitoSupportingServiceSpecInterface
	// GetStatus gets the Kogito Service Status structure.
	GetSupportingServiceStatus() KogitoSupportingServiceStatusInterface
}

KogitoSupportingServiceInterface ...

type KogitoSupportingServiceListInterface

type KogitoSupportingServiceListInterface interface {
	runtime.Object
	// GetItems gets all items
	GetItems() []KogitoSupportingServiceInterface
}

KogitoSupportingServiceListInterface ...

type KogitoSupportingServiceSpecInterface

type KogitoSupportingServiceSpecInterface interface {
	KogitoServiceSpecInterface
	GetServiceType() ServiceType
	SetServiceType(serviceType ServiceType)
}

KogitoSupportingServiceSpecInterface ...

type KogitoSupportingServiceStatusInterface

type KogitoSupportingServiceStatusInterface interface {
	KogitoServiceStatusInterface
}

KogitoSupportingServiceStatusInterface ...

type MonitoringInterface

type MonitoringInterface interface {
	GetScheme() string
	SetScheme(scheme string)
	GetPath() string
	SetPath(path string)
}

MonitoringInterface ...

type ResourceInterface

type ResourceInterface interface {
	GetAPIVersion() string
	GetKind() string
	GetNamespace() string
	GetName() string
}

ResourceInterface ...

type RuntimePropertiesInterface

type RuntimePropertiesInterface interface {
	GetAppProps() map[string]string
	GetEnv() []v1.EnvVar
}

RuntimePropertiesInterface ...

type RuntimePropertiesMap

type RuntimePropertiesMap map[RuntimeType]RuntimePropertiesInterface

RuntimePropertiesMap defines the map that KogitoInfraStatus will use to link the runtime to their variables.

type RuntimeType

type RuntimeType string

RuntimeType - type of condition.

const (
	// QuarkusRuntimeType Runtime for quarkus application
	QuarkusRuntimeType RuntimeType = "quarkus"
	// SpringBootRuntimeType Runtime for springboot application
	SpringBootRuntimeType RuntimeType = "springboot"
)

type ServiceType

type ServiceType string

ServiceType define resource type of supporting service

const (
	// DataIndex supporting service resource type
	DataIndex ServiceType = "DataIndex"
	// Explainability supporting service resource type
	Explainability ServiceType = "Explainability"
	// JobsService supporting service resource type
	JobsService ServiceType = "JobsService"
	// MgmtConsole supporting service resource type
	MgmtConsole ServiceType = "MgmtConsole"
	// TaskConsole supporting service resource type
	TaskConsole ServiceType = "TaskConsole"
	// TrustyAI supporting service resource type
	TrustyAI ServiceType = "TrustyAI"
	// TrustyUI supporting service resource type
	TrustyUI ServiceType = "TrustyUI"
)

type WebHookSecretInterface

type WebHookSecretInterface interface {
	GetType() WebHookType
	GetSecret() string
}

WebHookSecretInterface ...

type WebHookType

type WebHookType string

WebHookType literal type to distinguish between different types of webHooks.

const (
	// GitHubWebHook GitHub webHook.
	GitHubWebHook WebHookType = "GitHub"
	// GenericWebHook Generic webHook.
	GenericWebHook WebHookType = "Generic"
)

Directories

Path Synopsis
Package v1beta1 contains API Schema definitions for the app v1beta1 API group +k8s:deepcopy-gen=package,register +groupName=app.kiegroup.org Package v1beta1 contains API Schema definitions for the app v1beta1 API group +kubebuilder:object:generate=true +groupName=app.kiegroup.org
Package v1beta1 contains API Schema definitions for the app v1beta1 API group +k8s:deepcopy-gen=package,register +groupName=app.kiegroup.org Package v1beta1 contains API Schema definitions for the app v1beta1 API group +kubebuilder:object:generate=true +groupName=app.kiegroup.org

Jump to

Keyboard shortcuts

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