From 6c86fd035d08bff3670a3db5708805a3a3795c7a Mon Sep 17 00:00:00 2001 From: The_Spider Date: Sat, 21 Aug 2021 13:12:02 +0000 Subject: [PATCH] Update 'nordvpn-autoconfigure.jenkins' --- nordvpn-autoconfigure.jenkins | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/nordvpn-autoconfigure.jenkins b/nordvpn-autoconfigure.jenkins index 21cea9f..bd6c952 100644 --- a/nordvpn-autoconfigure.jenkins +++ b/nordvpn-autoconfigure.jenkins @@ -28,8 +28,8 @@ def nordURLs = [ ] def nordURL = nordURLs[Math.abs(new Random().nextInt() % [8])] -def namespace = "dl-automation" -def secretName = "openvpn" +def kubeNamespace = "dl-automation" +def kubeSecret = "openvpn" podTemplate( label: label, @@ -101,15 +101,15 @@ spec: "apiVersion: v1" \ "kind: Secret" \ "metadata:" \ - " name: ${secretName}" \ - " namespace: \${namespace}" \ + " name: \${kubeSecret}" \ + " namespace: \${kubeNamespace}" \ "data:" \ " openvpn-credentials.txt: \${NORD_CREDS}" \ " us5766.nordvpn.com.tcp.ovpn: \${OPENVPN_CONFIG}" > /tmp/openvpn-secret.kubectl - kubectl apply --namespace \${namespace} -f /tmp/openvpn-secret.kubectl - for i in \$(kubectl get pods --namespace \${namespace} --selector app="deluge" -o name); do - kubectl delete --namespace \${namespace} \${i} + kubectl apply --namespace \${kubeNamespace} -f /tmp/openvpn-secret.kubectl + for i in \$(kubectl get pods --namespace \${kubeNamespace} --selector app="deluge" -o name); do + kubectl delete --namespace \${kubeNamespace} \${i} done """ }