File tree Expand file tree Collapse file tree 1 file changed +16
-9
lines changed Expand file tree Collapse file tree 1 file changed +16
-9
lines changed Original file line number Diff line number Diff line change 32
32
base64=" base64"
33
33
fi
34
34
35
- kubectl apply --namespace=$namespace -f - << - EOSECRETS
35
+ kuberes=' ./kube/kube-resources'
36
+ mkdir $kuberes
37
+
38
+ echo " Generating Kubernetes ressources"
39
+
40
+ cat << EOSECRETS > $kuberes /openvpn-pki.yaml
36
41
apiVersion: v1
37
42
kind: Secret
38
43
metadata:
47
52
---
48
53
EOSECRETS
49
54
50
- kubectl create configmap --namespace=$namespace openvpn-crl --from-file=crl.pem=$PWD /pki/crl.pem
51
-
52
- kubectl apply --namespace=$namespace -f - << - EOCONFIGMAP
55
+ cat << EOCONFIGMAP > $kuberes /openvpn-settings.yaml
53
56
apiVersion: v1
54
57
kind: ConfigMap
55
58
metadata:
61
64
---
62
65
EOCONFIGMAP
63
66
64
- kubectl apply --namespace=$namespace -f ./kube/configmaps-example.yaml
65
-
66
- sed " s/\$ {OVPN_CN}/${OVPN_CN} /g;" kube/deployment.yaml | kubectl create --namespace=$namespace -f -
67
-
68
- kubectl apply --namespace=$namespace -f - << - EOSERVICE
67
+ cat << EOSERVICE > $kuberes /openvpn-svc.yaml
69
68
---
70
69
apiVersion: v1
71
70
kind: Service
83
82
openvpn: ${OVPN_CN}
84
83
---
85
84
EOSERVICE
85
+
86
+ echo " Creating and applying Kubernetes ressources"
87
+ kubectl create configmap --namespace=$namespace openvpn-crl --from-file=crl.pem=$PWD /pki/crl.pem
88
+ kubectl apply --namespace=$namespace -f ./kube/configmaps-example.yaml
89
+ kubectl apply --namespace=$namespace -f $kuberes /openvpn-pki.yaml
90
+ kubectl apply --namespace=$namespace -f $kuberes /openvpn-settings.yaml
91
+ kubectl apply --namespace=$namespace -f $kuberes /openvpn-svc.yaml
92
+ sed " s/\$ {OVPN_CN}/${OVPN_CN} /g;" kube/deployment.yaml | kubectl create --namespace=$namespace -f -
You can’t perform that action at this time.
0 commit comments