Skip to content

Commit

Permalink
Merge pull request #309 from linkernetworks/johnlin/upgrade-nc-048
Browse files Browse the repository at this point in the history
[Upgrade] upgrade network controller to v0.4.8
  • Loading branch information
John-Lin authored Sep 1, 2018
2 parents b003aa3 + 607f388 commit 2297c9a
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 15 deletions.
2 changes: 1 addition & 1 deletion deploy/helm/config/development.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ apps:
# vortex/deploy/helm/apps/charts/network-controller
network-controller:
controller:
imageTag: v0.4.7
imageTag: v0.4.8
tcpCPU: 50m
unixCPU: 50m
# vortex/deploy/helm/apps/charts/prometheus
Expand Down
2 changes: 1 addition & 1 deletion deploy/helm/config/production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ apps:
# vortex/deploy/helm/apps/charts/network-controller
network-controller:
controller:
imageTag: v0.4.7
imageTag: v0.4.8
tcpCPU: 100m
unixCPU: 100m
# vortex/deploy/helm/apps/charts/prometheus
Expand Down
2 changes: 1 addition & 1 deletion deploy/helm/config/testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ apps:
# vortex/deploy/helm/apps/charts/network-controller
network-controller:
controller:
imageTag: v0.4.7
imageTag: v0.4.8
tcpCPU: 50m
unixCPU: 50m
# vortex/deploy/helm/apps/charts/prometheus
Expand Down
2 changes: 1 addition & 1 deletion src/deployment/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ func generateInitContainer(networks []entity.DeploymentNetwork) ([]corev1.Contai
for i, v := range networks {
containers = append(containers, corev1.Container{
Name: fmt.Sprintf("init-network-client-%d", i),
Image: "sdnvortex/network-controller:v0.4.7",
Image: "sdnvortex/network-controller:v0.4.8",
Command: []string{"/go/bin/client"},
Args: generateClientCommand(v),
Env: []corev1.EnvVar{
Expand Down
12 changes: 6 additions & 6 deletions src/ovscontroller/ovs_system.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package ovscontroller
import (
"net"

"github.com/linkernetworks/network-controller/utils"
"github.com/linkernetworks/vortex/src/entity"
"github.com/linkernetworks/vortex/src/networkcontroller"
"github.com/linkernetworks/vortex/src/serviceprovider"
"github.com/linkernetworks/vortex/src/utils"
"gopkg.in/mgo.v2/bson"
)

Expand All @@ -28,8 +28,8 @@ func DumpPorts(sp *serviceprovider.Container, nodeName string, bridgeName string
//We need to find a mapping for veth to podName
//1. lookup the mongodb to find all deployments which bridge name is equal to bridgeName
//2. lookup all current pods which is belogs to above deployments
//3. use the pod's UID and the interfae of each entity.DeploymentNetowrk to geneate the vethxxxxxx
//4. use the vethxxx as the key to combine the podName/interfaace and the OVSPorts
//3. use the pod's UID and the interfae of each entity.DeploymentNetowrk to geneate the vetxXXXXXX
//4. use the vtxXXXXXXXXX as the key to combine the podName/interfaace and the OVSPorts
session := sp.Mongo.NewSession()
defer session.Close()

Expand Down Expand Up @@ -67,14 +67,14 @@ func DumpPorts(sp *serviceprovider.Container, nodeName string, bridgeName string
continue
}

//3. use the pod's UID and the interfae of each entity.DeploymentNetowrk to geneate the vethxxxxxx
//3. use the pod's UID and the interfae of each entity.DeploymentNetowrk to geneate the vtxXXXXXXXXX
//for each deploymentNetwork, we get the vethname via veth+sha256(podUID + interfaceName in container)[0:8]
uid := v.ObjectMeta.UID
for _, k := range deploy.Networks {
veth := "veth" + utils.SHA256String(string(uid) + k.IfName)[0:8]
vethName := utils.GenerateVethName(string(uid), k.IfName)
//Use the veth name as the key and the PodName/InterfaceName in the value, we will add those inforamtion
//to OVSPortInfo later.
interfaces[veth] = &portData{
interfaces[vethName] = &portData{
v.Name,
k,
}
Expand Down
2 changes: 1 addition & 1 deletion src/pod/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func generateInitContainer(networks []entity.PodNetwork) ([]corev1.Container, er
for i, v := range networks {
containers = append(containers, corev1.Container{
Name: fmt.Sprintf("init-network-client-%d", i),
Image: "sdnvortex/network-controller:v0.4.7",
Image: "sdnvortex/network-controller:v0.4.8",
Command: []string{"/go/bin/client"},
Args: generateClientCommand(v),
Env: []corev1.EnvVar{
Expand Down
16 changes: 12 additions & 4 deletions vendor/vendor.json
Original file line number Diff line number Diff line change
Expand Up @@ -263,10 +263,18 @@
{
"checksumSHA1": "QAOy7z8HT9JxBXbIhPjTjdLusVU=",
"path": "github.com/linkernetworks/network-controller/messages",
"revision": "ab932c09f38fb545d892db529a99a9d9bc6e257a",
"revisionTime": "2018-08-31T03:13:05Z",
"version": "v0.4.7",
"versionExact": "v0.4.7"
"revision": "76cb2946e17ea2ab9e92dce65c96f87e96e25302",
"revisionTime": "2018-09-01T07:38:16Z",
"version": "=v0.4.8",
"versionExact": "v0.4.8"
},
{
"checksumSHA1": "PKUmbmBhKwMo6Cj7j0KUZQ6Ecsk=",
"path": "github.com/linkernetworks/network-controller/utils",
"revision": "76cb2946e17ea2ab9e92dce65c96f87e96e25302",
"revisionTime": "2018-09-01T07:38:16Z",
"version": "=v0.4.8",
"versionExact": "v0.4.8"
},
{
"checksumSHA1": "8bkCE7r0DcTaPDbKbwaI34Bmrbw=",
Expand Down

0 comments on commit 2297c9a

Please sign in to comment.