Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scope reconciler #54

Merged
merged 1 commit into from
Jan 23, 2024
Merged

Scope reconciler #54

merged 1 commit into from
Jan 23, 2024

Conversation

tmilos77
Copy link
Contributor

@tmilos77 tmilos77 commented Jan 23, 2024

Description

Changes proposed in this pull request:

  • removed on-first-use Scope creation and created dedicated Scope reconciler that's watching Kyma CR
    • added Scope KCP reconciler by moving most of the components/kcp/pkg/common/actions/scope actions into components/kcp/pkg/kcp/scope
    • it is responsible for the provisioning once CloudManager module is ready in the Kyma CR status
    • it handles
      • Kyma CR finalizer
      • Scope creation with finalizer
      • adding SKR to the Looper
  • refactored cloudcontrolv1beta1 resources
    • made ScopeRef required
    • removed KymaName since it should be read from the Scope
  • removed Kyma watch from KCP NfsInstance reconciler, since it's added to the new Scope reconciler
  • refactored focal flow to set error condition and stop/forget if referred Scope does not exist
  • refactored focal.CommonObject and removed KymaName() since it's removed from the resources, and embedded composed.ObjWithConditions as a replacement for Conditions() and GetObjectMeta()
  • removed deleted components/kcp/pkg/common/actions/scope flow from all existing reconcilers
  • changed SKR IpRange reconciler in components/kcp/pkg/skr/iprange to create KCP IpRange w/out deleted KymaName and with required ScopeRef
  • extracted skrlooper.ActiveSkrCollection interface from skrlooper.SkrLooper with AddKymaName() and RemoveKymaName() methods, to be provided to the flow actions to start/stop SKR reconciliations, w/out giving them reference to the whole SkrLooper
  • added func util.GetKymaModuleState(), type util.KymaModuleState, and related consts to match LifecycleManager implementation
  • added func SetObj() to the composed.State due to a non-standard Scope flow when it's triggered by the watched Kyma in case when Scope does not exist, so it can be set to the state once created
  • fixed a WaitGroup bug Amir discovered about order and place of Add() calls

Related issue(s)

@kyma-bot kyma-bot added cla: yes Indicates the PR's author has signed the CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jan 23, 2024
Copy link
Contributor

@ravi-shankar-sap ravi-shankar-sap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@kyma-bot kyma-bot added the lgtm Looks good to me! label Jan 23, 2024
@kyma-bot kyma-bot merged commit 851a9d9 into kyma-project:main Jan 23, 2024
4 checks passed
@tmilos77 tmilos77 deleted the scope-controller branch January 30, 2024 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Indicates the PR's author has signed the CLA. lgtm Looks good to me! size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants