go-ipam icon indicating copy to clipboard operation
go-ipam copied to clipboard

Namespace support

Open majst01 opened this issue 3 years ago • 2 comments

Allows creation of overlapping prefixes which reside in different namespaces, in the same namespace prefixes must still not overlap.

fixes #25

TODO:

  • [ ] migration of existing data only works for postgres, cockroach is not working because PRIMARY KEY naming is different.
  • [ ] Only set "@namespace" prefix if namespace is set for memory and redis, probably introduce a prefixer interface
  • [ ] Consider using a separate table for sql storage or database in redis or other map for memory.

majst01 avatar Jan 21 '21 08:01 majst01

Codecov Report

Merging #43 (07e6c15) into master (7ae0c89) will decrease coverage by 1.28%. The diff coverage is 69.76%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #43      +/-   ##
==========================================
- Coverage   77.35%   76.06%   -1.29%     
==========================================
  Files           5        5              
  Lines         468      493      +25     
==========================================
+ Hits          362      375      +13     
- Misses         56       68      +12     
  Partials       50       50              
Impacted Files Coverage Δ
ipam.go 75.00% <0.00%> (-25.00%) :arrow_down:
postgres.go 70.00% <ø> (ø)
sql.go 63.80% <64.70%> (-2.17%) :arrow_down:
memory.go 84.61% <68.42%> (-10.39%) :arrow_down:
prefix.go 78.88% <100.00%> (+0.26%) :arrow_up:

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 7ae0c89...07e6c15. Read the comment docs.

codecov-io avatar Jan 21 '21 08:01 codecov-io

Codecov Report

Merging #43 (a9af5d2) into master (59c4948) will decrease coverage by 3.07%. The diff coverage is 64.13%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #43      +/-   ##
==========================================
- Coverage   78.50%   75.42%   -3.08%     
==========================================
  Files           7        7              
  Lines         642      700      +58     
==========================================
+ Hits          504      528      +24     
- Misses         74      107      +33     
- Partials       64       65       +1     
Impacted Files Coverage Δ
ipam.go 71.42% <0.00%> (-28.58%) :arrow_down:
postgres.go 71.42% <ø> (ø)
redis.go 64.28% <56.75%> (-8.13%) :arrow_down:
sql.go 57.95% <61.11%> (-3.30%) :arrow_down:
memory.go 82.85% <69.23%> (-13.37%) :arrow_down:
json.go 88.57% <100.00%> (+0.69%) :arrow_up:
prefix.go 80.48% <100.00%> (+0.21%) :arrow_up:

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 59c4948...a9af5d2. Read the comment docs.

codecov-commenter avatar Aug 16 '21 06:08 codecov-commenter