diff --git a/Makefile b/Makefile index a986f95..0508ff3 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/templates/cluster-template.yaml b/templates/base/cluster-template.yaml similarity index 100% rename from templates/cluster-template.yaml rename to templates/base/cluster-template.yaml diff --git a/templates/kustomization.yaml b/templates/base/kustomization.yaml similarity index 81% rename from templates/kustomization.yaml rename to templates/base/kustomization.yaml index 8b6d1fe..4d79dd5 100644 --- a/templates/kustomization.yaml +++ b/templates/base/kustomization.yaml @@ -1,5 +1,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization -namespace: default resources: - cluster-template.yaml \ No newline at end of file diff --git a/templates/flavors/machine-health-check/kustomization.yaml b/templates/flavors/machine-health-check/kustomization.yaml new file mode 100644 index 0000000..59b49d3 --- /dev/null +++ b/templates/flavors/machine-health-check/kustomization.yaml @@ -0,0 +1,5 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - ../../base + - machinehealthcheck.yaml \ No newline at end of file diff --git a/templates/flavors/machine-health-check/machinehealthcheck.yaml b/templates/flavors/machine-health-check/machinehealthcheck.yaml new file mode 100644 index 0000000..84546ef --- /dev/null +++ b/templates/flavors/machine-health-check/machinehealthcheck.yaml @@ -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 \ No newline at end of file diff --git a/templates/flavors/quick-start/kustomization.yaml b/templates/flavors/quick-start/kustomization.yaml new file mode 100644 index 0000000..2eae97f --- /dev/null +++ b/templates/flavors/quick-start/kustomization.yaml @@ -0,0 +1,4 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - ../../base \ No newline at end of file