Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 17 additions & 9 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,20 @@ jobs:
with:
files: ./coverage.out

golint:
static-check:
runs-on: [ubuntu-20.04]
if: ${{ github.event_name == 'pull_request' }}
steps:
- uses: actions/checkout@v2
- uses: golangci/golangci-lint-action@v2

- name: Check conventional commits
uses: webiny/[email protected]

- name: Check spelling
uses: crate-ci/[email protected]

- name: Check golang lint
uses: golangci/golangci-lint-action@v2
with:
version: v1.48.0
only-new-issues: true
Expand Down Expand Up @@ -137,21 +145,21 @@ jobs:

slack-notification:
if: ${{ always() }}
needs: [ pr-check,golint,run-e2e,run-k8s-e2e,run-tower-e2e,generate-check ]
needs: [ pr-check,static-check,run-e2e,run-k8s-e2e,run-tower-e2e,generate-check ]
runs-on: [ ubuntu-20.04 ]
env:
SLACK_COLOR: 2EA44F
RESULT_PR_CHECK: ":white_check_mark:"
RESULT_GOLINT: ":white_check_mark:"
RESULT_STATIC_CHECK: ":white_check_mark:"
RESULT_RUN_E2E: ":white_check_mark:"
RESULT_RUN_K8S_E2E: ":white_check_mark:"
RESULT_RUN_TOWER_E2E: ":white_check_mark:"
RESULT_GENERATE_CHECK: ":white_check_mark:"
steps:
- if: ${{ needs.pr-check.result == 'failure'}}
run: echo "SLACK_COLOR=DF0000" >> $GITHUB_ENV && echo "RESULT_PR_CHECK=:x:" >> $GITHUB_ENV
- if: ${{ needs.golint.result == 'failure'}}
run: echo "SLACK_COLOR=DF0000" >> $GITHUB_ENV && echo "RESULT_GOLINT=:x:" >> $GITHUB_ENV
- if: ${{ needs.static-check.result == 'failure'}}
run: echo "SLACK_COLOR=DF0000" >> $GITHUB_ENV && echo "RESULT_STATIC_CHECK=:x:" >> $GITHUB_ENV
- if: ${{ needs.run-e2e.result == 'failure'}}
run: echo "SLACK_COLOR=DF0000" >> $GITHUB_ENV && echo "RESULT_RUN_E2E=:x:" >> $GITHUB_ENV
- if: ${{ needs.run-k8s-e2e.result == 'failure'}}
Expand All @@ -163,8 +171,8 @@ jobs:

