Skip to content

Commit

Permalink
Merge branch 'main' into e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
deepakm-ntnx committed Aug 30, 2022
2 parents e81952e + 6807399 commit 35e1eb7
Show file tree
Hide file tree
Showing 7 changed files with 73 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,8 @@ cluster-e2e-templates-v1beta1: $(KUSTOMIZE) ## Generate cluster templates for v1
$(KUSTOMIZE) build $(NUTANIX_E2E_TEMPLATES)/v1beta1/cluster-template-project --load-restrictor LoadRestrictionsNone > $(NUTANIX_E2E_TEMPLATES)/v1beta1/cluster-template-project.yaml
$(KUSTOMIZE) build $(NUTANIX_E2E_TEMPLATES)/v1beta1/cluster-template-ccm --load-restrictor LoadRestrictionsNone > $(NUTANIX_E2E_TEMPLATES)/v1beta1/cluster-template-ccm.yaml
$(KUSTOMIZE) build $(NUTANIX_E2E_TEMPLATES)/v1beta1/cluster-template-upgrades --load-restrictor LoadRestrictionsNone > $(NUTANIX_E2E_TEMPLATES)/v1beta1/cluster-template-upgrades.yaml
$(KUSTOMIZE) build $(NUTANIX_E2E_TEMPLATES)/v1beta1/cluster-template-md-remediation --load-restrictor LoadRestrictionsNone > $(NUTANIX_E2E_TEMPLATES)/v1beta1/cluster-template-md-remediation.yaml
$(KUSTOMIZE) build $(NUTANIX_E2E_TEMPLATES)/v1beta1/cluster-template-kcp-remediation --load-restrictor LoadRestrictionsNone > $(NUTANIX_E2E_TEMPLATES)/v1beta1/cluster-template-kcp-remediation.yaml

cluster-templates: $(KUSTOMIZE) ## Generate cluster templates for all flavors
$(KUSTOMIZE) build $(TEMPLATES_DIR)/base > $(TEMPLATES_DIR)/cluster-template.yaml
Expand Down
2 changes: 2 additions & 0 deletions test/e2e/config/nutanix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ providers:
- sourcePath: "../data/infrastructure-nutanix/v1beta1/cluster-template-project.yaml"
- sourcePath: "../data/infrastructure-nutanix/v1beta1/cluster-template-ccm.yaml"
- sourcePath: "../data/infrastructure-nutanix/v1beta1/cluster-template-upgrades.yaml"
- sourcePath: "../data/infrastructure-nutanix/v1beta1/cluster-template-md-remediation.yaml"
- sourcePath: "../data/infrastructure-nutanix/v1beta1/cluster-template-kcp-remediation.yaml"

variables:
# Default variables for the e2e test; those values could be overridden via env variables, thus
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
bases:
- ../bases/cluster-with-kcp.yaml
- ../bases/secret.yaml
- ../bases/nmt.yaml
- ../bases/crs.yaml
- ../bases/md.yaml
- ./mhc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
# Source: https://github.com/kubernetes-sigs/cluster-api/blob/main/test/e2e/data/infrastructure-docker/v1beta1/cluster-template-kcp-remediation/mhc.yaml

# MachineHealthCheck object with
# - a selector that targets all the machines with label cluster.x-k8s.io/control-plane=""
# - unhealthyConditions triggering remediation after 10s the condition is set
apiVersion: cluster.x-k8s.io/v1beta1
kind: MachineHealthCheck
metadata:
name: "${CLUSTER_NAME}-mhc-0"
namespace: "${NAMESPACE}"
spec:
clusterName: "${CLUSTER_NAME}"
maxUnhealthy: 100%
selector:
matchLabels:
cluster.x-k8s.io/control-plane: ""
unhealthyConditions:
- type: e2e.remediation.condition
status: "False"
timeout: 10s
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
bases:
- ../bases/cluster-with-kcp.yaml
- ../bases/secret.yaml
- ../bases/nmt.yaml
- ../bases/crs.yaml
- ../bases/md.yaml
- ./mhc.yaml

patchesStrategicMerge:
- ./md.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: cluster.x-k8s.io/v1beta1
kind: MachineDeployment
metadata:
name: "${CLUSTER_NAME}-wmd"
namespace: "${NAMESPACE}"
spec:
template:
metadata:
labels:
"e2e.remediation.label": ""
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
# Source: https://github.com/kubernetes-sigs/cluster-api/blob/main/test/e2e/data/infrastructure-docker/v1beta1/cluster-template-md-remediation/mhc.yaml

# MachineHealthCheck object with
# - a selector that targets all the machines with label e2e.remediation.label=""
# - unhealthyConditions triggering remediation after 10s the condition is set
apiVersion: cluster.x-k8s.io/v1beta1
kind: MachineHealthCheck
metadata:
name: "${CLUSTER_NAME}-mhc-0"
namespace: "${NAMESPACE}"
spec:
clusterName: "${CLUSTER_NAME}"
maxUnhealthy: 100%
selector:
matchLabels:
e2e.remediation.label: ""
unhealthyConditions:
- type: e2e.remediation.condition
status: "False"
timeout: 10s

0 comments on commit 35e1eb7

Please sign in to comment.