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

test PR for GHA debugging #279

Closed
wants to merge 2 commits into from
Closed
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
24 changes: 22 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,30 @@ 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
kubectl wait --for=condition=NodeHealthy=true machines -l cluster.x-k8s.io/cluster-name=$(CLUSTER_NAME) --timeout=900s || \
( \
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; \
)
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; \
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; \
)
# 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-

Expand Down
2 changes: 1 addition & 1 deletion devbox.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
Loading