Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add route entity & update generateClientCommand #168

Merged
merged 3 commits into from
Jul 25, 2018

Conversation

sufuf3
Copy link
Contributor

@sufuf3 sufuf3 commented Jul 25, 2018

Related issue: #154
close #154

  • Update PodNetwork Entity: Add PodRoute structure & add a routes attribute.
  • Fix typo of comment
  • Update "generateClientCommand" to support add route command. In this time, I just use array[0], because it's limited with Network-controller client the main function.

// PodRoute is the structure for add IP routing table
type PodRoute struct {
DstCIDR string `bson:"dstCIDR" json:"dstCIDR" validate:"required,cidr"`
Gateway string `bson:"gateway" json:"gateway" validate:"min=1,max=4095"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

min,max validate for string gateway ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, My bad. Fix soon.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

max=4095,min=0

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vlan part, update here linkernetworks/network-controller#67

Gateway use ip validate, this part was updated in this PR.

@codecov-io
Copy link

codecov-io commented Jul 25, 2018

Codecov Report

Merging #168 into develop will decrease coverage by 0.19%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           develop     #168     +/-   ##
==========================================
- Coverage    77.95%   77.76%   -0.2%     
==========================================
  Files           41       41             
  Lines         2005     2010      +5     
==========================================
  Hits          1563     1563             
- Misses         333      337      +4     
- Partials       109      110      +1
Impacted Files Coverage Δ
src/pod/pod.go 93.49% <0%> (-2.86%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b0b2372...e0955da. Read the comment docs.

@sufuf3 sufuf3 force-pushed the sufuf3/update-PodNetwork-struct branch 3 times, most recently from 1eb63ed to 370927f Compare July 25, 2018 08:28
@sufuf3 sufuf3 changed the title [WIP] Add route entity & update generateClientCommand Add route entity & update generateClientCommand Jul 25, 2018
@sufuf3 sufuf3 changed the title Add route entity & update generateClientCommand [WIP] Add route entity & update generateClientCommand Jul 25, 2018
@sufuf3 sufuf3 force-pushed the sufuf3/update-PodNetwork-struct branch from 370927f to 3c55246 Compare July 25, 2018 08:50
@sufuf3 sufuf3 changed the title [WIP] Add route entity & update generateClientCommand Add route entity & update generateClientCommand Jul 25, 2018
@sufuf3
Copy link
Contributor Author

sufuf3 commented Jul 25, 2018

Dear All, please help me review this PR.
Thank you.

@sufuf3 sufuf3 force-pushed the sufuf3/update-PodNetwork-struct branch from 3c55246 to b1447bb Compare July 25, 2018 09:53
@sufuf3
Copy link
Contributor Author

sufuf3 commented Jul 25, 2018

Rebase to latest develop branch. Done

@hwchiu hwchiu force-pushed the sufuf3/update-PodNetwork-struct branch from b1447bb to e0955da Compare July 25, 2018 10:18
@sufuf3 sufuf3 force-pushed the sufuf3/update-PodNetwork-struct branch from e0955da to 3392ab3 Compare July 25, 2018 10:45
@sufuf3
Copy link
Contributor Author

sufuf3 commented Jul 25, 2018

I have created a new branch(used the latest develop branch) & used format-patch & am do for this PR.

* 3392ab3 Add add route in generateClientCommand, cc #154 sufuf3 2 hours ago
* a1f1459 Fix typo of PodVolume struct comment sufuf3 4 hours ago
* d3b7516 Add route entity, cc #154 sufuf3 4 hours ago
*   bd21f12 Merge pull request #172 from linkernetworks/phstsai/VX-214 Che-Wei Lin 16 minutes ago
|\
| * d9486c6 improve unit test for query situation Pei Hsuan Tsai 3 hours ago
|/
* b0b2372 Change the response from bad-request to method not allowed hwchiu 5 hours ago
* deebf06 Use the kubeutil to check the pod status when deleteing the volume hwchiu 26 hours ago
* dc33188 Return the badrequest if the network still used by some Pods when delete the network hwchiu 26 hours ago
* 402f454 remove race John-Lin 3 hours ago

sufuf3 added 3 commits July 25, 2018 11:17
For init container, add add route in generateClientCommand

Signed-off-by: sufuf3 <[email protected]>
@hwchiu hwchiu force-pushed the sufuf3/update-PodNetwork-struct branch from 3392ab3 to 7649d3b Compare July 25, 2018 11:17
@John-Lin John-Lin merged commit ab65f67 into develop Jul 25, 2018
@sufuf3 sufuf3 deleted the sufuf3/update-PodNetwork-struct branch July 25, 2018 11:23
John-Lin added a commit that referenced this pull request Jul 25, 2018
…struct

Add route entity & update generateClientCommand
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add add route feature
4 participants