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

🌱Refactor controlplane health check in KCP #3806

Merged

Conversation

sedefsavas
Copy link

@sedefsavas sedefsavas commented Oct 15, 2020

What this PR does / why we need it:

This PR moves reconcileControlPlaneHealth() up in the code and called in reconcile().

Also, it divides health check into 2 parts:

  1. Only does the health check
  2. Calls the health check functions in (1) and analysis the result returned by the health check

This is partly for cleanup and partly to reuse health check in reconcileDelete(). With the introduction of new KCP conditions (#3674), we would like to call health checks in reconcileDelete() too so that we can get some signal about where the deletion process is at.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):

Relevant PRs: #3138 #3670 #3674

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Oct 15, 2020
@k8s-ci-robot k8s-ci-robot requested review from benmoss and ncdc October 15, 2020 22:19
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 15, 2020
@sedefsavas sedefsavas force-pushed the refactor_kcp_healthcheck branch from 0d07944 to d953d9c Compare October 15, 2020 22:28
@sedefsavas
Copy link
Author

/test periodic-cluster-api-e2e-release-0-3

@k8s-ci-robot
Copy link
Contributor

@sedefsavas: The specified target(s) for /test were not found.
The following commands are available to trigger jobs:

  • /test pull-cluster-api-verify
  • /test pull-cluster-api-build-release-0-3
  • /test pull-cluster-api-make
  • /test pull-cluster-api-apidiff-release-0-3
  • /test pull-cluster-api-verify-release-0-3
  • /test pull-cluster-api-test-release-0-3
  • /test pull-cluster-api-e2e-release-0-3
  • /test pull-cluster-api-e2e-full-release-0-3

Use /test all to run the following jobs:

  • pull-cluster-api-verify
  • pull-cluster-api-build-release-0-3
  • pull-cluster-api-make
  • pull-cluster-api-apidiff-release-0-3
  • pull-cluster-api-verify-release-0-3
  • pull-cluster-api-test-release-0-3
  • pull-cluster-api-e2e-release-0-3

In response to this:

/test periodic-cluster-api-e2e-release-0-3

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@sedefsavas
Copy link
Author

cc @fabriziopandini cc @vincepri

controlplane/kubeadm/controllers/controller.go Outdated Show resolved Hide resolved
controlplane/kubeadm/controllers/controller.go Outdated Show resolved Hide resolved
controlplane/kubeadm/controllers/controller.go Outdated Show resolved Hide resolved
controlplane/kubeadm/controllers/controller.go Outdated Show resolved Hide resolved
controlplane/kubeadm/controllers/scale.go Outdated Show resolved Hide resolved
controlplane/kubeadm/internal/cluster.go Outdated Show resolved Hide resolved
controlplane/kubeadm/internal/cluster.go Outdated Show resolved Hide resolved
controlplane/kubeadm/internal/cluster.go Outdated Show resolved Hide resolved
controlplane/kubeadm/internal/cluster.go Outdated Show resolved Hide resolved
controlplane/kubeadm/internal/workload_cluster.go Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 19, 2020
@vincepri
Copy link
Member

/milestone v0.3.11

@k8s-ci-robot k8s-ci-robot added this to the v0.3.11 milestone Oct 19, 2020
@vincepri
Copy link
Member

Squash?

@sedefsavas sedefsavas force-pushed the refactor_kcp_healthcheck branch from f76b5eb to c5c0da0 Compare October 19, 2020 18:11
Copy link
Member

@fabriziopandini fabriziopandini left a comment

Choose a reason for hiding this comment

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

Only one last question, otherwise lgtm pending squash

controlplane/kubeadm/controllers/controller.go Outdated Show resolved Hide resolved
@sedefsavas sedefsavas force-pushed the refactor_kcp_healthcheck branch from 53c4ea4 to 572e7f0 Compare October 22, 2020 16:21
@sedefsavas
Copy link
Author

Squashed. Thanks for the comments @fabriziopandini @vincepri

@vincepri
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 22, 2020
@fabriziopandini
Copy link
Member

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fabriziopandini

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants