Documentation ¶
Index ¶
- Constants
- func AddApp(c client.Client, name string) error
- func AddAppVersion(c client.Client, namespace string, appName string, version string, ...) error
- func GetCmName(functionName string, spec *klcv1alpha3.RuntimeSpec) string
- func GetEvaluationDefinition(k8sclient client.Client, log logr.Logger, ctx context.Context, ...) (*klcv1alpha3.KeptnEvaluationDefinition, error)
- func GetItemStatus(name string, instanceStatus []klcv1alpha3.ItemStatus) klcv1alpha3.ItemStatus
- func GetOTelTracerProviderOptions(oTelCollectorUrl string) ([]trace.TracerProviderOption, trace.SpanExporter, error)
- func GetOldStatus(name string, statuses []klcv1alpha3.ItemStatus) apicommon.KeptnState
- func GetOtelInstance() *otelConfig
- func GetRuntimeImage(def *klcv1alpha3.KeptnTaskDefinition) string
- func GetRuntimeMountPath(def *klcv1alpha3.KeptnTaskDefinition) string
- func GetRuntimeSpec(def *klcv1alpha3.KeptnTaskDefinition) *klcv1alpha3.RuntimeSpec
- func GetTaskDefinition(k8sclient client.Client, log logr.Logger, ctx context.Context, ...) (*klcv1alpha3.KeptnTaskDefinition, error)
- func InitAppMeters() apicommon.KeptnMeters
- func IsContainerEmpty(spec *klcv1alpha3.ContainerSpec) bool
- func IsInline(spec *klcv1alpha3.RuntimeSpec) bool
- func IsRuntimeEmpty(spec *klcv1alpha3.RuntimeSpec) bool
- func IsVolumeMountPresent(spec *klcv1alpha3.ContainerSpec) bool
- func ObserveActiveInstances(ctx context.Context, client client.Client, ...) error
- func ObserveDeploymentDuration(ctx context.Context, client client.Client, ...) error
- func ObserveDeploymentInterval(ctx context.Context, client client.Client, ...) error
- func SetUpKeptnMeters(meter interfaces.IMeter, mgr client.Client)
- func SetUpKeptnTaskMeters(meter interfaces.IMeter) common.KeptnMeters
- func SpecExists(definition *klcv1alpha3.KeptnTaskDefinition) bool
- func UpdateAppRevision(c client.Client, name string, revision uint) error
- type CreateEvaluationAttributes
- type CreateTaskAttributes
- type EvaluationHandler
- func (r EvaluationHandler) CreateKeptnEvaluation(ctx context.Context, namespace string, reconcileObject client.Object, ...) (string, error)
- func (r EvaluationHandler) ReconcileEvaluations(ctx context.Context, phaseCtx context.Context, reconcileObject client.Object, ...) ([]klcv1alpha3.ItemStatus, apicommon.StatusSummary, error)
- type EventSender
- type ISpanHandler
- type ITracer
- type PhaseHandler
- type PhaseResult
- type SpanHandler
- type TaskHandler
- func (r TaskHandler) CreateKeptnTask(ctx context.Context, namespace string, reconcileObject client.Object, ...) (string, error)
- func (r TaskHandler) ReconcileTasks(ctx context.Context, phaseCtx context.Context, reconcileObject client.Object, ...) ([]klcv1alpha3.ItemStatus, apicommon.StatusSummary, error)
- type TracerFactory
Constants ¶
View Source
const ( FunctionRuntimeImageKey = "FUNCTION_RUNNER_IMAGE" PythonRuntimeImageKey = "PYTHON_RUNNER_IMAGE" FunctionScriptMountPath = "/var/data/function.ts" PythonScriptMountPath = "/var/data/function.py" )
View Source
const KLTNamespace = "keptn-lifecycle-toolkit-system"
Variables ¶
This section is empty.
Functions ¶
func AddAppVersion ¶
func AddAppVersion(c client.Client, namespace string, appName string, version string, workloads []lfcv1alpha3.KeptnWorkloadRef, status lfcv1alpha3.KeptnAppVersionStatus) error
func GetCmName ¶
func GetCmName(functionName string, spec *klcv1alpha3.RuntimeSpec) string
func GetEvaluationDefinition ¶
func GetItemStatus ¶
func GetItemStatus(name string, instanceStatus []klcv1alpha3.ItemStatus) klcv1alpha3.ItemStatus
GetItemStatus retrieves the state of the task/evaluation, if it does not exists, it creates a default one
func GetOTelTracerProviderOptions ¶
func GetOTelTracerProviderOptions(oTelCollectorUrl string) ([]trace.TracerProviderOption, trace.SpanExporter, error)
func GetOldStatus ¶
func GetOldStatus(name string, statuses []klcv1alpha3.ItemStatus) apicommon.KeptnState
GetOldStatus retrieves the state of the task/evaluation
func GetOtelInstance ¶
func GetOtelInstance() *otelConfig
func GetRuntimeImage ¶
func GetRuntimeImage(def *klcv1alpha3.KeptnTaskDefinition) string
func GetRuntimeMountPath ¶
func GetRuntimeMountPath(def *klcv1alpha3.KeptnTaskDefinition) string
func GetRuntimeSpec ¶
func GetRuntimeSpec(def *klcv1alpha3.KeptnTaskDefinition) *klcv1alpha3.RuntimeSpec
func GetTaskDefinition ¶
func InitAppMeters ¶
func InitAppMeters() apicommon.KeptnMeters
func IsContainerEmpty ¶
func IsContainerEmpty(spec *klcv1alpha3.ContainerSpec) bool
func IsInline ¶
func IsInline(spec *klcv1alpha3.RuntimeSpec) bool
func IsRuntimeEmpty ¶
func IsRuntimeEmpty(spec *klcv1alpha3.RuntimeSpec) bool
func IsVolumeMountPresent ¶
func IsVolumeMountPresent(spec *klcv1alpha3.ContainerSpec) bool
func ObserveActiveInstances ¶
func SetUpKeptnMeters ¶
func SetUpKeptnMeters(meter interfaces.IMeter, mgr client.Client)
func SetUpKeptnTaskMeters ¶
func SetUpKeptnTaskMeters(meter interfaces.IMeter) common.KeptnMeters
func SpecExists ¶
func SpecExists(definition *klcv1alpha3.KeptnTaskDefinition) bool
check if either the funtions or container spec is set
Types ¶
type CreateEvaluationAttributes ¶
type CreateEvaluationAttributes struct { SpanName string Definition klcv1alpha3.KeptnEvaluationDefinition CheckType apicommon.CheckType }
type CreateTaskAttributes ¶
type CreateTaskAttributes struct { SpanName string Definition klcv1alpha3.KeptnTaskDefinition CheckType apicommon.CheckType }
type EvaluationHandler ¶
type EvaluationHandler struct { client.Client EventSender EventSender Log logr.Logger Tracer trace.Tracer Scheme *runtime.Scheme SpanHandler ISpanHandler }
func (EvaluationHandler) CreateKeptnEvaluation ¶
func (r EvaluationHandler) CreateKeptnEvaluation(ctx context.Context, namespace string, reconcileObject client.Object, evaluationCreateAttributes CreateEvaluationAttributes) (string, error)
func (EvaluationHandler) ReconcileEvaluations ¶
func (r EvaluationHandler) ReconcileEvaluations(ctx context.Context, phaseCtx context.Context, reconcileObject client.Object, evaluationCreateAttributes CreateEvaluationAttributes) ([]klcv1alpha3.ItemStatus, apicommon.StatusSummary, error)
type EventSender ¶
type EventSender struct {
// contains filtered or unexported fields
}
func NewEventSender ¶
func NewEventSender(recorder record.EventRecorder) EventSender
func (*EventSender) SendK8sEvent ¶
func (s *EventSender) SendK8sEvent(phase apicommon.KeptnPhaseType, eventType string, reconcileObject client.Object, shortReason string, longReason string, version string)
SendK8sEvent creates k8s Event and adds it to Eventqueue
type ISpanHandler ¶
type PhaseHandler ¶
type PhaseHandler struct { client.Client EventSender EventSender Log logr.Logger SpanHandler ISpanHandler }
func (PhaseHandler) HandlePhase ¶
func (r PhaseHandler) HandlePhase(ctx context.Context, ctxTrace context.Context, tracer trace.Tracer, reconcileObject client.Object, phase apicommon.KeptnPhaseType, span trace.Span, reconcilePhase func(phaseCtx context.Context) (apicommon.KeptnState, error)) (*PhaseResult, error)
type PhaseResult ¶
type SpanHandler ¶
type SpanHandler struct {
// contains filtered or unexported fields
}
func (*SpanHandler) UnbindSpan ¶
func (r *SpanHandler) UnbindSpan(reconcileObject client.Object, phase string) error
type TaskHandler ¶
type TaskHandler struct { client.Client EventSender EventSender Log logr.Logger Tracer trace.Tracer Scheme *runtime.Scheme SpanHandler ISpanHandler }
func (TaskHandler) CreateKeptnTask ¶
func (r TaskHandler) CreateKeptnTask(ctx context.Context, namespace string, reconcileObject client.Object, taskCreateAttributes CreateTaskAttributes) (string, error)
func (TaskHandler) ReconcileTasks ¶
func (r TaskHandler) ReconcileTasks(ctx context.Context, phaseCtx context.Context, reconcileObject client.Object, taskCreateAttributes CreateTaskAttributes) ([]klcv1alpha3.ItemStatus, apicommon.StatusSummary, error)
type TracerFactory ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.