Skip to content

Conversation

Kerwood
Copy link
Contributor

@Kerwood Kerwood commented Jul 5, 2022

Signed-off-by: Patrick Kerwood patrick@kerwood.dk

Added health checks for the following Google Cloud Config Connector resouces.

  • sql.cnrm.cloud.google.com
    • SQLInstance
    • SQLDatabase
    • SQLUser
  • storage.cnrm.cloud.google.com
    • StorageBucket
  • iam.cnrm.cloud.google.com
    • IAMServiceAccount
    • IAMPartialPolicy
    • IAMPolicyMember (existed but refactored to match the others resources)

Edit:
Since Config Connector uses the same status indication on all resources, the health checks are the same, only difference is the apiVersion and kind in the test objects.

Signed-off-by: Patrick Kerwood <patrick@kerwood.dk>
@codecov
Copy link

codecov bot commented Jul 5, 2022

Codecov Report

Merging #9878 (03a2224) into master (c702693) will increase coverage by 0.00%.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #9878   +/-   ##
=======================================
  Coverage   45.86%   45.86%           
=======================================
  Files         227      227           
  Lines       26862    26864    +2     
=======================================
+ Hits        12320    12322    +2     
  Misses      12862    12862           
  Partials     1680     1680           
Impacted Files Coverage Δ
server/server.go 53.18% <0.00%> (ø)
util/grpc/sanitizer.go 85.00% <0.00%> (ø)
applicationset/generators/git.go 83.15% <0.00%> (+0.36%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c702693...03a2224. Read the comment docs.

@crenshaw-dev crenshaw-dev changed the title Health checks for Google Cloud Config Connector resources. feat: health checks for Google Cloud Config Connector resources Jul 5, 2022
Copy link
Member

@crenshaw-dev crenshaw-dev left a comment

Choose a reason for hiding this comment

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

@Kerwood my only hesitation to merge is that it's not super clear whether the IAMPolicyMember health check behaves the same as the old one. Would it be possible to leave the old tests in place, just to make it extra clear?

@Kerwood
Copy link
Contributor Author

Kerwood commented Jul 7, 2022

@crenshaw-dev

@Kerwood my only hesitation to merge is that it's not super clear whether the IAMPolicyMember health check behaves the same as the old one. Would it be possible to leave the old tests in place, just to make it extra clear?

I can if you want. I just refactored IAMPolicyMember to be identical to the other Config Connector/Google resources and added more functionality
.
It covers the same tests and adds more.

  • Old health.lua
    • UpToDate -> Healthy
    • UpdateFailed -> Degraded
  • New health.lua (same as all the others)
    • UpToDate -> Healthy
    • UpdateFailed -> Degraded
    • DependencyNotFound -> Degraded
    • DependencyNotReady -> Suspended

@crenshaw-dev
Copy link
Member

Ah, no worries then. Just wanted to make sure there weren't changes to the health check behavior. Thanks for clarifying!

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.

2 participants