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

apply crds on operator startup #122

Merged
merged 3 commits into from
Nov 1, 2023
Merged

apply crds on operator startup #122

merged 3 commits into from
Nov 1, 2023

Conversation

OliverMKing
Copy link
Collaborator

Description

Applies the crds on operator startup, crashes the operator if it can't do that.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Unit and manually. Will be e2e tested with future additions since tests will rely on crds which will rely on the definition being in the cluster.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@coveralls
Copy link
Collaborator

coveralls commented Oct 31, 2023

Pull Request Test Coverage Report for Build 6711524321

  • 39 of 58 (67.24%) changed or added relevant lines in 3 files are covered.
  • 40 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-2.1%) to 84.129%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/config/config.go 9 11 81.82%
pkg/controller/crd.go 28 33 84.85%
pkg/controller/controller.go 2 14 14.29%
Files with Coverage Reduction New Missed Lines %
pkg/controller/controller.go 40 30.0%
Totals Coverage Status
Change from base Build 6710311844: -2.1%
Covered Lines: 2131
Relevant Lines: 2533

💛 - Coveralls

@@ -96,9 +75,3 @@ func TestGetSelfDeploy(t *testing.T) {
require.Nil(t, self)
})
}

func TestNewManagerForRestConfig(t *testing.T) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

can't test things that use the utils.upsert function with the fake environment. That's fine. NewManagerForRestConfig is essentially the main function and doesn't have any logic by itself. Isn't valuable to unit test in the first place.

This will be covered by all e2e tests as well.

Copy link
Collaborator

@jaiveerk jaiveerk left a comment

Choose a reason for hiding this comment

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

minor change but lgtm

pkg/controller/controller.go Show resolved Hide resolved
@OliverMKing OliverMKing merged commit 948afca into Azure:main Nov 1, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants