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

add MachineHealthCheck #146

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,8 @@ release-metadata: $(RELEASE_DIR)

.PHONY: release-templates
release-templates: $(RELEASE_DIR)
cp templates/cluster-template* $(RELEASE_DIR)/


$(KUSTOMIZE) build templates/flavors/machine-health-check > $(RELEASE_DIR)/cluster-template-mhc.yaml
$(KUSTOMIZE) build templates/flavors/quick-start > $(RELEASE_DIR)/cluster-template.yaml
##@ Build Dependencies

## Location to install dependencies to
Expand Down
File renamed without changes.
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/machine-health-check/kustomization.yaml
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
19 changes: 19 additions & 0 deletions templates/flavors/machine-health-check/machinehealthcheck.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: cluster.x-k8s.io/v1beta1
kind: MachineHealthCheck
metadata:
name: ${CLUSTER_NAME}-unhealthy-5m
namespace: "${NAMESPACE}"
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
4 changes: 4 additions & 0 deletions templates/flavors/quick-start/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../base