Commit 29ff19b5d9da

Vincent Demeester <vincent@sbr.pm>
2020-11-25 17:22:27
tools/bekind: fix profiles…
- use PORT in 3n too - remove extraPortMappings for now Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent 7d45102
Changed files (2)
tools
bekind
tools/bekind/profiles/3n.yaml
@@ -2,7 +2,7 @@ kind: Cluster
 apiVersion: kind.x-k8s.io/v1alpha4
 networking:
   apiServerAddress: HOST
-  apiServerPort: 8443
+  apiServerPort: PORT
 containerdConfigPatches:
 - |-
   [plugins."io.containerd.grpc.v1.cri".registry.mirrors."localhost:5000"]
@@ -15,12 +15,5 @@ nodes:
     nodeRegistration:
       kubeletExtraArgs:
         node-labels: "ingress-ready=true"
-  extraPortMappings:
-  - containerPort: 80
-    hostPort: 80
-    protocol: TCP
-  - containerPort: 443
-    hostPort: 443
-    protocol: TCP
 - role: worker
 - role: worker
tools/bekind/bekind
@@ -62,8 +62,7 @@ bekind_create(){
         if [[ -f "${profile_file}" ]]; then
             tmpfile=$(mktemp /tmp/bekind.XXXXXX)
             hostip=$(getent hosts ${host} | awk '{ print $1 }')
-            sed "s/HOST/${hostip}/g" "${profile_file}" > ${tmpfile}
-            sed -i "s/PORT/${port}/g" ${tmpfile}
+            sed -e "s/HOST/${hostip}/g" -e "s/PORT/${port}/g" "${profile_file}" > ${tmpfile}
             args="${args} --config ${tmpfile}"
         else
             echo "Profile ${profile} doesn't exists" 1>&2