- if: ${{ needs.pr-check.result == 'cancelled'}}
run: echo "RESULT_PR_CHECK=:ballot_box_with_check:" >> $GITHUB_ENV
- if: ${{ needs.golint.result == 'cancelled'}}
run: echo "RESULT_GOLINT=:ballot_box_with_check:" >> $GITHUB_ENV
- if: ${{ needs.static-check.result == 'cancelled'}}
run: echo "RESULT_STATIC_CHECK=:ballot_box_with_check:" >> $GITHUB_ENV
- if: ${{ needs.run-e2e.result == 'cancelled'}}
run: echo "RESULT_RUN_E2E=:ballot_box_with_check:" >> $GITHUB_ENV
- if: ${{ needs.run-k8s-e2e.result == 'cancelled'}}
Expand Down Expand Up @@ -220,7 +228,7 @@ jobs:
},
{
"type": "mrkdwn",
"text": "${{ env.RESULT_GOLINT }} => *golint*"
"text": "${{ env.RESULT_STATIC_CHECK }} => *static-check*"
},
{
"type": "mrkdwn",
Expand Down
4 changes: 4 additions & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[files]
extend-exclude = [
"deploy/crds",
"deploy/everoute.yaml"]
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Everoute provides network and security services for the following platforms:
* Hybrid Cloud
* Legacy virtualized data center

It can be intergated within these platforms easily.
It can be integrated within these platforms easily.

## Architecture

Expand Down Expand Up @@ -73,7 +73,7 @@ refer to [Everoute CNI](https://github.com/everoute/everoute/blob/main/docs/cni/

* **Virtualization Platform**: [SMTX OS](https://www.smartx.com/global/smtx-os)
is [SmartX](https://www.smartx.com/global) native virtualization platform.
Everoute can be intergated with SMTX OS through the
Everoute can be integrated with SMTX OS through the
[CloudTower](https://www.smartx.com/global/cloud-tower) plugin to provide the
Micro-Segmentation service.

Expand Down
12 changes: 6 additions & 6 deletions pkg/agent/datapath/clsBridge.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ func (c *ClsBridge) initForwardingTable() error {
return nil
}

func (c *ClsBridge) initOuputTable(sw *ofctrl.OFSwitch) error {
func (c *ClsBridge) initOutputTable(sw *ofctrl.OFSwitch) error {
localBrName := strings.TrimSuffix(c.name, "-cls")
// clsBridgeOutputTable floodingOutputFlow
floodingOutputFlow, _ := c.clsBridgeOutputTable.NewFlow(ofctrl.FlowMatch{
Expand Down Expand Up @@ -223,8 +223,8 @@ func (c *ClsBridge) initOuputTable(sw *ofctrl.OFSwitch) error {
return fmt.Errorf("failed to install cls bridge learnedLocalToLocalOutputFlow, error: %v", err)
}

// clsBridgeOutputTable learnedLocalToRemoteOuputFlow
learnedLocalToRemoteOuputFlow, _ := c.clsBridgeOutputTable.NewFlow(ofctrl.FlowMatch{
// clsBridgeOutputTable learnedLocalToRemoteOutputFlow
learnedLocalToRemoteOutputFlow, _ := c.clsBridgeOutputTable.NewFlow(ofctrl.FlowMatch{
Priority: NORMAL_MATCH_FLOW_PRIORITY,
Regs: []*ofctrl.NXRegister{
{
Expand All @@ -235,8 +235,8 @@ func (c *ClsBridge) initOuputTable(sw *ofctrl.OFSwitch) error {
},
})
outputPort, _ = sw.OutputPort(c.datapathManager.BridgeChainPortMap[localBrName][ClsToUplinkSuffix])
if err := learnedLocalToRemoteOuputFlow.Next(outputPort); err != nil {
return fmt.Errorf("failed to install cls bridge learnedLocalToRemoteOuputFlow, error: %v", err)
if err := learnedLocalToRemoteOutputFlow.Next(outputPort); err != nil {
return fmt.Errorf("failed to install cls bridge learnedLocalToRemoteOutputFlow, error: %v", err)
}

// clsBridgeOutputTable default flow
Expand All @@ -263,7 +263,7 @@ func (c *ClsBridge) BridgeInit() {
if err := c.initForwardingTable(); err != nil {
log.Fatalf("Failed to init cls bridge forwarding table, error: %v", err)
}
if err := c.initOuputTable(sw); err != nil {
if err := c.initOutputTable(sw); err != nil {
log.Fatalf("Failed to init cls bridge output table, error: %v", err)
}
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/agent/datapath/policyBridge.go
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ func (p *PolicyBridge) initPolicyForwardingTable(sw *ofctrl.OFSwitch) error {
return fmt.Errorf("failed to install from local output flow, error: %v", err)
}

fromUpstreamOuputFlow, _ := p.policyForwardingTable.NewFlow(ofctrl.FlowMatch{
fromUpstreamOutputFlow, _ := p.policyForwardingTable.NewFlow(ofctrl.FlowMatch{
Priority: NORMAL_MATCH_FLOW_PRIORITY,
InputPort: uint32(p.datapathManager.BridgeChainPortMap[localBrName][PolicyToClsSuffix]),
Regs: []*ofctrl.NXRegister{
Expand All @@ -401,7 +401,7 @@ func (p *PolicyBridge) initPolicyForwardingTable(sw *ofctrl.OFSwitch) error {
},
})
outputPort, _ = sw.OutputPort(p.datapathManager.BridgeChainPortMap[localBrName][PolicyToLocalSuffix])
if err := fromUpstreamOuputFlow.Next(outputPort); err != nil {
if err := fromUpstreamOutputFlow.Next(outputPort); err != nil {
return fmt.Errorf("failed to install from upstream output flow, error: %v", err)
}

Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/cases/security_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1285,7 +1285,7 @@ func checkConnectionHealth(src, dst *model.Endpoint) <-chan ConnHealth {
// --- [dstIP] ping statistics ---
// [time] packets transmitted, [n1] packets received, [n2]% packet loss
output := regexp.MustCompile("\r\n|\n|\r").Split(fullOut, -1)
infoOutput := output[3] // expect: [n0] packets transmitted, [n1] packets recived, [n2]% packet loss
infoOutput := output[3] // expect: [n0] packets transmitted, [n1] packets received, [n2]% packet loss
connInfo := regexp.MustCompile("[0-9]+").FindAllString(infoOutput, -1)
klog.Info("Total,Received,Loss Rate,Time:", connInfo)
lossRate, err := strconv.Atoi(connInfo[2])
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/framework/node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const (
RoleAgent = "agent"
)

// GetClient return client connect to this node, must not close the returnd client.
// GetClient return client connect to this node, must not close the returned client.
func (n *Node) GetClient() (*ssh.Client, error) {
n.lock.Lock()
defer n.lock.Unlock()
Expand Down