You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update Go version and dependencies; add test cases for merging duplic… (#6)
* Update Go version and dependencies; add test cases for merging duplicated contexts, clusters, and users
* Update GitHub Actions workflows to use latest action versions
* formatted
* Refactor validation functions to export them and add unit tests for parsing and validation
* Fix missing newline at end of file in main_test.go
* Update README and main.go for improved CLI tool description and argument handling
If you are someone who works with a significant number of Kubernetes clusters, dealing with `kubecontext` in a manual way can be **boring** and also **result in problems**.
10
-
In addition to that, I am currently working with more than 20 customers, which results in an average of five clusters per customer.
8
+
# 🌟 kubeconfig-merge
11
9
12
-
## Install
10
+
`kubeconfig-merge` is a lightweight and efficient CLI tool designed to **merge multiple Kubernetes `kubeconfig` files** into a single, well-structured configuration. It ensures that the resulting configuration is clean, free of conflicts, and compatible with `kubectl` and other Kubernetes clients.
11
+
12
+
## 🚀 Features
13
+
14
+
✔ **Merge multiple `kubeconfig` files** into one unified configuration
15
+
✔ **Preserve existing contexts, clusters, and users** without conflicts
16
+
✔ **Ensure a clean and well-structured config file**
17
+
✔ **Works seamlessly with `kubectl` and Kubernetes clients**
18
+
✔ **Lightweight, fast, and easy to use**
19
+
20
+
## 📌 Installation
13
21
14
22
### Install on Linux
15
23
@@ -25,7 +33,6 @@ The following instruction list covers all of the Linux distributions (Ubuntu, De
kubeConfigPtr:=flag.String("kubeconfig", "", fmt.Sprintf("path to the kubeconfig file (defaults '%s' or '%s')", KUBECONFIG_ENV_KEY, KUBECONFIG_DEFAULT_PATH))
158
207
filePtr:=flag.String("file", "", "path to the yaml file that to be append into kubeconfig")
159
-
namePtr:=flag.String("name", "", "Replaces the name of context, user and cluster (default file name of --file argument)")
208
+
overridePtr:=flag.Bool("override", false, "Override the existing context, user and cluster with the file name, or the fields in the file will be used")
0 commit comments