Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

add MachineHealthCheck #146

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

Draft
3deep5me wants to merge 5 commits into k8s-proxmox:main
base: main
Choose a base branch
Loading
from 3deep5me:add-MachineHealthCheck
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
restructure to kustomize overlays
  • Loading branch information
3deep5me committed Nov 16, 2023
commit 6b97a244f8b55be53e594e850f4fc30c1d23d897
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -436,25 +436,4 @@ data:
user: ${PROXMOX_USER:=""}
password: ${PROXMOX_PASSWORD:=""}
tokenID: ${PROXMOX_TOKENID:=""}
secret: ${PROXMOX_SECRET:=""}

---

apiVersion: cluster.x-k8s.io/v1beta1
kind: MachineHealthCheck
metadata:
name: ${CLUSTER_NAME}-unhealthy-5m
spec:
clusterName: '${CLUSTER_NAME}'
nodeStartupTimeout: 5m
maxUnhealthy: 100%
selector:
matchLabels:
cluster.x-k8s.io/cluster-name: '${CLUSTER_NAME}'
unhealthyConditions:
- type: Ready
status: Unknown
timeout: 300s
- type: Ready
status: "False"
timeout: 300s
secret: ${PROXMOX_SECRET:=""}
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: default
resources:
- cluster-template.yaml
5 changes: 5 additions & 0 deletions templates/flavors/advanced/kustomization.yaml
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../base
- machinehealthcheck.yaml
18 changes: 18 additions & 0 deletions templates/flavors/advanced/machinehealthcheck.yaml
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: cluster.x-k8s.io/v1beta1
kind: MachineHealthCheck
metadata:
name: ${CLUSTER_NAME}-unhealthy-5m
spec:
clusterName: '${CLUSTER_NAME}'
nodeStartupTimeout: 5m
maxUnhealthy: 100%
selector:
matchLabels:
cluster.x-k8s.io/cluster-name: '${CLUSTER_NAME}'
Copy link
Collaborator

Choose a reason for hiding this comment

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

is this a good idea to have single mhc for all the nodes in a cluster ?
maybe better to have a different mhc for controlplane and others. what do you think ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It think its more common to have two mhc but in the simple setup i see no reason for that.
But i could be wrong do you have an idea how we could utilize two mhc?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

To be precise, I don't know how the two mhc should differ.

Copy link
Collaborator

Choose a reason for hiding this comment

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

https://cluster-api.sigs.k8s.io/tasks/automated-machine-management/healthchecking.html#creating-a-machinehealthcheck
there is an example mhc for both workers(node-unhealthy-5m) and controlplane(kcp-unhealthy-5m)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Mhhhh... okay. But the Examples do not differ. But we can definitely do two mhc if you want to be more cluster-api conformant.

unhealthyConditions:
- type: Ready
status: Unknown
timeout: 300s
- type: Ready
status: "False"
timeout: 300s
4 changes: 4 additions & 0 deletions templates/flavors/quick-start/kustomization.yaml
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../base

AltStyle によって変換されたページ (->オリジナル) /