Update 'nordvpn-autoconfigure.jenkins'

This commit is contained in:
Hyatt 2021-08-21 13:15:56 +00:00
parent 6c86fd035d
commit a8a56f13b8

View File

@ -101,15 +101,15 @@ spec:
"apiVersion: v1" \
"kind: Secret" \
"metadata:" \
" name: \${kubeSecret}" \
" namespace: \${kubeNamespace}" \
" name: """ + kubeSecret + """" \
" namespace: """ + kubeNamespace + """" \
"data:" \
" openvpn-credentials.txt: \${NORD_CREDS}" \
" us5766.nordvpn.com.tcp.ovpn: \${OPENVPN_CONFIG}" > /tmp/openvpn-secret.kubectl
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}
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
"""
}