shared

package
v1.33.0 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureProject

func EnsureProject(kubeCli *client.Client, project string) (string, error)

EnsureProject verifies whether the given project is a valid string in the context and whether it exists in the cluster

func GetCurrentNamespaceFromKubeConfig

func GetCurrentNamespaceFromKubeConfig() string

GetCurrentNamespaceFromKubeConfig gets the current namespace from the .kubeconfig file registered in the local machine

func IsKogitoCRDsAvailable

func IsKogitoCRDsAvailable(client *kogitocli.Client) bool

IsKogitoCRDsAvailable detects if the CRDs for kogito-operator are available or not

func SetCurrentNamespaceToKubeConfig

func SetCurrentNamespaceToKubeConfig(namespace string) error

SetCurrentNamespaceToKubeConfig sets the current namespace to the .kubeconfig file

Types

type ResourceCheckService

type ResourceCheckService interface {
	EnsureProject(kubeCli *client.Client, project string) (string, error)
	CheckKogitoRuntimeExists(kubeCli *client.Client, name string, namespace string) error
	CheckKogitoRuntimeNotExists(kubeCli *client.Client, name string, namespace string) error
	CheckKogitoBuildExists(kubeCli *client.Client, name string, project string) error
	CheckKogitoBuildNotExists(kubeCli *client.Client, name string, namespace string) error
	CheckKogitoInfraExists(kubeCli *client.Client, name string, namespace string) error
}

ResourceCheckService is interface to check K8 resource existence

func NewResourceCheckService

func NewResourceCheckService() ResourceCheckService

NewResourceCheckService create and return resourceCheckServiceImpl value

type ServicesInstallation

type ServicesInstallation interface {
	// InstallBuildService build kogito service.
	// Depends on the Operator, install it first.
	InstallBuildService(build *v1beta1.KogitoBuild) ServicesInstallation
	// InstallRuntimeService deploy Runtime service.
	// Depends on the Operator, install it first.
	InstallRuntimeService(runtime *v1beta1.KogitoRuntime) ServicesInstallation
	// InstallSupportingService installs supporting services. If no reference provided, it will install the default instance.
	// Depends on the Operator, install it first.
	InstallSupportingService(supportingService *v1beta1.KogitoSupportingService) ServicesInstallation
	// InstallInfraResource install kogito Infra.
	// Depends on the Operator, install it first.
	InstallInfraResource(infra *v1beta1.KogitoInfra) ServicesInstallation
	// CheckOperatorCRDs checks whether the CRDs are available on the cluster or not
	CheckOperatorCRDs() ServicesInstallation
	// GetError return any given error during the installation process
	GetError() error
}

ServicesInstallation provides an interface for handling infrastructure services installation

func ServicesInstallationBuilder

func ServicesInstallationBuilder(client *kogitocli.Client, namespace string) ServicesInstallation

ServicesInstallationBuilder creates the basic structure for services installation definition.

Jump to

Keyboard shortcuts

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