Skip to content

Commit

Permalink
Merge branch 'main' into feat/step-field-for-KeptnMetric
Browse files Browse the repository at this point in the history
  • Loading branch information
rakshitgondwal authored Jul 21, 2023
2 parents a991ce1 + 92730ad commit 9b94a02
Show file tree
Hide file tree
Showing 34 changed files with 548 additions and 206 deletions.
2 changes: 1 addition & 1 deletion .github/actions/deploy-klt-on-cluster/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ runs:
path: ~/download/artifacts

- name: "Create single kind Cluster"
uses: helm/kind-action@v1.7.0
uses: helm/kind-action@v1.8.0
with:
cluster_name: ${{ inputs.cluster-name }}
version: ${{ inputs.kind-version }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/validate-helm-chart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
uses: actions/checkout@v3

- name: Set up Node
uses: actions/setup-node@v3.6.0
uses: actions/setup-node@v3.7.0
with:
node-version: 16

Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Status of the different features:
K8s Custom Metrics: expose your Observability platform via the [Custom Metric API](https://github.com/kubernetes/design-proposals-archive/blob/main/instrumentation/custom-metrics-api.md).
- ![status](https://img.shields.io/badge/status-alpha-orange)
Release lifecycle: handle pre- and post-checks of your Application deployment.
- ![status](https://img.shields.io/badge/status-beta-yellow)
- ![status](https://img.shields.io/badge/status-stable-brightgreen)
Certificate Manager: automatically configure TLS certificates for
[secure communication with the Kube API](https://kubernetes.io/docs/concepts/security/controlling-access/#transport-security).

Expand All @@ -29,6 +29,8 @@ beta ![status](https://img.shields.io/badge/status-beta-yellow) )
stable ![status](https://img.shields.io/badge/status-stable-brightgreen) )
-->

The status follows the [Kubernetes API versioning schema](https://kubernetes.io/docs/reference/using-api/#api-versioning).

For more info about the features, please refer to our [documentation](https://lifecycle.keptn.sh/docs/).

## Watch the KubeCon 2022 Detroit Demo
Expand Down
2 changes: 1 addition & 1 deletion docs/content/en/partials/_index-data-access-right.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ The Keptn Metrics Server provides:

* Define Keptn Metrics once for Dynatrace, DataDog, AWS, Azure, GCP, ...
* Access all those metrics via Prometheus or K8s Metric API
* Eliminate the need of multiple plugins for Argo Roolouts, KEDA, HPA, ...
* Eliminate the need of multiple plugins for Argo Rollouts, KEDA, HPA, ...
2 changes: 1 addition & 1 deletion metrics-operator/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require (
github.com/go-logr/logr v1.2.4
github.com/gorilla/mux v1.8.0
github.com/kelseyhightower/envconfig v1.4.0
github.com/keptn/lifecycle-toolkit/klt-cert-manager v0.0.0-20230630070122-4ad9bbf74960
github.com/keptn/lifecycle-toolkit/klt-cert-manager v0.0.0-20230721062615-0b618c4bf152
github.com/open-feature/go-sdk v1.4.0
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.16.0
Expand Down
4 changes: 2 additions & 2 deletions metrics-operator/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,8 @@ github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7V
github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM=
github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8=
github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg=
github.com/keptn/lifecycle-toolkit/klt-cert-manager v0.0.0-20230630070122-4ad9bbf74960 h1:SbVqELW4soNryi9Aq/rxAg0L9AwBevD8Tc1zcKcTMz0=
github.com/keptn/lifecycle-toolkit/klt-cert-manager v0.0.0-20230630070122-4ad9bbf74960/go.mod h1:CBNZ9l66hix9FW1Fs08MV3Xa5BxvFHyizMYObq9j7L8=
github.com/keptn/lifecycle-toolkit/klt-cert-manager v0.0.0-20230721062615-0b618c4bf152 h1:ohSCaA9U8NFit9XMEBymOsfqdjtoJzinqXGFqTkSWfE=
github.com/keptn/lifecycle-toolkit/klt-cert-manager v0.0.0-20230721062615-0b618c4bf152/go.mod h1:CBNZ9l66hix9FW1Fs08MV3Xa5BxvFHyizMYObq9j7L8=
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
Expand Down
6 changes: 6 additions & 0 deletions operator/apis/lifecycle/v1alpha3/common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
operatorcommon "github.com/keptn/lifecycle-toolkit/operator/common"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/metric"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

const WorkloadAnnotation = "keptn.sh/workload"
Expand Down Expand Up @@ -200,3 +201,8 @@ func MergeMaps(m1 map[string]string, m2 map[string]string) map[string]string {
}
return merged
}

// IsOwnerSupported returns whether the owner of the given object is supported to be considered a KeptnWorklooad
func IsOwnerSupported(owner metav1.OwnerReference) bool {
return owner.Kind == "ReplicaSet" || owner.Kind == "Deployment" || owner.Kind == "StatefulSet" || owner.Kind == "DaemonSet" || owner.Kind == "Rollout"
}
74 changes: 74 additions & 0 deletions operator/apis/lifecycle/v1alpha3/common/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"testing"

"github.com/stretchr/testify/require"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

const ExtraLongName = "loooooooooooooooooooooo00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ooooooo01234567891234567890123456789"
Expand Down Expand Up @@ -415,3 +416,76 @@ func Test_MergeMaps(t *testing.T) {
})
}
}

func TestIsOwnerSupported(t *testing.T) {
type args struct {
owner v1.OwnerReference
}
tests := []struct {
name string
args args
want bool
}{
{
name: "Deployment -> true",
args: args{
owner: v1.OwnerReference{
Kind: "Deployment",
},
},
want: true,
},
{
name: "DaemonSet-> true",
args: args{
owner: v1.OwnerReference{
Kind: "DaemonSet",
},
},
want: true,
},
{
name: "ReplicaSet-> true",
args: args{
owner: v1.OwnerReference{
Kind: "ReplicaSet",
},
},
want: true,
},
{
name: "StatefulSet-> true",
args: args{
owner: v1.OwnerReference{
Kind: "StatefulSet",
},
},
want: true,
},
{
name: "Rollout-> true",
args: args{
owner: v1.OwnerReference{
Kind: "Rollout",
},
},
want: true,
},
{
name: "Job-> false",
args: args{
owner: v1.OwnerReference{
Kind: "Job",
},
},
want: false,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := IsOwnerSupported(tt.args.owner); got != tt.want {
t.Errorf("IsOwnerSupported() = %v, want %v", got, tt.want)
}
})
}
}
64 changes: 42 additions & 22 deletions operator/apis/lifecycle/v1alpha3/common/phases.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,19 @@ var phases = []KeptnPhaseType{
PhaseAppDeployment,
PhaseReconcileEvaluation,
PhaseReconcileTask,
PhaseReconcileWorkload,
PhaseUpdateWorkload,
PhaseCreateEvaluation,
PhaseCreateTask,
PhaseCreateApp,
PhaseCreateAppCreationRequest,
PhaseCreateWorkload,
PhaseCreateWorklodInstance,
PhaseCreateAppVersion,
PhaseCompleted,
PhaseAppCompleted,
PhaseWorkloadCompleted,
PhaseDeprecateAppVersion,
PhaseDeprecated,
PhaseAppCompleted,
}

func (p KeptnPhaseType) IsEvaluation() bool {
Expand Down Expand Up @@ -77,26 +82,31 @@ func GetShortPhaseName(phase string) string {
}

var (
PhaseWorkloadPreDeployment = KeptnPhaseType{LongName: "Workload Pre-Deployment Tasks", ShortName: "WorkloadPreDeployTasks"}
PhaseWorkloadPostDeployment = KeptnPhaseType{LongName: "Workload Post-Deployment Tasks", ShortName: "WorkloadPostDeployTasks"}
PhaseWorkloadPreEvaluation = KeptnPhaseType{LongName: "Workload Pre-Deployment Evaluations", ShortName: "WorkloadPreDeployEvaluations"}
PhaseWorkloadPostEvaluation = KeptnPhaseType{LongName: "Workload Post-Deployment Evaluations", ShortName: "WorkloadPostDeployEvaluations"}
PhaseWorkloadDeployment = KeptnPhaseType{LongName: "Workload Deployment", ShortName: "WorkloadDeploy"}
PhaseAppPreDeployment = KeptnPhaseType{LongName: "App Pre-Deployment Tasks", ShortName: "AppPreDeployTasks"}
PhaseAppPostDeployment = KeptnPhaseType{LongName: "App Post-Deployment Tasks", ShortName: "AppPostDeployTasks"}
PhaseAppPreEvaluation = KeptnPhaseType{LongName: "App Pre-Deployment Evaluations", ShortName: "AppPreDeployEvaluations"}
PhaseAppPostEvaluation = KeptnPhaseType{LongName: "App Post-Deployment Evaluations", ShortName: "AppPostDeployEvaluations"}
PhaseAppDeployment = KeptnPhaseType{LongName: "App Deployment", ShortName: "AppDeploy"}
PhaseReconcileEvaluation = KeptnPhaseType{LongName: "Reconcile Evaluation", ShortName: "ReconcileEvaluation"}
PhaseReconcileTask = KeptnPhaseType{LongName: "Reconcile Task", ShortName: "ReconcileTask"}
PhaseCreateEvaluation = KeptnPhaseType{LongName: "Create Evaluation", ShortName: "CreateEvaluation"}
PhaseCreateTask = KeptnPhaseType{LongName: "Create Task", ShortName: "CreateTask"}
PhaseCreateApp = KeptnPhaseType{LongName: "Create App", ShortName: "CreateApp"}
PhaseCreateWorkload = KeptnPhaseType{LongName: "Create Workload", ShortName: "CreateWorkload"}
PhaseCreateWorklodInstance = KeptnPhaseType{LongName: "Create WorkloadInstance", ShortName: "CreateWorkloadInstance"}
PhaseCreateAppVersion = KeptnPhaseType{LongName: "Create AppVersion", ShortName: "CreateAppVersion"}
PhaseCompleted = KeptnPhaseType{LongName: "Completed", ShortName: "Completed"}
PhaseDeprecated = KeptnPhaseType{LongName: "Deprecated", ShortName: "Deprecated"}
PhaseWorkloadPreDeployment = KeptnPhaseType{LongName: "Workload Pre-Deployment Tasks", ShortName: "WorkloadPreDeployTasks"}
PhaseWorkloadPostDeployment = KeptnPhaseType{LongName: "Workload Post-Deployment Tasks", ShortName: "WorkloadPostDeployTasks"}
PhaseWorkloadPreEvaluation = KeptnPhaseType{LongName: "Workload Pre-Deployment Evaluations", ShortName: "WorkloadPreDeployEvaluations"}
PhaseWorkloadPostEvaluation = KeptnPhaseType{LongName: "Workload Post-Deployment Evaluations", ShortName: "WorkloadPostDeployEvaluations"}
PhaseWorkloadDeployment = KeptnPhaseType{LongName: "Workload Deployment", ShortName: "WorkloadDeploy"}
PhaseAppPreDeployment = KeptnPhaseType{LongName: "App Pre-Deployment Tasks", ShortName: "AppPreDeployTasks"}
PhaseAppPostDeployment = KeptnPhaseType{LongName: "App Post-Deployment Tasks", ShortName: "AppPostDeployTasks"}
PhaseAppPreEvaluation = KeptnPhaseType{LongName: "App Pre-Deployment Evaluations", ShortName: "AppPreDeployEvaluations"}
PhaseAppPostEvaluation = KeptnPhaseType{LongName: "App Post-Deployment Evaluations", ShortName: "AppPostDeployEvaluations"}
PhaseAppDeployment = KeptnPhaseType{LongName: "App Deployment", ShortName: "AppDeploy"}
PhaseReconcileEvaluation = KeptnPhaseType{LongName: "Reconcile Evaluation", ShortName: "ReconcileEvaluation"}
PhaseReconcileTask = KeptnPhaseType{LongName: "Reconcile Task", ShortName: "ReconcileTask"}
PhaseReconcileWorkload = KeptnPhaseType{LongName: "Reconcile Workloads", ShortName: "ReconcileWorkload"}
PhaseCreateEvaluation = KeptnPhaseType{LongName: "Create Evaluation", ShortName: "CreateEvaluation"}
PhaseCreateTask = KeptnPhaseType{LongName: "Create Task", ShortName: "CreateTask"}
PhaseCreateAppCreationRequest = KeptnPhaseType{LongName: "Create AppCreationRequest", ShortName: "CreateAppCreationRequest"}
PhaseCreateWorkload = KeptnPhaseType{LongName: "Create Workload", ShortName: "CreateWorkload"}
PhaseUpdateWorkload = KeptnPhaseType{LongName: "Update Workload", ShortName: "UpdateWorkload"}
PhaseCreateWorklodInstance = KeptnPhaseType{LongName: "Create WorkloadInstance", ShortName: "CreateWorkloadInstance"}
PhaseCreateAppVersion = KeptnPhaseType{LongName: "Create AppVersion", ShortName: "CreateAppVersion"}
PhaseDeprecateAppVersion = KeptnPhaseType{LongName: "Deprecate AppVersion", ShortName: "DeprecateAppVersion"}
PhaseAppCompleted = KeptnPhaseType{LongName: "App Completed", ShortName: "AppCompleted"}
PhaseWorkloadCompleted = KeptnPhaseType{LongName: "Workload Completed", ShortName: "WorkloadCompleted"}
PhaseCompleted = KeptnPhaseType{LongName: "Completed", ShortName: "Completed"}
PhaseDeprecated = KeptnPhaseType{LongName: "Deprecated", ShortName: "Deprecated"}
)

type PhaseTraceID map[string]propagation.MapCarrier
Expand All @@ -109,3 +119,13 @@ func (pid PhaseTraceID) SetPhaseTraceID(phase string, carrier propagation.MapCar
func (pid PhaseTraceID) GetPhaseTraceID(phase string) propagation.MapCarrier {
return pid[GetShortPhaseName(phase)]
}

var (
PhaseStateFinished = "Finished"
PhaseStateStarted = "Started"
PhaseStateFailed = "Failed"
PhaseStateStatusChanged = "StatusChanged"
PhaseStateReconcileError = "ReconcileError"
PhaseStateReconcileTimeout = "ReconcileTimeout"
PhaseStateNotFound = "NotFound"
)
12 changes: 4 additions & 8 deletions operator/controllers/common/evaluationhandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func (r EvaluationHandler) ReconcileEvaluations(ctx context.Context, phaseCtx co
evaluationExists := false

if oldstatus != evaluationStatus.Status {
r.EventSender.SendK8sEvent(apicommon.PhaseReconcileEvaluation, "Normal", reconcileObject, "EvaluationStatusChanged", fmt.Sprintf("evaluation status changed from %s to %s", oldstatus, evaluationStatus.Status), piWrapper.GetVersion())
r.EventSender.SendK8sEvent(apicommon.PhaseReconcileEvaluation, "Normal", reconcileObject, apicommon.PhaseStateStatusChanged, fmt.Sprintf("evaluation status changed from %s to %s", oldstatus, evaluationStatus.Status), piWrapper.GetVersion())
}

// Check if evaluation has already succeeded or failed
Expand Down Expand Up @@ -105,9 +105,7 @@ func (r EvaluationHandler) ReconcileEvaluations(ctx context.Context, phaseCtx co
for _, ns := range newStatus {
summary = apicommon.UpdateStatusSummary(ns.Status, summary)
}
if apicommon.GetOverallState(summary) != apicommon.StateSucceeded {
r.EventSender.SendK8sEvent(apicommon.PhaseReconcileEvaluation, "Warning", reconcileObject, "NotFinished", "has not finished", piWrapper.GetVersion())
}

return newStatus, summary, nil
}

Expand All @@ -128,10 +126,9 @@ func (r EvaluationHandler) CreateKeptnEvaluation(ctx context.Context, namespace
err = r.Client.Create(ctx, &newEvaluation)
if err != nil {
r.Log.Error(err, "could not create KeptnEvaluation")
r.EventSender.SendK8sEvent(phase, "Warning", reconcileObject, "CreateFailed", "could not create KeptnEvaluation", piWrapper.GetVersion())
r.EventSender.SendK8sEvent(phase, "Warning", reconcileObject, apicommon.PhaseStateFailed, "could not create KeptnEvaluation", piWrapper.GetVersion())
return "", err
}
r.EventSender.SendK8sEvent(phase, "Normal", reconcileObject, "Created", "created", piWrapper.GetVersion())

return newEvaluation.Name, nil
}
Expand All @@ -145,7 +142,7 @@ func (r EvaluationHandler) emitEvaluationFailureEvents(evaluation *klcv1alpha3.K
k8sEventMessage = fmt.Sprintf("%s\n%s", k8sEventMessage, msg)
}
}
r.EventSender.SendK8sEvent(apicommon.PhaseReconcileEvaluation, "Warning", evaluation, "Failed", k8sEventMessage, piWrapper.GetVersion())
r.EventSender.SendK8sEvent(apicommon.PhaseReconcileEvaluation, "Warning", evaluation, apicommon.PhaseStateFailed, k8sEventMessage, piWrapper.GetVersion())
}

func (r EvaluationHandler) setupEvaluations(evaluationCreateAttributes CreateEvaluationAttributes, piWrapper *interfaces.PhaseItemWrapper) ([]string, []klcv1alpha3.ItemStatus) {
Expand Down Expand Up @@ -190,7 +187,6 @@ func (r EvaluationHandler) handleEvaluationExists(phaseCtx context.Context, piWr
if evaluationStatus.Status.IsSucceeded() {
spanEvaluationTrace.AddEvent(evaluation.Name + " has finished")
spanEvaluationTrace.SetStatus(codes.Ok, "Finished")
r.EventSender.SendK8sEvent(apicommon.PhaseReconcileEvaluation, "Normal", evaluation, "Succeeded", "evaluation succeeded", piWrapper.GetVersion())
} else {
spanEvaluationTrace.AddEvent(evaluation.Name + " has failed")
r.emitEvaluationFailureEvents(evaluation, spanEvaluationTrace, piWrapper)
Expand Down
4 changes: 1 addition & 3 deletions operator/controllers/common/evaluationhandler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client/fake"
)

//nolint:dupl
func TestEvaluationHandler(t *testing.T) {
tests := []struct {
name string
Expand Down Expand Up @@ -248,9 +249,6 @@ func TestEvaluationHandler(t *testing.T) {
wantErr: nil,
getSpanCalls: 1,
unbindSpanCalls: 1,
events: []string{
"ReconcileEvaluationSucceeded",
},
},
}

Expand Down
17 changes: 7 additions & 10 deletions operator/controllers/common/phasehandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,11 @@ func (r PhaseHandler) HandlePhase(ctx context.Context, ctxTrace context.Context,
if shouldAbortPhase(oldStatus) {
return &PhaseResult{Continue: false, Result: ctrl.Result{}}, nil
}
piWrapper.SetCurrentPhase(phase.ShortName)
if oldPhase != phase.ShortName {
r.EventSender.SendK8sEvent(phase, "Normal", reconcileObject, apicommon.PhaseStateStarted, "has started", piWrapper.GetVersion())
piWrapper.SetCurrentPhase(phase.ShortName)
}

r.Log.Info(phase.LongName + " not finished")
spanPhaseCtx, spanPhaseTrace, err := r.SpanHandler.GetSpan(ctxTrace, tracer, reconcileObject, phase.ShortName)
if err != nil {
r.Log.Error(err, "could not get span")
Expand All @@ -49,15 +51,11 @@ func (r PhaseHandler) HandlePhase(ctx context.Context, ctxTrace context.Context,
state, err := reconcilePhase(spanPhaseCtx)
if err != nil {
spanPhaseTrace.AddEvent(phase.LongName + " could not get reconciled")
r.EventSender.SendK8sEvent(phase, "Warning", reconcileObject, "ReconcileErrored", "could not get reconciled", piWrapper.GetVersion())
r.EventSender.SendK8sEvent(phase, "Warning", reconcileObject, apicommon.PhaseStateReconcileError, "could not get reconciled", piWrapper.GetVersion())
span.SetStatus(codes.Error, err.Error())
return &PhaseResult{Continue: false, Result: requeueResult}, err
}

if state.IsPending() {
state = apicommon.StateProgressing
}

defer func(ctx context.Context, oldStatus apicommon.KeptnState, oldPhase string, reconcileObject client.Object) {
piWrapper, _ := interfaces.NewPhaseItemWrapperFromClientObject(reconcileObject)
if oldStatus != piWrapper.GetState() || oldPhase != piWrapper.GetCurrentPhase() {
Expand All @@ -72,7 +70,6 @@ func (r PhaseHandler) HandlePhase(ctx context.Context, ctxTrace context.Context,
}

piWrapper.SetState(apicommon.StateProgressing)
r.EventSender.SendK8sEvent(phase, "Warning", reconcileObject, "NotFinished", "has not finished", piWrapper.GetVersion())

return &PhaseResult{Continue: false, Result: requeueResult}, nil
}
Expand All @@ -91,7 +88,7 @@ func (r PhaseHandler) handleCompletedPhase(state apicommon.KeptnState, piWrapper
if err := r.SpanHandler.UnbindSpan(reconcileObject, phase.ShortName); err != nil {
r.Log.Error(err, controllererrors.ErrCouldNotUnbindSpan, reconcileObject.GetName())
}
r.EventSender.SendK8sEvent(phase, "Warning", reconcileObject, "Failed", "has failed", piWrapper.GetVersion())
r.EventSender.SendK8sEvent(phase, "Warning", reconcileObject, apicommon.PhaseStateFailed, "has failed", piWrapper.GetVersion())
piWrapper.DeprecateRemainingPhases(phase)
return &PhaseResult{Continue: false, Result: ctrl.Result{}}, nil
}
Expand All @@ -103,7 +100,7 @@ func (r PhaseHandler) handleCompletedPhase(state apicommon.KeptnState, piWrapper
if err := r.SpanHandler.UnbindSpan(reconcileObject, phase.ShortName); err != nil {
r.Log.Error(err, controllererrors.ErrCouldNotUnbindSpan, reconcileObject.GetName())
}
r.EventSender.SendK8sEvent(phase, "Normal", reconcileObject, "Succeeded", "has succeeded", piWrapper.GetVersion())
r.EventSender.SendK8sEvent(phase, "Normal", reconcileObject, apicommon.PhaseStateFinished, "has finished", piWrapper.GetVersion())

return &PhaseResult{Continue: true, Result: ctrl.Result{Requeue: true, RequeueAfter: 5 * time.Second}}, nil
}
Loading

0 comments on commit 9b94a02

Please sign in to comment.