Documentation ¶
Index ¶
- Constants
- Variables
- func GetDefaultImageNamespace() string
- func GetDefaultImageRegistry() string
- func GetKogitoImageVersion() string
- func IsKafkaResource(apiVersion, kind string) bool
- func IsKnativeEventingResource(apiVersion, kind string) bool
- type ConfigMapHandler
- type DeploymentHandler
- type ImageHandler
- type ImageStreamHandler
- type InfinispanCredential
- type InfinispanHandler
- type InfinispanIdentity
- type KafkaHandler
- type KeycloakHandler
- type KnativeHandler
- type MongoDBHandler
- type RBACHandler
- type RouteHandler
- type ServiceHandler
Constants ¶
const ( // LatestTag the default name for latest image tag LatestTag = "latest" //RuntimeTypeKey Env key to switch between the runtime RuntimeTypeKey = "RUNTIME_TYPE" )
const ( // InfinispanSecretUsernameKey is the secret username key set in the linked secret InfinispanSecretUsernameKey = "username" // InfinispanSecretPasswordKey is the secret password key set in the linked secret InfinispanSecretPasswordKey = "password" // InfinispanIdentityFileName is the name of YAML file containing list of Infinispan credentials InfinispanIdentityFileName = "identities.yaml" // InfinispanKind CRD Kind for Infinispan server (as defined by Infinispan Operator) InfinispanKind = "Infinispan" // InfinispanInstanceName is the default name for Infinispan managed by KogitoInfra InfinispanInstanceName = "kogito-infinispan" )
const ( // KafkaKind refers to Kafka Kind as defined by Strimzi KafkaKind = "Kafka" // KafkaInstanceName is the default name for the Kafka cluster managed by KogitoInfra KafkaInstanceName = "kogito-kafka" )
const ( // MongoDBOperatorName is the MongoDB Operator default name MongoDBOperatorName = "mongodb-kubernetes-operator" // DefaultMongoDBAuthDatabase is the default authentication database in MongoDB DefaultMongoDBAuthDatabase = "admin" // DefaultMongoDBPasswordSecretRef is the default key for the secret reference in MongoDB DefaultMongoDBPasswordSecretRef = "password" // MongoDBKind refers to MongoDB Kind MongoDBKind = "MongoDB" // MongoDBAppSecretAuthDatabaseKey is the secret authentication database key set in the linked secret for an application MongoDBAppSecretAuthDatabaseKey = "auth-database" // MongoDBAppSecretDatabaseKey is the secret database key set in the linked secret for an application MongoDBAppSecretDatabaseKey = "database" // MongoDBAppSecretUsernameKey is the secret username key set in the linked secret for an application MongoDBAppSecretUsernameKey = "username" // MongoDBAppSecretPasswordKey is the secret password key set in the linked secret for an application MongoDBAppSecretPasswordKey = "password" )
const (
// KeycloakKind refers to Keycloak Kind
KeycloakKind = "Keycloak"
)
const (
// KnativeEventingBrokerKind is the Kind description for Knative Eventing Brokers
KnativeEventingBrokerKind = "Broker"
)
const (
// RuntimeServiceAccountName ...
RuntimeServiceAccountName = "kogito-service-viewer"
)
Variables ¶
var ( // InfinispanAPIVersion CRD API group version for Infinispan server (as defined by Infinispan Operator) InfinispanAPIVersion = ispn.SchemeGroupVersion.String() )
var ( // KafkaAPIVersion refers to kafka APIVersion KafkaAPIVersion = v1beta1.SchemeGroupVersion.String() )
var ( // KeycloakAPIVersion refers to kafka APIVersion KeycloakAPIVersion = v1alpha1.SchemeGroupVersion.String() )
var ( // KnativeEventingAPIVersion API Group version as defined by Knative Eventing operator KnativeEventingAPIVersion = eventingv1.SchemeGroupVersion.String() )
var ( // MongoDBAPIVersion refers to MongoDB APIVersion MongoDBAPIVersion = mongodb.SchemeGroupVersion.String() )
Functions ¶
func GetKogitoImageVersion ¶
func GetKogitoImageVersion() string
GetKogitoImageVersion gets the Kogito Runtime latest micro version based on the Operator current version E.g. Operator version is 0.9.0, the latest image version is 0.9.x-latest
func IsKafkaResource ¶
IsKafkaResource checks if provided KogitoInfra instance is for kafka resource
func IsKnativeEventingResource ¶
IsKnativeEventingResource checks if provided KogitoInfra instance is for Knative eventing resource
Types ¶
type ConfigMapHandler ¶
type ConfigMapHandler interface {
TakeConfigMapOwnership(key types.NamespacedName, owner resource.KubernetesResource) (updated bool, err error)
}
ConfigMapHandler ...
func NewConfigMapHandler ¶
func NewConfigMapHandler(context *operator.Context, recorder record.EventRecorder) ConfigMapHandler
NewConfigMapHandler ...
type DeploymentHandler ¶
type DeploymentHandler interface { FetchDeployment(key types.NamespacedName) (*appsv1.Deployment, error) FetchDeploymentList(namespace string) (*appsv1.DeploymentList, error) MustFetchDeployment(key types.NamespacedName) (*appsv1.Deployment, error) IsDeploymentAvailable(key types.NamespacedName) (bool, error) FetchReadyReplicas(key types.NamespacedName) (int32, error) }
DeploymentHandler ...
func NewDeploymentHandler ¶
func NewDeploymentHandler(context *operator.Context) DeploymentHandler
NewDeploymentHandler ...
type ImageHandler ¶
type ImageHandler interface { ResolveImage() (string, error) ResolveImageNameTag() string ResolveImageStreamTriggerAnnotation(containerName string) (key, value string) CreateImageStreamIfNotExists() (*imgv1.ImageStream, error) }
ImageHandler describes the handler structure to handle Kogito Services Images
func NewImageHandler ¶
func NewImageHandler(context *operator.Context, image *api.Image, defaultImageName, imageStreamName, namespace string, addFromReference, insecureImageRegistry bool) ImageHandler
NewImageHandler ...
type ImageStreamHandler ¶
type ImageStreamHandler interface { FetchImageStream(key types.NamespacedName) (*imgv1.ImageStream, error) MustFetchImageStream(key types.NamespacedName) (*imgv1.ImageStream, error) CreateImageStream(name, namespace, imageName, tag string, addFromReference, insecureImageRegistry bool) *imgv1.ImageStream }
ImageStreamHandler ...
func NewImageStreamHandler ¶
func NewImageStreamHandler(context *operator.Context) ImageStreamHandler
NewImageStreamHandler ...
type InfinispanCredential ¶
type InfinispanCredential struct { Username string `yaml:"username"` Password string `yaml:"password"` }
InfinispanCredential holds the information to authenticate into an infinispan server
type InfinispanHandler ¶
type InfinispanHandler interface { FetchInfinispanInstance(key types.NamespacedName) (*ispn.Infinispan, error) IsInfinispanAvailable() bool FetchInfinispanInstanceURI(key types.NamespacedName) (string, error) GetInfinispanCredential(infinispanInstance *ispn.Infinispan) (*InfinispanCredential, error) }
InfinispanHandler ...
func NewInfinispanHandler ¶
func NewInfinispanHandler(context *operator.Context) InfinispanHandler
NewInfinispanHandler ...
type InfinispanIdentity ¶
type InfinispanIdentity struct {
Credentials []InfinispanCredential `yaml:"credentials"`
}
InfinispanIdentity is the struct for the secret holding the credential for the Infinispan server
type KafkaHandler ¶
type KafkaHandler interface { IsStrimziAvailable() bool FetchKafkaInstance(key types.NamespacedName) (*v1beta1.Kafka, error) FetchKafkaTopic(key types.NamespacedName) (*v1beta1.KafkaTopic, error) CreateKafkaTopic(topicName, kafkaName, kafkaNamespace string) (*v1beta1.KafkaTopic, error) ResolveKafkaServerURI(kafka *v1beta1.Kafka) (string, error) }
KafkaHandler ...
func NewKafkaHandler ¶
func NewKafkaHandler(context *operator.Context) KafkaHandler
NewKafkaHandler ...
type KeycloakHandler ¶
type KeycloakHandler interface {
IsKeycloakAvailable() bool
}
KeycloakHandler ...
func NewKeycloakHandler ¶
func NewKeycloakHandler(context *operator.Context) KeycloakHandler
NewKeycloakHandler ...
type KnativeHandler ¶
type KnativeHandler interface { IsKnativeEventingAvailable() bool FetchBroker(key types.NamespacedName) (*eventingv1.Broker, error) }
KnativeHandler ...
func NewKnativeHandler ¶
func NewKnativeHandler(context *operator.Context) KnativeHandler
NewKnativeHandler ...
type MongoDBHandler ¶
type MongoDBHandler interface { IsMongoDBAvailable() bool IsMongoDBOperatorAvailable(namespace string) (bool, error) }
MongoDBHandler ...
func NewMongoDBHandler ¶
func NewMongoDBHandler(context *operator.Context) MongoDBHandler
NewMongoDBHandler ...
type RBACHandler ¶
RBACHandler ...
type RouteHandler ¶
type RouteHandler interface { FetchRoute(key types.NamespacedName) (*routev1.Route, error) GetHostFromRoute(routeKey types.NamespacedName) (string, error) CreateRoute(service *corev1.Service) (route *routev1.Route) }
RouteHandler ...
func NewRouteHandler ¶
func NewRouteHandler(context *operator.Context) RouteHandler
NewRouteHandler ...
type ServiceHandler ¶
type ServiceHandler interface {
CreateService(instance api.KogitoService, deployment *appsv1.Deployment) *corev1.Service
}
ServiceHandler ...
func NewServiceHandler ¶
func NewServiceHandler(context *operator.Context) ServiceHandler
NewServiceHandler ...
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package kafka contains kafka API versions.
|
Package kafka contains kafka API versions. |
v1beta1
Package v1beta1 contains API Schema definitions for the kafka v1beta1 API group +k8s:deepcopy-gen=package,register +groupName=kafka.strimzi.io +kubebuilder:skip Package v1beta1 contains API Schema definitions for the kafka v1beta1 API group +k8s:deepcopy-gen=package,register +groupName=kafka.strimzi.io
|
Package v1beta1 contains API Schema definitions for the kafka v1beta1 API group +k8s:deepcopy-gen=package,register +groupName=kafka.strimzi.io +kubebuilder:skip Package v1beta1 contains API Schema definitions for the kafka v1beta1 API group +k8s:deepcopy-gen=package,register +groupName=kafka.strimzi.io |