Update 'nordvpn-autoconfigure.jenkins'
This commit is contained in:
@ -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