-
Notifications
You must be signed in to change notification settings - Fork 6.4k
feat: Add custom health check for cluster-api AWSManagedControlPlane #19304
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
feat: Add custom health check for cluster-api AWSManagedControlPlane #19304
Conversation
❌ Preview Environment deleted from BunnyshellAvailable commands (reply to this comment):
|
❌ Preview Environment deleted from BunnyshellAvailable commands (reply to this comment):
|
Signed-off-by: Iulian Taiatu <itaiatu@adobe.com>
…goproj#19295) Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.55.3 to 1.55.4. - [Release notes](https://github.com/aws/aws-sdk-go/releases) - [Commits](aws/aws-sdk-go@v1.55.3...v1.55.4) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Iulian Taiatu <itaiatu@adobe.com>
e11af00
to
76bd765
Compare
Signed-off-by: Iulian Taiatu <itaiatu@adobe.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #19304 +/- ##
==========================================
- Coverage 52.79% 52.79% -0.01%
==========================================
Files 316 316
Lines 43582 43582
==========================================
- Hits 23010 23009 -1
- Misses 18018 18024 +6
+ Partials 2554 2549 -5 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you for your contribution. @crenshaw-dev any thoughts of cherry-picking this into v2.12?
/cherry-pick release-2.12 |
…19304) * add custom health check for awsmanagedcontrolplane Signed-off-by: Iulian Taiatu <itaiatu@adobe.com> * chore(deps): bump github.com/aws/aws-sdk-go from 1.55.3 to 1.55.4 (#19295) Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.55.3 to 1.55.4. - [Release notes](https://github.com/aws/aws-sdk-go/releases) - [Commits](aws/aws-sdk-go@v1.55.3...v1.55.4) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Iulian Taiatu <itaiatu@adobe.com> * add new line at the end of health_test.yaml file Signed-off-by: Iulian Taiatu <itaiatu@adobe.com> --------- Signed-off-by: Iulian Taiatu <itaiatu@adobe.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…19304) (#19360) * add custom health check for awsmanagedcontrolplane * chore(deps): bump github.com/aws/aws-sdk-go from 1.55.3 to 1.55.4 (#19295) Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.55.3 to 1.55.4. - [Release notes](https://github.com/aws/aws-sdk-go/releases) - [Commits](aws/aws-sdk-go@v1.55.3...v1.55.4) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go dependency-type: direct:production update-type: version-update:semver-patch ... * add new line at the end of health_test.yaml file --------- Signed-off-by: Iulian Taiatu <itaiatu@adobe.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: itaiatu <140485521+itaiatu@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…rgoproj#19304) * add custom health check for awsmanagedcontrolplane Signed-off-by: Iulian Taiatu <itaiatu@adobe.com> * chore(deps): bump github.com/aws/aws-sdk-go from 1.55.3 to 1.55.4 (argoproj#19295) Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.55.3 to 1.55.4. - [Release notes](https://github.com/aws/aws-sdk-go/releases) - [Commits](aws/aws-sdk-go@v1.55.3...v1.55.4) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Iulian Taiatu <itaiatu@adobe.com> * add new line at the end of health_test.yaml file Signed-off-by: Iulian Taiatu <itaiatu@adobe.com> --------- Signed-off-by: Iulian Taiatu <itaiatu@adobe.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: Rhys Williams <rhys.williams@electrum.co.za>
In order to check if the AWSManagedControlPlane object is healthy, I wrote this custom check in Lua, as explained in the documentation.
This custom health check is needed because when experimented a bit with this resource, saw that the
.status.ready
field becomestrue
a long time before the resource was created and every dependency was provisioned.Example of a condition that was
False
for some minutes even if the.status.ready
wastrue
Example of an
AWSManagedControlPlane
status
fieldThus, the basic flow is the following:
Ready
and its current status isTrue
, then the control plane is readyFalse
status andError
severity, then we append the err msg to an err msgs accumulator to return at the end and report theDegraded
status.status.ready
== false -> Is not readyReady
condition is notTrue
, it means that the creation is still in progress, so we report theProgressing
status to ArgoCD.Now, in terms of testing the health check in a real environment, we performed a full CAPA cluster build. Below are some screenshots during the testing process.
.status.ready
wasFalse
.status.ready
becameTrue
, but OIDC reached the 100 limit (err messages are in theHealth Details
)Checklist: