From 00301da4c032a14548deba493f6f8c088a1f401a Mon Sep 17 00:00:00 2001 From: Rahul Sharma Date: Tue, 17 Dec 2024 20:10:51 +0000 Subject: [PATCH 1/2] test commit --- Makefile | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index d6685581..b7364450 100644 --- a/Makefile +++ b/Makefile @@ -153,9 +153,24 @@ create-capl-cluster: # Create a CAPL cluster with updated CCM and wait for it to be ready kubectl apply -f capl-cluster-manifests.yaml kubectl wait --for=condition=ControlPlaneReady cluster/$(CLUSTER_NAME) --timeout=600s || (kubectl get cluster -o yaml; kubectl get linodecluster -o yaml; kubectl get linodemachines -o yaml) - kubectl wait --for=condition=NodeHealthy=true machines -l cluster.x-k8s.io/cluster-name=$(CLUSTER_NAME) --timeout=900s + kubectl wait --for=condition=NodeHealthy=true machines -l cluster.x-k8s.io/cluster-name=$(CLUSTER_NAME) --timeout=900s || \ + ( \ + clusterctl get kubeconfig $(CLUSTER_NAME) > $(KUBECONFIG_PATH) \ + kubectl get machinedeployment -A -o yaml; \ + kubectl get linodemachine -A -o yaml; \ + KUBECONFIG=$(KUBECONFIG_PATH) kubectl get nodes -o wide; \ + KUBECONFIG=$(KUBECONFIG_PATH) kubectl get pods -A -o wide; \ + KUBECONFIG=$(KUBECONFIG_PATH) kubectl get events -A; \ + ) clusterctl get kubeconfig $(CLUSTER_NAME) > $(KUBECONFIG_PATH) - KUBECONFIG=$(KUBECONFIG_PATH) kubectl wait --for=condition=Ready nodes --all --timeout=600s + KUBECONFIG=$(KUBECONFIG_PATH) kubectl wait --for=condition=Ready nodes --all --timeout=600s || \ + ( \ + kubectl get machinedeployment -A -o yaml; \ + kubectl get linodemachine -A -o yaml; \ + KUBECONFIG=$(KUBECONFIG_PATH) kubectl get nodes -o wide; \ + KUBECONFIG=$(KUBECONFIG_PATH) kubectl get pods -A -o wide; \ + KUBECONFIG=$(KUBECONFIG_PATH) kubectl get events -A; \ + ) # Remove all taints from control plane node so that pods scheduled on it by tests can run (without this, some tests fail) KUBECONFIG=$(KUBECONFIG_PATH) kubectl taint nodes -l node-role.kubernetes.io/control-plane node-role.kubernetes.io/control-plane- From f9d7d918c570e480b2371d35372060d824785e34 Mon Sep 17 00:00:00 2001 From: Rahul Sharma Date: Tue, 17 Dec 2024 23:28:58 +0000 Subject: [PATCH 2/2] test --- Makefile | 7 ++++++- devbox.json | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index b7364450..3a8d38af 100644 --- a/Makefile +++ b/Makefile @@ -152,12 +152,16 @@ generate-capl-cluster-manifests: create-capl-cluster: # Create a CAPL cluster with updated CCM and wait for it to be ready kubectl apply -f capl-cluster-manifests.yaml + kubectl patch linodemachinetemplate $(CLUSTER_NAME)-control-plane --type='json' -p="[{'op': 'add', 'path': '/spec/template/spec/authorizedKeys', 'value': ['ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC7EoJcN35JMvl2znOz9sFYfCeziG/jFTeApBg36l7XhWRknqBXLFAMmZT8JLCpUB2GIaiTzXittsYsOeRinXWVl4VKG8/Kq8wjxTe6WXK52LfH4SVpNoMZt/vV58NBqY776Rd8wt6OjBDsg8eYsApZHeeQA/PIQtDUAOpSTLk6w2qsfqBIaP0t9+KkHRN4dd2LpAvN3SEXOgfN6fGmW41+9Aq2W7bLNfOogmD0B78JRsYemNCQeT/OHhX66Wrr+hyhsYvfqvl8GvbW5hHxO2/IrnY5u0TFyGf+4RPruTYP6TTXK55JFUEY1K3ur/mQ4ENGl9l6OuwDnmo71NI5rWD56oEJvvtiW6VV6DYM4Y2xpMVcGcoFNA4OQc/YIwVVTge1aKKXOzShSN11EO5G1UCR4J3EQ8XyOt6H0swBpd0Kvvw5uvJoYrY2eZOeNOXCpD5mIxFCoAGJitGUfzw69j8rm1UBpTBBuDW/EdnG4VbzlJPrAGAl1k5mLJoRJ31xtq8= rahsharm@my-linux-vm']}]" + kubectl patch linodemachinetemplate $(CLUSTER_NAME)-md-0 --type='json' -p="[{'op': 'add', 'path': '/spec/template/spec/authorizedKeys', 'value': ['ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC7EoJcN35JMvl2znOz9sFYfCeziG/jFTeApBg36l7XhWRknqBXLFAMmZT8JLCpUB2GIaiTzXittsYsOeRinXWVl4VKG8/Kq8wjxTe6WXK52LfH4SVpNoMZt/vV58NBqY776Rd8wt6OjBDsg8eYsApZHeeQA/PIQtDUAOpSTLk6w2qsfqBIaP0t9+KkHRN4dd2LpAvN3SEXOgfN6fGmW41+9Aq2W7bLNfOogmD0B78JRsYemNCQeT/OHhX66Wrr+hyhsYvfqvl8GvbW5hHxO2/IrnY5u0TFyGf+4RPruTYP6TTXK55JFUEY1K3ur/mQ4ENGl9l6OuwDnmo71NI5rWD56oEJvvtiW6VV6DYM4Y2xpMVcGcoFNA4OQc/YIwVVTge1aKKXOzShSN11EO5G1UCR4J3EQ8XyOt6H0swBpd0Kvvw5uvJoYrY2eZOeNOXCpD5mIxFCoAGJitGUfzw69j8rm1UBpTBBuDW/EdnG4VbzlJPrAGAl1k5mLJoRJ31xtq8= rahsharm@my-linux-vm']}]" kubectl wait --for=condition=ControlPlaneReady cluster/$(CLUSTER_NAME) --timeout=600s || (kubectl get cluster -o yaml; kubectl get linodecluster -o yaml; kubectl get linodemachines -o yaml) kubectl wait --for=condition=NodeHealthy=true machines -l cluster.x-k8s.io/cluster-name=$(CLUSTER_NAME) --timeout=900s || \ ( \ - clusterctl get kubeconfig $(CLUSTER_NAME) > $(KUBECONFIG_PATH) \ kubectl get machinedeployment -A -o yaml; \ kubectl get linodemachine -A -o yaml; \ + kubectl describe helmchartproxy; \ + kubectl get events; \ + clusterctl get kubeconfig $(CLUSTER_NAME) > $(KUBECONFIG_PATH) \ KUBECONFIG=$(KUBECONFIG_PATH) kubectl get nodes -o wide; \ KUBECONFIG=$(KUBECONFIG_PATH) kubectl get pods -A -o wide; \ KUBECONFIG=$(KUBECONFIG_PATH) kubectl get events -A; \ @@ -167,6 +171,7 @@ create-capl-cluster: ( \ kubectl get machinedeployment -A -o yaml; \ kubectl get linodemachine -A -o yaml; \ + kubectl describe helmchartproxy; \ KUBECONFIG=$(KUBECONFIG_PATH) kubectl get nodes -o wide; \ KUBECONFIG=$(KUBECONFIG_PATH) kubectl get pods -A -o wide; \ KUBECONFIG=$(KUBECONFIG_PATH) kubectl get events -A; \ diff --git a/devbox.json b/devbox.json index d2a43fe8..2955cb0a 100644 --- a/devbox.json +++ b/devbox.json @@ -21,7 +21,7 @@ "scripts": { "mgmt-and-capl-cluster": "make mgmt-and-capl-cluster", "e2e-test": "make e2e-test", - "cleanup-cluster": "make cleanup-cluster" + "cleanup-cluster": "echo abc" } }, "env": {