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

make ScopeTemplate CRs communicate state #20

Merged

Conversation

everettraven
Copy link
Collaborator

@everettraven everettraven commented Sep 7, 2022

Description of the Change

  • Updates the ScopeTemplateStatus object to have a Conditions field that is of type []metav1.Conditions
  • Updates controllers/scopetemplate_controller.go to set a metav1.Condition with type Succeeded and updates the status of the condition accordingly
  • Updates controllers/scopetemplate_controller_test.go to:
    • Verify that the proper condition is being set
    • Create a unique ClusterRole for each iteration of a ScopeTemplate being created for the testing.
      • Before this, there was a clash in the tests in that the ClusterRole already existed even though the ScopeTemplate was being deleted and recreated. I think this raises the question: Should ClusterRoles be deleted if the ScopeTemplate that it is associated with is deleted?

Motivation for the Change

Fixes #4

@everettraven
Copy link
Collaborator Author

Once #21 is approved I will take what I learned from that PR and apply it to this one.

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 14, 2022
@everettraven
Copy link
Collaborator Author

/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 15, 2022
Signed-off-by: Bryce Palmer <[email protected]>
Signed-off-by: Bryce Palmer <[email protected]>
Signed-off-by: Bryce Palmer <[email protected]>
to just return unstructured.Unstructured instead of dealing with applyconfigurations

Signed-off-by: Bryce Palmer <[email protected]>
Signed-off-by: Bryce Palmer <[email protected]>
Signed-off-by: Bryce Palmer <[email protected]>
Signed-off-by: Bryce Palmer <[email protected]>
Signed-off-by: Bryce Palmer <[email protected]>
Signed-off-by: Bryce Palmer <[email protected]>
Signed-off-by: Bryce Palmer <[email protected]>
after merging everettraven:chore/refactor-controllers

Signed-off-by: Bryce Palmer <[email protected]>
@openshift-merge-robot openshift-merge-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Sep 28, 2022
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 4, 2022
@coveralls
Copy link

Pull Request Test Coverage Report for Build 3182757679

  • 9 of 22 (40.91%) changed or added relevant lines in 1 file are covered.
  • 4 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+1.06%) to 67.118%

Changes Missing Coverage Covered Lines Changed/Added Lines %
controllers/scopetemplate_controller.go 9 22 40.91%
Files with Coverage Reduction New Missed Lines %
controllers/scopetemplate_controller.go 4 60.75%
Totals Coverage Status
Change from base Build 3174960596: 1.06%
Covered Lines: 347
Relevant Lines: 517

💛 - Coveralls

@everettraven
Copy link
Collaborator Author

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 4, 2022
Copy link
Member

@jmrodri jmrodri left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Oct 10, 2022
@grokspawn
Copy link
Contributor

/lgtm

@everettraven everettraven merged commit 9665f86 into operator-framework:main Oct 11, 2022
@everettraven everettraven deleted the feature/scopetemplate-state branch October 11, 2022 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ScopeTemplate CRs communicate state
6 participants