mcp-server-kubernetes 3.0.3 → 3.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -146,10 +146,13 @@ export class KubernetesManager {
|
|
|
146
146
|
if (!process.env.K8S_SERVER || !process.env.K8S_TOKEN) {
|
|
147
147
|
throw new Error("K8S_SERVER and K8S_TOKEN environment variables are required");
|
|
148
148
|
}
|
|
149
|
+
// When K8S_CA_DATA is provided, force skipTLSVerify to false as they are incompatible
|
|
150
|
+
const hasCAData = !!(process.env.K8S_CA_DATA && process.env.K8S_CA_DATA.trim());
|
|
151
|
+
const skipTLSVerify = hasCAData ? false : process.env.K8S_SKIP_TLS_VERIFY === "true";
|
|
149
152
|
const cluster = {
|
|
150
153
|
name: "env-cluster",
|
|
151
154
|
server: process.env.K8S_SERVER,
|
|
152
|
-
skipTLSVerify
|
|
155
|
+
skipTLSVerify,
|
|
153
156
|
caData: process.env.K8S_CA_DATA || undefined,
|
|
154
157
|
};
|
|
155
158
|
const user = {
|