Commit 6c947e2
authored
Ipsetmanager-update (#1034)
* add new npm errors
* add logic for adding/removing sets to kernel in ipsetmanager, update usage of prometheus metrics, and update dataplane API to not use IPSets
* update to a pointer return value for NewPolicyManager
* fix go lints
* renamed count to kernelReferCount
* fix a bug with kernel logic, rearrange code, rename things, and update comments
* rearrange functions
* removed checkIfExists, consolidated AddReference and DeleteReference with a special type, and fixed go lints
* moved logic for different reference types to ipset.go
* remove file with just notes on it
* remove redundant boolean calculation that is always true
* add clarifying comment
* fix ipset metrics to be for all of NPM (not necessarily in kernel), and write TODOs for kernel-based metrics
* update based on code review
* var name change
* update unit test to use DeleteIPSet
* moved internal functions to the bottom1 parent 3f97a30 commit 6c947e2
File tree
8 files changed
+369
-295
lines changed- npm
- pkg/dataplane
- ipsets
- policies
- util/errors
8 files changed
+369
-295
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
| 12 | + | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
48 | | - | |
| 47 | + | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
58 | | - | |
| 57 | + | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
| 65 | + | |
75 | 66 | | |
76 | | - | |
| 67 | + | |
77 | 68 | | |
78 | 69 | | |
79 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | 17 | | |
19 | | - | |
| 18 | + | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
27 | | - | |
28 | | - | |
29 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
| |||
75 | 77 | | |
76 | 78 | | |
77 | 79 | | |
78 | | - | |
| 80 | + | |
79 | 81 | | |
80 | 82 | | |
81 | 83 | | |
| |||
91 | 93 | | |
92 | 94 | | |
93 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
94 | 105 | | |
95 | 106 | | |
96 | 107 | | |
| |||
104 | 115 | | |
105 | 116 | | |
106 | 117 | | |
107 | | - | |
108 | | - | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
109 | 121 | | |
110 | 122 | | |
111 | 123 | | |
| |||
163 | 175 | | |
164 | 176 | | |
165 | 177 | | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
| 178 | + | |
| 179 | + | |
172 | 180 | | |
173 | 181 | | |
174 | | - | |
175 | | - | |
| 182 | + | |
| 183 | + | |
176 | 184 | | |
177 | 185 | | |
178 | | - | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
179 | 191 | | |
180 | 192 | | |
181 | | - | |
182 | | - | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
183 | 198 | | |
184 | 199 | | |
185 | | - | |
186 | | - | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
187 | 209 | | |
188 | 210 | | |
189 | | - | |
190 | | - | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
191 | 220 | | |
192 | 221 | | |
193 | | - | |
194 | | - | |
| 222 | + | |
| 223 | + | |
195 | 224 | | |
196 | 225 | | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
201 | 229 | | |
202 | 230 | | |
203 | 231 | | |
204 | 232 | | |
205 | | - | |
206 | | - | |
| 233 | + | |
| 234 | + | |
207 | 235 | | |
208 | 236 | | |
209 | 237 | | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
0 commit comments