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

managed-by label checks for spc, placeholder pods and ingress backend #111

Merged
merged 21 commits into from
Oct 26, 2023

Conversation

aamgayle
Copy link
Contributor

Description

Added checks for top-level labels to be sure we're managing a resource before deleting

Fixes # (issue)
The Reconcile functions did not check whether or not we owned whatever resource it was currently assessing and could potentially delete secret provider classes and
Feature # (details)

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?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration. Is it a breaking change which will impact consuming tool(s)?

  • Unit Tests - X
  • e2e Tests
    image

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 11, 2023

Pull Request Test Coverage Report for Build 6645361849

  • 50 of 52 (96.15%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.1%) to 88.994%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/controller/keyvault/placeholder_pod.go 10 12 83.33%
Totals Coverage Status
Change from base Build 6549676137: 0.1%
Covered Lines: 2062
Relevant Lines: 2317

💛 - Coveralls

@aamgayle
Copy link
Contributor Author

/ok-to-test sha=7331620

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.

question re: spc labels

pkg/manifests/common.go Outdated Show resolved Hide resolved
pkg/controller/keyvault/ingress_secret_provider_class.go Outdated Show resolved Hide resolved
pkg/controller/keyvault/ingress_secret_provider_class.go Outdated Show resolved Hide resolved
@aamgayle
Copy link
Contributor Author

/ok-to-test sha=c3b2dbf

jaiveerk
jaiveerk previously approved these changes Oct 24, 2023
jaiveerk
jaiveerk previously approved these changes Oct 25, 2023
Copy link
Collaborator

@OliverMKing OliverMKing left a comment

Choose a reason for hiding this comment

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

fix the upsert thing then i'll approve. looks really good to me

@OliverMKing
Copy link
Collaborator

Pull Request Test Coverage Report for Build 6645361849

  • 50 of 52 (96.15%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.1%) to 88.994%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/controller/keyvault/placeholder_pod.go 10 12 83.33%
Totals Coverage Status
Change from base Build 6549676137: 0.1%
Covered Lines: 2062
Relevant Lines: 2317

💛 - Coveralls

This all looks good to me. We have a few logic branches not covered for one reconciler that we can add tests for.

Copy link
Contributor

@davidgamero davidgamero left a comment

Choose a reason for hiding this comment

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

lgtm

@aamgayle
Copy link
Contributor Author

/ok-to-test sha=1ffab9d

1 similar comment
@OliverMKing
Copy link
Collaborator

/ok-to-test sha=1ffab9d

@OliverMKing OliverMKing merged commit 4db42d5 into Azure:main Oct 26, 2023
7 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.

5 participants