@@ -3,6 +3,52 @@ External ip controller [] ( https://asciinema.org/a/95449 )
5
5
6
+ Auto allocation of external IPs
7
+ ===============================
8
+
9
+ Now users can utilize auto allocation feature.
10
+
11
+ In order to do that they must first provide
12
+ IP pool for the allocator by creation of IpClaimPool resources.
13
+ Here is example description for one in yaml format
14
+
15
+ ``` yaml
16
+ apiVersion : ipcontroller.ext/v1
17
+ kind : IpClaimPool
18
+ metadata :
19
+ name : test-pool
20
+ spec :
21
+ cidr : 192.168.0.248/29
22
+ ranges :
23
+ - - 192.168.0.249
24
+ - 192.168.0.250
25
+ - - 192.168.0.252
26
+ - 192.168.0.253
27
+ ` ` `
28
+
29
+ Few words about the Spec: CIDR is mandatory to supply.
30
+ Ranges can be omitted (range of the whole network defined in "CIDR" field is used then).
31
+ Exclusion of particular addresses is done via specifying multiple ranges.
32
+ In example above address 192.168.0.251 is not processed by the allocator.
33
+
34
+ In order to enable auto allocation for particular services users
35
+ must annotate them with following key-value pair - "external-ip = auto"
36
+ either on creation or while the service is running (via ` kubectl annotate`).
37
+ After that there will be allocated exactly one external IP address for the service
38
+ and IP claim will be created. Allocated address is then stored in 'allocated' field of pool
39
+ object.
40
+
41
+ Users can create several IP pools. Allocator will process all of them in the same manner
42
+ (looking for first available IP) and with no regard for order, that is users cannot control
43
+ which pool an address is fetched from.
44
+
45
+ When service is deleted allocation is freed and returned to the pool of usable addresses
46
+ again. Corresponding IP claim is removed.
47
+
48
+ Here is a brief demo of the functionality.
49
+
50
+ [](https://asciinema.org/a/6uyrkfn66nufzpuhrwt1veshb)
51
+
6
52
How to run tests?
7
53
================
8
54
0 commit comments