Skip to content

Releases: sunny0826/kubecm

kubecm-v0.32.0

01 Nov 05:58
ced3dbc
Compare
Choose a tag to compare

Thanks to @yardenshoham for contributing to kubecm!

Changelog

What's Changed

  • chore(deps): bump github.com/spf13/cobra from 1.8.0 to 1.8.1 by @dependabot in #998
  • chore(deps): bump k8s.io/client-go from 0.30.0 to 0.31.0 by @dependabot in #1000
  • Sort contexts before listing them by @yardenshoham in #1016
  • chore(deps): bump codecov/codecov-action from 4.5.0 to 4.6.0 by @dependabot in #1010
  • chore(deps): bump dawidd6/action-homebrew-bump-formula from 3 to 4 by @dependabot in #1014

Full Changelog: v0.31.0...v0.32.0

kubecm-v0.31.0

01 Aug 02:30
90d08f1
Compare
Choose a tag to compare

Changelog

What's Changed

  • update README & docs by @sunny0826 in #977
  • chore(deps): bump codecov/codecov-action from 4.4.1 to 4.5.0 by @dependabot in #978
  • chore(deps): bump github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common from 1.0.929 to 1.0.948 by @dependabot in #982
  • chore(deps): bump github.com/Azure/azure-sdk-for-go/sdk/azidentity from 1.5.2 to 1.7.0 by @dependabot in #981
  • clean up chinese docs by @sunny0826 in #995
  • feat(cmd): add non-interactively mode to rename command by @sunny0826 in #996

Full Changelog: v0.30.0...v0.31.0

kubecm-v0.30.0

11 Jun 07:28
0ab23a3
Compare
Choose a tag to compare

Changelog

What's Changed

New Contributors

Full Changelog: v0.29.1...v0.30.0

kubecm-v0.29.1

01 Jun 07:37
13fbf30
Compare
Choose a tag to compare

Changelog

Add a new parameter --context to specify the context to be added when running kubecm add or merge command.

Prepare two kubeconfig.

./kubecm list --config kubeconfig1
+------------+-------------+-------------+----------+-------------------------+--------------+
|   CURRENT  |     NAME    |   CLUSTER   |   USER   |          SERVER         |   Namespace  |
+============+=============+=============+==========+=========================+==============+
|      *     |   context1  |   cluster1  |   user1  |   https://example1.com  |    default   |
+------------+-------------+-------------+----------+-------------------------+--------------+

./kubecm list --config kubeconfig2
+------------+-------------+-------------+----------+-------------------------+----------------+
|   CURRENT  |     NAME    |   CLUSTER   |   USER   |          SERVER         |    Namespace   |
+============+=============+=============+==========+=========================+================+
|      *     |   context2  |   cluster2  |   user2  |   https://example2.com  |   kube-system  |
+------------+-------------+-------------+----------+-------------------------+----------------+
|            |   context3  |   cluster3  |   user3  |   https://example3.com  |     default    |
+------------+-------------+-------------+----------+-------------------------+----------------+
|            |   context4  |   cluster4  |   user4  |   https://example4.com  |     default    |
+------------+-------------+-------------+----------+-------------------------+----------------+

Specify context2 and context3 to be added.

./kubecm add --config kubeconfig1 -f kubeconfig2 --context context2,context3

# result
+------------+-------------+-------------+----------+-------------------------+----------------+
|   CURRENT  |     NAME    |   CLUSTER   |   USER   |          SERVER         |    Namespace   |
+============+=============+=============+==========+=========================+================+
|      *     |   context1  |   cluster1  |   user1  |   https://example1.com  |     default    |
+------------+-------------+-------------+----------+-------------------------+----------------+
|            |   context2  |   cluster2  |   user2  |   https://example2.com  |   kube-system  |
+------------+-------------+-------------+----------+-------------------------+----------------+
|            |   context3  |   cluster3  |   user3  |   https://example3.com  |     default    |
+------------+-------------+-------------+----------+-------------------------+----------------+

Specify context1 and context2 to be merged.

./kubecm merge kubeconfig1 kubeconfig2 --context context1,context2

# result
+------------+-------------+-------------+----------+-------------------------+----------------+
|   CURRENT  |     NAME    |   CLUSTER   |   USER   |          SERVER         |    Namespace   |
+============+=============+=============+==========+=========================+================+
|            |   context1  |   cluster1  |   user1  |   https://example1.com  |     default    |
+------------+-------------+-------------+----------+-------------------------+----------------+
|            |   context2  |   cluster2  |   user2  |   https://example2.com  |   kube-system  |
+------------+-------------+-------------+----------+-------------------------+----------------+

Specify the contexts to be added after overwriting the name with the context template.

./kubecm add --config kubeconfig1 -f kubeconfig2 --context cluster2-user2,cluster3-user3 --context-template cluster,user

