Archived
Update 'nordvpn-autoconfigure.jenkins'
This commit is contained in:
1 parent
f080b18217
commit
6c86fd035d
1 file changed
+7
-7
@@ -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
|
||||
"""
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user