You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+40
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,15 @@ NetBox Operator extends the Kubernetes API by allowing users to manage NetBox re
17
17
- kind
18
18
- docker cli
19
19
20
+
## Installation methods
21
+
22
+
There are several ways to install NetBox Operator on your Cluster:
23
+
24
+
- NetBox Operator Helm Chart. More information: <https://github.com/netbox-community/netbox-chart/>
25
+
- Manifests in <config/default> of this repo. Make sure to first set the correct image using `kustomize edit set image controller=<correctimage>`. Images can be found on the Releases page on GitHub
26
+
- The Makefile targets in this repository.
27
+
- For debugging and developing, please read further below.
28
+
20
29
# How to use NetBox Operator
21
30
22
31
## Running both NetBox Operator and NetBox on a local kind cluster
@@ -46,6 +55,25 @@ Example of assigning a Prefix using PrefixClaim:
46
55
47
56
Key information can be found in the yaml formatted output of these resources, as well as in the events and Operator logs.
48
57
58
+
# Mixed usage of Prefixes
59
+
60
+
Note that NetBox does handle the Address management of Prefixes separately from IP Ranges and IP Addresses. This is important to know when you plan to use the same NetBox Prefix as a parentPrefix for your IpAddressClaims, IpRangeClaims and PrefixClaims.
61
+
62
+
Example:
63
+
64
+
- Assume you use an existing empty NetBox Prefix "192.168.0.0/24" as the `.spec.parentPrefix` for your PrefixClaims, IpAddressClaims and IpRangeClaims.
65
+
- You create a PrefixClaim with `.spec.prefixLength` of `/25`, NetBox Operator will assign "192.168.0.0/25"
66
+
- You create a IpAddressClaim, NetBox Operator will assign "192.168.0.1/32". Important: NetBox ignores the Prefix in that case and will not return "192.168.0.129" as the first available IP!
67
+
- You create a IpAddressClaim with `.spec.size` of `2`, NetBox Operator will assign "192.168.0.2/32" to "192.168.0.3/32". Important: NetBox ignores the Prefix in that case and will not return "192.168.0.129" as the first available IP!
68
+
69
+
70
+
This means that you need to plan your automation carefully. As a rule of thumb:
71
+
- If you plan mixed use of the same parentPrefix for both single IPs (/32s) as well as Prefixes (non /32s), use PrefixClaims for everything and avoid using IpRangeClaims and IpAddressClaims.
72
+
- If you are in full control of a Prefix and you know it will only be used for assigning IP Addresses and IP Ranges, you can use IpAddressClaims and IpRangeClaims.
73
+
- If you don't know what the parentPrefix is used for, avoid using IpAddressClaims and IpRangeClaims.
74
+
75
+
The same applies if you use parentPrefixSelector with PrefixClaims. The above example is IPv4 based but will be the same with IPv6 equivalents.
76
+
49
77
# Restoration from NetBox
50
78
51
79
In the case that the cluster containing the NetBox Custom Resources managed by this NetBox Operator is not backed up (e.g. using Velero), we need to be able to restore some information from NetBox. This includes two mechanisms implemented in this NetBox Operator:
@@ -97,6 +125,18 @@ For the monitoring of the state of the CRs reconciled by the operator [kube stat
97
125
98
126
[kube state metrics]: https://github.com/kubernetes/kube-state-metrics
99
127
128
+
# FAQ
129
+
130
+
## What is the difference between `.spec.customFields` and `.spec.parentPrefixSelector`?
131
+
132
+
`.spec.customFields` are the NetBox Custom Fields assigned to the resource in NetBox.
133
+
`.spec.parentPrefixSelector` is used by a Claim Controller (e.g. the controller of PrefixClaim) to find a suitable Prefix to get e.g. a Prefix from.
134
+
135
+
## What is the difference between `.spec.tenant` and `.spec.parentPrefixSelector.tenant`?
136
+
137
+
`.spec.tenant` is the tenant that is assigned to the resource in NetBox.
138
+
`.spec.parentPrefixSelector.tenant` is used by a Claim Controller (e.g. the controller of PrefixClaim) to find a suitable Prefix to get e.g. a Prefix from.
139
+
100
140
# Contributing
101
141
102
142
We cordially invite collaboration from the community to enhance the quality and functionality of this project. Whether you are addressing bugs, introducing new features, refining documentation, or assisting with items on our to-do list, your contributions are highly valued and greatly appreciated. Please take a look at [Contribution guide] for more details.
// IpAddress is the Schema for the ipaddresses API
93
+
// IpAddress allows to create a NetBox IP Address. More info about NetBox IP Addresses: https://github.com/netbox-community/netbox/blob/main/docs/models/ipam/ipaddress.md
// IpRange allows to create a NetBox IP Range. More info about NetBox IP Ranges: https://github.com/netbox-community/netbox/blob/main/docs/models/ipam/iprange.md
0 commit comments