controller

package
v0.0.0-...-a46548e Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventDeleted  = "deleted"
	EventDeployed = "deployed"
	EventFailed   = "failed"
	EventUpdated  = "updated"
)

TODO use enum

Variables

This section is empty.

Functions

func Capitalize

func Capitalize(word string) string

func GetMacFromIeId

func GetMacFromIeId(ieId string) (string, error)

func GetService

func GetService(serviceComponent *llov1alpha1.ServiceComponentDocker) (string, error)

func GetServiceAndComponentNames

func GetServiceAndComponentNames(serviceComponent string) (string, string, error)

FIXME

func GetServiceComponentEntityId

func GetServiceComponentEntityId(serviceComponent string, service string) (string, error)

Types

type DockerApi

type DockerApi struct {
	Method      string                 `json:"method,omitempty"`
	Name        string                 `json:"name,omitempty"`
	Image       string                 `json:"image,omitempty"`
	Tag         string                 `json:"tag,omitempty"`
	Priviledged bool                   `json:"priviledged,omitempty"`
	Ports       []DockerApiPorts       `json:"ports,omitempty"`
	EnvVars     []llov1alpha1.KeyValue `json:"envVars,omitempty"`
	CliArgs     []llov1alpha1.KeyValue `json:"cliArgs,omitempty"`
	ContainerID string                 `json:"containerID,omitempty"`
}

type DockerApiPorts

type DockerApiPorts struct {
	Protocol      string `json:"protocol,omitempty"`
	ContainerPort int32  `json:"containerPort,omitempty"`
	HostPort      int32  `json:"hostPort,omitempty"`
}

type ServiceComponentDockerReconciler

type ServiceComponentDockerReconciler struct {
	client.Client
	Scheme              *runtime.Scheme
	CbClient            *contextbroker.ContextBroker
	Config              *config.Config
	IotaClient          *iotatangle.IotaClient
	NatsClient          *nats.NatsClient
	NotificationsClient *notifications.NotificationClient
}

ServiceComponentDockerReconciler reconciles a ServiceComponentDocker object

func (*ServiceComponentDockerReconciler) CreateContextBrokerCondition

func (r *ServiceComponentDockerReconciler) CreateContextBrokerCondition(serviceComponent *llov1alpha1.ServiceComponentDocker)

func (*ServiceComponentDockerReconciler) CreateContextBrokerFailedCondition

func (r *ServiceComponentDockerReconciler) CreateContextBrokerFailedCondition(serviceComponent *llov1alpha1.ServiceComponentDocker)

func (*ServiceComponentDockerReconciler) CreateInitializedCondition

func (r *ServiceComponentDockerReconciler) CreateInitializedCondition(serviceComponent *llov1alpha1.ServiceComponentDocker)

? create a condition for deployment and service

func (*ServiceComponentDockerReconciler) CreateNetworkingConfigurationCondition

func (r *ServiceComponentDockerReconciler) CreateNetworkingConfigurationCondition(serviceComponent *llov1alpha1.ServiceComponentDocker)

func (*ServiceComponentDockerReconciler) CreateUpdatedCondition

func (r *ServiceComponentDockerReconciler) CreateUpdatedCondition(serviceComponent *llov1alpha1.ServiceComponentDocker)

func (*ServiceComponentDockerReconciler) HandleCreate

func (*ServiceComponentDockerReconciler) HandleDelete

func (*ServiceComponentDockerReconciler) HandleUpdate

func (*ServiceComponentDockerReconciler) IsNewInstance

func (r *ServiceComponentDockerReconciler) IsNewInstance(serviceComponent *llov1alpha1.ServiceComponentDocker) bool

func (*ServiceComponentDockerReconciler) Reconcile

func (*ServiceComponentDockerReconciler) SendNotifications

func (r *ServiceComponentDockerReconciler) SendNotifications(serviceComponent *llov1alpha1.ServiceComponentDocker, event string, log logr.Logger) (err error)

Send Portal and IOTA notifications using predefined messages

func (*ServiceComponentDockerReconciler) SetupWithManager

func (r *ServiceComponentDockerReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

func (*ServiceComponentDockerReconciler) ShowServiceComponentLogs

func (r *ServiceComponentDockerReconciler) ShowServiceComponentLogs(serviceComponent *llov1alpha1.ServiceComponentDocker, log logr.Logger)

Jump to

Keyboard shortcuts

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