Skip to content

Commit

Permalink
feat: Add merge capability to kcon
Browse files Browse the repository at this point in the history
  • Loading branch information
szinn committed Mar 20, 2024
1 parent cfb1de2 commit a35c94c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions homes/modules/devops/functions/kcon.fish
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ if count $argv > /dev/null
kubectl config use-context staging
case nas
kubectl config use-context nas
case merge
pushd ~/.kube 2>&1 >/dev/null
KUBECONFIG="$(find . -type f -name 'config-*' | tr '\n' ':')" kubectl config view --flatten >all-in-one-kubeconfig.yaml
mv all-in-one-kubeconfig.yaml config
cd ~/.talos
rm config
find . -type f -name 'config-*' | xargs -L 1 talosctl config merge
popd 2>&1 >/dev/null
end
else
echo "kcon main | staging"
Expand Down

0 comments on commit a35c94c

Please sign in to comment.