Skip to content

Commit

Permalink
feat: expose iface in install.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
oilbeater committed Apr 1, 2020
1 parent 22b526b commit a4c81ba
Showing 1 changed file with 19 additions and 17 deletions.
36 changes: 19 additions & 17 deletions dist/images/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
set -euo pipefail

REGISTRY="index.alauda.cn/alaudak8s"
NAMESPACE="kube-system" # The ns to deploy kube-ovn
POD_CIDR="10.16.0.0/16" # Do NOT overlap with NODE/SVC/JOIN CIDR
SVC_CIDR="10.96.0.0/12" # Do NOT overlap with NODE/POD/JOIN CIDR
JOIN_CIDR="100.64.0.0/16" # Do NOT overlap with NODE/POD/SVC CIDR
LABEL="node-role.kubernetes.io/master" # The node label to deploy OVN DB
IFACE="" # The nic to support container network, if empty will use the nic that the default route use
VERSION="v1.1.0-pre"

echo "[Step 1] Label kube-ovn-master node"
Expand Down Expand Up @@ -112,14 +114,14 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: ovn-config
namespace: kube-system
namespace: ${NAMESPACE}
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: ovn
namespace: kube-system
namespace: ${NAMESPACE}
---
apiVersion: rbac.authorization.k8s.io/v1
Expand Down Expand Up @@ -186,14 +188,14 @@ roleRef:
subjects:
- kind: ServiceAccount
name: ovn
namespace: kube-system
namespace: ${NAMESPACE}
---
kind: Service
apiVersion: v1
metadata:
name: ovn-nb
namespace: kube-system
namespace: ${NAMESPACE}
spec:
ports:
- name: ovn-nb
Expand All @@ -211,7 +213,7 @@ kind: Service
apiVersion: v1
metadata:
name: ovn-sb
namespace: kube-system
namespace: ${NAMESPACE}
spec:
ports:
- name: ovn-sb
Expand All @@ -229,7 +231,7 @@ kind: Deployment
apiVersion: apps/v1
metadata:
name: ovn-central
namespace: kube-system
namespace: ${NAMESPACE}
annotations:
kubernetes.io/description: |
OVN components: northd, nb and sb.
Expand Down Expand Up @@ -346,7 +348,7 @@ kind: DaemonSet
apiVersion: apps/v1
metadata:
name: ovs-ovn
namespace: kube-system
namespace: ${NAMESPACE}
annotations:
kubernetes.io/description: |
This daemon set launches the openvswitch daemon.
Expand Down Expand Up @@ -449,7 +451,7 @@ EOF

kubectl apply -f kube-ovn-crd.yaml
kubectl apply -f ovn.yaml
kubectl rollout status deployment/ovn-central -n kube-system
kubectl rollout status deployment/ovn-central -n ${NAMESPACE}
echo "-------------------------------"
echo ""

Expand All @@ -461,7 +463,7 @@ kind: Deployment
apiVersion: apps/v1
metadata:
name: kube-ovn-controller
namespace: kube-system
namespace: ${NAMESPACE}
annotations:
kubernetes.io/description: |
kube-ovn controller
Expand Down Expand Up @@ -539,7 +541,7 @@ kind: DaemonSet
apiVersion: apps/v1
metadata:
name: kube-ovn-cni
namespace: kube-system
namespace: ${NAMESPACE}
annotations:
kubernetes.io/description: |
This daemon set launches the kube-ovn cni daemon.
Expand Down Expand Up @@ -587,7 +589,7 @@ spec:
- --enable-mirror=true
- --encap-checksum=true
- --service-cluster-ip-range=$SVC_CIDR
- --iface=
- --iface=${IFACE}
securityContext:
capabilities:
add: ["NET_ADMIN", "SYS_ADMIN", "SYS_PTRACE"]
Expand Down Expand Up @@ -652,7 +654,7 @@ kind: DaemonSet
apiVersion: apps/v1
metadata:
name: kube-ovn-pinger
namespace: kube-system
namespace: ${NAMESPACE}
annotations:
kubernetes.io/description: |
This daemon set launches the openvswitch daemon.
Expand Down Expand Up @@ -754,7 +756,7 @@ kind: Service
apiVersion: v1
metadata:
name: kube-ovn-pinger
namespace: kube-system
namespace: ${NAMESPACE}
labels:
app: kube-ovn-pinger
spec:
Expand All @@ -768,7 +770,7 @@ kind: Service
apiVersion: v1
metadata:
name: kube-ovn-controller
namespace: kube-system
namespace: ${NAMESPACE}
labels:
app: kube-ovn-controller
spec:
Expand All @@ -782,7 +784,7 @@ kind: Service
apiVersion: v1
metadata:
name: kube-ovn-cni
namespace: kube-system
namespace: ${NAMESPACE}
labels:
app: kube-ovn-cni
spec:
Expand All @@ -794,7 +796,7 @@ spec:
EOF

kubectl apply -f kube-ovn.yaml
kubectl rollout status deployment/kube-ovn-controller -n kube-system
kubectl rollout status deployment/kube-ovn-controller -n ${NAMESPACE}
echo "-------------------------------"
echo ""

Expand All @@ -805,7 +807,7 @@ for ns in $(kubectl get ns --no-headers -o custom-columns=NAME:.metadata.name);
done
done

kubectl rollout status daemonset/kube-ovn-pinger -n kube-system
kubectl rollout status daemonset/kube-ovn-pinger -n ${NAMESPACE}
kubectl rollout status deployment/coredns -n kube-system
echo "-------------------------------"
echo ""
Expand Down

0 comments on commit a4c81ba

Please sign in to comment.