# result
+------------+-------------------+-------------+----------+-------------------------+----------------+
|   CURRENT  |        NAME       |   CLUSTER   |   USER   |          SERVER         |    Namespace   |
+============+===================+=============+==========+=========================+================+
|            |   cluster2-user2  |   cluster2  |   user2  |   https://example2.com  |   kube-system  |
+------------+-------------------+-------------+----------+-------------------------+----------------+
|            |   cluster3-user3  |   cluster3  |   user3  |   https://example3.com  |     default    |
+------------+-------------------+-------------+----------+-------------------------+----------------+
|      *     |      context1     |   cluster1  |   user1  |   https://example1.com  |     default    |
+------------+-------------------+-------------+----------+-------------------------+----------------+

What's Changed

  • chore(deps): bump codecov/codecov-action from 4.4.0 to 4.4.1 by @dependabot in #957
  • chore(deps): bump github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke from 1.0.890 to 1.0.929 by @dependabot in #958
  • feat: allow specify the context to be added by @cr7258 in #962

Full Changelog: v0.29.0...v0.29.1

kubecm-v0.29.0

23 May 09:02
915c93b
Compare
Choose a tag to compare

Highlight

Thanks to @cr7258 for his outstanding contribution to solving a long-standing issue #768 .

Generate context name by specific attributes

Use two kubeconfig files for testing.

./kubecm list --config kubeconfig1
+------------+-------------+-------------+----------+-------------------------+--------------+
|   CURRENT  |     NAME    |   CLUSTER   |   USER   |          SERVER         |   Namespace  |
+============+=============+=============+==========+=========================+==============+
|      *     |   context1  |   cluster1  |   user1  |   https://example1.com  |    default   |
+------------+-------------+-------------+----------+-------------------------+--------------+
./kubecm list --config kubeconfig2
+------------+-------------+-------------+----------+-------------------------+----------------+
|   CURRENT  |     NAME    |   CLUSTER   |   USER   |          SERVER         |    Namespace   |
+============+=============+=============+==========+=========================+================+
|      *     |   context2  |   cluster2  |   user2  |   https://example2.com  |   kube-system  |
+------------+-------------+-------------+----------+-------------------------+----------------+
|            |   context3  |   cluster3  |   user3  |   https://example3.com  |     default    |
+------------+-------------+-------------+----------+-------------------------+----------------+
|            |   context4  |   cluster4  |   user4  |   https://example4.com  |     default    |
+------------+-------------+-------------+----------+-------------------------+----------------+

Case 1: Use the default context-template value ("context")
The context name is the same as the original kubeconfig.

./kubecm add --config kubeconfig1 -f kubeconfig2

# result
+------------+-------------+-------------+----------+-------------------------+----------------+
|   CURRENT  |     NAME    |   CLUSTER   |   USER   |          SERVER         |    Namespace   |
+============+=============+=============+==========+=========================+================+
|      *     |   context1  |   cluster1  |   user1  |   https://example1.com  |     default    |
+------------+-------------+-------------+----------+-------------------------+----------------+
|            |   context2  |   cluster2  |   user2  |   https://example2.com  |   kube-system  |
+------------+-------------+-------------+----------+-------------------------+----------------+
|            |   context3  |   cluster3  |   user3  |   https://example3.com  |     default    |
+------------+-------------+-------------+----------+-------------------------+----------------+
|            |   context4  |   cluster4  |   user4  |   https://example4.com  |     default    |
+------------+-------------+-------------+----------+-------------------------+----------------+

Case 2: Define context template

./kubecm add --config kubeconfig1 -f kubeconfig2 --context-template filename,cluster,user

# result
+------------+-------------------------------+-------------+----------+-------------------------+----------------+
|   CURRENT  |              NAME             |   CLUSTER   |   USER   |          SERVER         |    Namespace   |
+============+===============================+=============+==========+=========================+================+
|      *     |            context1           |   cluster1  |   user1  |   https://example1.com  |     default    |
+------------+-------------------------------+-------------+----------+-------------------------+----------------+
|            |   kubeconfig2-cluster2-user2  |   cluster2  |   user2  |   https://example2.com  |   kube-system  |
+------------+-------------------------------+-------------+----------+-------------------------+----------------+
|            |   kubeconfig2-cluster3-user3  |   cluster3  |   user3  |   https://example3.com  |     default    |
+------------+-------------------------------+-------------+----------+-------------------------+----------------+
|            |   kubeconfig2-cluster4-user4  |   cluster4  |   user4  |   https://example4.com  |     default    |
+------------+-------------------------------+-------------+----------+-------------------------+----------------+

Case 3: Define context template and context prefix

./kubecm add --config kubeconfig1 -f kubeconfig2 --context-template cluster,user --context-prefix demo

