From a126c81bc806debd48aa8d2c862c76276dd04d69 Mon Sep 17 00:00:00 2001 From: nomadics9 Date: Mon, 13 Jan 2025 21:04:35 +0300 Subject: [PATCH] traefik patch --- loadBalancer/traefik-helm/ssh-patch.sh | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/loadBalancer/traefik-helm/ssh-patch.sh b/loadBalancer/traefik-helm/ssh-patch.sh index 29dabce..52a1151 100755 --- a/loadBalancer/traefik-helm/ssh-patch.sh +++ b/loadBalancer/traefik-helm/ssh-patch.sh @@ -1,15 +1,15 @@ #!/usr/bin/env bash -kubectl patch svc traefik -n traefik --type='merge' -p '{ - "spec": { - "ports": [ - { - "name": "ssh", - "port": 22, - "targetPort": 22, - "nodePort": 30222, - "protocol": "TCP" - } - ] +kubectl patch svc traefik -n traefik --type='json' -p='[ + { + "op": "add", + "path": "/spec/ports/-", + "value": { + "name": "ssh", + "port": 22, + "targetPort": 22, + "nodePort": 30222, + "protocol": "TCP" + } } -}' +]'