Skip to content

Add support for upgrading test2 cluster in demo2 #74

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

moshiurH
Copy link

@moshiurH moshiurH commented Feb 11, 2025

Was able to upgrade my test2 cluster from demo1 with this updated demo2 code:

$ make apply-cluster-deployment-aws-test2-0.0.2
Applying changes:
diff --color -N -u /tmp/LIVE-2629861445/k0rdent.mirantis.com.v1alpha1.ClusterDeployment.k0rdent.k0rdent-aws-test2-moshiur /tmp/MERGED-3589346377/k0rdent.mirantis.com.v1alpha1.ClusterDeployment.k0rdent.k0rdent-aws-test2-moshiur
--- /tmp/LIVE-2629861445/k0rdent.mirantis.com.v1alpha1.ClusterDeployment.k0rdent.k0rdent-aws-test2-moshiur      2025-02-11 15:35:46.758117913 +0000
+++ /tmp/MERGED-3589346377/k0rdent.mirantis.com.v1alpha1.ClusterDeployment.k0rdent.k0rdent-aws-test2-moshiur    2025-02-11 15:35:46.762117936 +0000
@@ -7,7 +7,7 @@
   creationTimestamp: "2025-02-11T14:45:41Z"
   finalizers:
   - k0rdent.mirantis.com/cluster-deployment
-  generation: 1
+  generation: 2
   labels:
     k0rdent.mirantis.com/component: kcm
   name: k0rdent-aws-test2-moshiur
@@ -31,7 +31,7 @@
   serviceSpec:
     priority: 100
     stopOnConflict: false
-  template: demo-aws-standalone-cp-0.0.1
+  template: demo-aws-standalone-cp-0.0.2
 status:
   availableUpgrades:
   - demo-aws-standalone-cp-0.0.2
clusterdeployment.k0rdent.mirantis.com/k0rdent-aws-test2-moshiur configured

ubuntu@ip-172-16-10-234:~/Github/demos$ PATH=$PATH:./bin kubectl -n k0rdent get machines
NAME                                       CLUSTER                     NODENAME                                   PROVIDERID                              PHASE     AGE     VERSION
k0rdent-aws-test1-moshiur-cp-0             k0rdent-aws-test1-moshiur   k0rdent-aws-test1-moshiur-cp-0             aws:///us-east-1a/i-02800b76b6b693fad   Running   53m     v1.31.3+k0s.0
k0rdent-aws-test1-moshiur-md-mwh97-bvldt   k0rdent-aws-test1-moshiur   k0rdent-aws-test1-moshiur-md-mwh97-bvldt   aws:///us-east-1a/i-0fcbe1e03123330da   Running   40m     v1.31.3
k0rdent-aws-test1-moshiur-md-mwh97-z6psr   k0rdent-aws-test1-moshiur   k0rdent-aws-test1-moshiur-md-mwh97-z6psr   aws:///us-east-1a/i-04452c20c54ccaf29   Running   36m     v1.31.3
k0rdent-aws-test2-moshiur-cp-0             k0rdent-aws-test2-moshiur   k0rdent-aws-test2-moshiur-cp-0             aws:///us-east-1a/i-09a8027b22ddf3db0   Running   53m     v1.31.3+k0s.0
k0rdent-aws-test2-moshiur-md-6lzfr-fw2ns   k0rdent-aws-test2-moshiur   k0rdent-aws-test2-moshiur-md-6lzfr-fw2ns   aws:///us-east-1a/i-030ea3b6a9e69bb56   Running   2m48s   v1.31.3
k0rdent-aws-test2-moshiur-md-6lzfr-j7pms   k0rdent-aws-test2-moshiur   k0rdent-aws-test2-moshiur-md-6lzfr-j7pms   aws:///us-east-1a/i-027be4c69f23beb41   Running   5m43s   v1.31.3

Without this change, trying to upgrade test2 cluster leads to the following error:

$ make apply-cluster-deployment-aws-test2-0.0.2
/bin/bash: -c: line 3: syntax error near unexpected token `|'
/bin/bash: -c: line 3: `        envsubst <  | KUBECTL_EXTERNAL_DIFF="diff --color -N -u" PATH="/home/ubuntu/Github/demos/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin" kubectl diff  -f - || true; \'
make: *** [Makefile:271: apply-cluster-deployment-aws-test2-0.0.2] Error 2

@moshiurH
Copy link
Author

The change also worked for Azure upgrade as well:

ubuntu@ip-172-16-10-234:~/Github/demos$ KUBECONFIG="kubeconfigs/k0rdent-azure-test1.kubeconfig" PATH=$PATH:./bin kubectl get node
NAME                                         STATUS   ROLES           AGE     VERSION
k0rdent-azure-test1-moshiur-cp-0             Ready    control-plane   19m     v1.31.2+k0s
k0rdent-azure-test1-moshiur-md-7nrzg-7hcqh   Ready    <none>          5m11s   v1.31.2+k0s
k0rdent-azure-test1-moshiur-md-7nrzg-vll88   Ready    <none>          9m18s   v1.31.2+k0s
ubuntu@ip-172-16-10-234:~/Github/demos$ KUBECONFIG="kubeconfigs/k0rdent-azure-test2.kubeconfig" PATH=$PATH:./bin kubectl get node
NAME                                         STATUS   ROLES           AGE     VERSION
k0rdent-azure-test2-moshiur-cp-0             Ready    control-plane   19m     v1.31.2+k0s
k0rdent-azure-test2-moshiur-md-zscbp-kwvvb   Ready    <none>          6m19s   v1.31.2+k0s
k0rdent-azure-test2-moshiur-md-zscbp-w4xq5   Ready    <none>          2m57s   v1.31.2+k0s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant