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

Implement Eventing Auth Kyma Controller #16

Merged
merged 5 commits into from
May 9, 2023

Conversation

muralov
Copy link
Contributor

@muralov muralov commented May 5, 2023

Description
Implement Kyma Controller that watchers Kyma CR and creates a EventingAuth CR correspondingly.
Changes proposed in this pull request:

  • Implement the main logic
  • Implement Integration Tests

Related issue(s)
#13

muralov added 2 commits May 4, 2023 08:37
Kyma controller watches Kyma CRs and creates EventingAuth CRs accordingly
@muralov muralov requested review from a team and triffer as code owners May 5, 2023 04:58
@kyma-bot kyma-bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label May 5, 2023
@muralov muralov changed the title Kyma controller Implement Eventing Auth Kyma Controller May 5, 2023
Copy link
Contributor

@triffer triffer left a comment

Choose a reason for hiding this comment

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

I think we should adapt the documentation

  • Kyma CRD needs to be in the cluster for local development. I also see that we are not mentioning make install in Running on the cluster, it's only mentioned here.
  • Running on the cluster is a little bit different, since KymaCR should be the trigger not EventingAuth
  • EVENTING_AUTH_CR_NAME might be better replaced with KYMA_CR_NAME in the readme

controllers/eventingauth_controller_test.go Show resolved Hide resolved
controllers/kyma_controller.go Outdated Show resolved Hide resolved
controllers/kyma_controller.go Outdated Show resolved Hide resolved
controllers/kyma_controller_test.go Outdated Show resolved Hide resolved
controllers/kyma_controller.go Outdated Show resolved Hide resolved
* Prevent reconciling every minute
* Improve documentation
* Don't create/delete kcp-system namespace
* Test improvements
if err != nil {
if apiErrors.IsNotFound(err) {
return ctrl.Result{
RequeueAfter: r.defaultRequeuePeriod,
Copy link
Contributor

Choose a reason for hiding this comment

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

I think that in this case we should not set a RequeueAfter, otherwise this object will be constantly reconciled, even after deletion.
I think I'll remove the defaultRequeuePeriod in my integration test PR, since this was only introduced to control the reconcile for the tests. And it's a better option set the SyncPeriod oder the manager used for the tests and keep the default behaviour.

Suggested change
RequeueAfter: r.defaultRequeuePeriod,

@triffer triffer self-requested a review May 9, 2023 08:04
@kyma-bot kyma-bot added the lgtm Looks good to me! label May 9, 2023
@kyma-bot kyma-bot merged commit 29bf23e into kyma-project:main May 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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