Skip to content

Commit

Permalink
Add processing of force-reconcile for RuntimeCR
Browse files Browse the repository at this point in the history
  • Loading branch information
koala7659 committed Jan 14, 2025
1 parent 0f79aa3 commit eab939b
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import (
ctrl "sigs.k8s.io/controller-runtime"
)

const ForceReconcileAnnotation = "infrastructuremanager.kyma-project.io/force-reconcile"

func sFnSelectShootProcessing(_ context.Context, m *fsm, s *systemState) (stateFn, *ctrl.Result, error) {
m.log.Info("Select shoot processing state")

Expand Down Expand Up @@ -54,6 +56,11 @@ func sFnSelectShootProcessing(_ context.Context, m *fsm, s *systemState) (stateF
}

func shouldPatchShoot(runtime *imv1.Runtime, shoot *gardener.Shoot) (bool, error) {
_, found := runtime.GetAnnotations()[ForceReconcileAnnotation]
if found == true {
return true, nil
}

runtimeGeneration := runtime.GetGeneration()
appliedGenerationString, found := shoot.GetAnnotations()[extender.ShootRuntimeGenerationAnnotation]

Expand Down

0 comments on commit eab939b

Please sign in to comment.