# result
+------------+------------------------+-------------+----------+-------------------------+----------------+
|   CURRENT  |          NAME          |   CLUSTER   |   USER   |          SERVER         |    Namespace   |
+============+========================+=============+==========+=========================+================+
|      *     |        context1        |   cluster1  |   user1  |   https://example1.com  |     default    |
+------------+------------------------+-------------+----------+-------------------------+----------------+
|            |   demo-cluster2-user2  |   cluster2  |   user2  |   https://example2.com  |   kube-system  |
+------------+------------------------+-------------+----------+-------------------------+----------------+
|            |   demo-cluster3-user3  |   cluster3  |   user3  |   https://example3.com  |     default    |
+------------+------------------------+-------------+----------+-------------------------+----------------+
|            |   demo-cluster4-user4  |   cluster4  |   user4  |   https://example4.com  |     default    |
+------------+------------------------+-------------+----------+-------------------------+----------------+

Case 4: kubecm merge with context template

./kubecm merge kubeconfig1 kubeconfig2 --context-template cluster,user

# result
+------------+-------------------+-------------+----------+-------------------------+----------------+
|   CURRENT  |        NAME       |   CLUSTER   |   USER   |          SERVER         |    Namespace   |
+============+===================+=============+==========+=========================+================+
|            |   cluster1-user1  |   cluster1  |   user1  |   https://example1.com  |     default    |
+------------+-------------------+-------------+----------+-------------------------+----------------+
|            |   cluster2-user2  |   cluster2  |   user2  |   https://example2.com  |   kube-system  |
+------------+-------------------+-------------+----------+-------------------------+----------------+
|            |   cluster3-user3  |   cluster3  |   user3  |   https://example3.com  |     default    |
+------------+-------------------+-------------+----------+-------------------------+----------------+
|            |   cluster4-user4  |   cluster4  |   user4  |   https://example4.com  |     default    |
+------------+-------------------+-------------+----------+-------------------------+----------------+

Case 5: Define context name
it's useful if there is only one context in the kubeconfig file.

./kubecm add --config kubeconfig2 -f kubeconfig1 --context-name seven

# result
+------------+-------------+-------------+----------+-------------------------+----------------+
|   CURRENT  |     NAME    |   CLUSTER   |   USER   |          SERVER         |    Namespace   |
+============+=============+=============+==========+=========================+================+
|      *     |   context2  |   cluster2  |   user2  |   https://example2.com  |   kube-system  |
+------------+-------------+-------------+----------+-------------------------+----------------+
|            |   context3  |   cluster3  |   user3  |   https://example3.com  |     default    |
+------------+-------------+-------------+----------+-------------------------+----------------+
|            |   context4  |   cluster4  |   user4  |   https://example4.com  |     default    |
+------------+-------------+-------------+----------+-------------------------+----------------+
|            |    seven    |   cluster1  |   user1  |   https://example1.com  |     default    |
+------------+-------------+-------------+----------+-------------------------+----------------+

If the kubeconfig file contains more than 1 context, an incremental number will be added as a suffix.

./kubecm add --config kubeconfig1 -f kubeconfig2 --context-name seven
Add Context: seven
Add Context: seven-2
Add Context: seven-3

Allow select context for kubecm add and merge command

Add the --select-context parameter allowing the user to choose which context should be added when running the kubecm add and kubecm merge commands.

Prepare two kubeconfig.

./kubecm list --config kubeconfig1
+------------+-------------+-------------+----------+-------------------------+--------------+
|   CURRENT  |     NAME    |   CLUSTER   |   USER   |          SERVER         |   Namespace  |
+============+=============+=============+==========+=========================+==============+
|      *     |   context1  |   cluster1  |   user1  |   https://example1.com  |    default   |
+------------+-------------+-------------+----------+-------------------------+--------------+

./kubecm list --config kubeconfig2
+------------+-------------+-------------+----------+-------------------------+--------------+
|   CURRENT  |     NAME    |   CLUSTER   |   USER   |          SERVER         |   Namespace  |
+============+=============+=============+==========+=========================+==============+
|      *     |   context2  |   cluster2  |   user2  |   https://example2.com  |    default   |
+------------+-------------+-------------+----------+-------------------------+--------------+
|            |   context3  |   cluster3  |   user3  |   https://example3.com  |    default   |
+------------+-----------...
Read more

kubecm-v0.28.0

22 Jan 06:53
Compare
Choose a tag to compare

Changelog

What's Changed

Full Changelog: v0.27.1...v0.28.0

kubecm-v0.27.1

16 Jan 01:44
5ac99a3
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.27.0...v0.27.1

kubecm-v0.27.0

09 Jan 03:03
65e78a4
Compare
Choose a tag to compare

acknowledgement

Thanks to @yardenshoham for the contribution!

Changelog

Features

Docs

Others

kubecm-v0.26.0

25 Dec 07:10
dff8106
Compare
Choose a tag to compare

acknowledgement

Thanks to @dennislapchenko @nekomeowww @MaxAnderson95 for the contribution!

Changelog

Features

Others

kubecm-v0.25.0

10 Jul 06:17
bfd26f7
Compare
Choose a tag to compare

Changelog

Features

Others

  • bfd26f7: chore(deps): bump github.com/savioxavier/termlink from 1.2.1 to 1.3.0 (#726) (@dependabot[bot])