Skip to content

Commit 73996ba

Browse files
authored
feat: kubeconfig context by env (#354)
1 parent 135d42c commit 73996ba

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

packages/common/config/load-config.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,15 @@ const loadConfig = async (
534534
kubeconfigContext: {
535535
option: "kubeconfigContext",
536536
env: "KS_KUBECONFIG_CONTEXT",
537+
transform: async (kubeconfigContext, config) => {
538+
if (
539+
typeof kubeconfigContext !== "object" ||
540+
kubeconfigContext === null
541+
) {
542+
return kubeconfigContext
543+
}
544+
return kubeconfigContext[config.environment]
545+
},
537546
},
538547
linksSelfLocation: {
539548
default: "socialgouv/kontinuous",

0 commit comments

Comments
 (0)