Closed jeremystretch closed 2 years ago
I second this.
We are using NetBox as IPAM and DCIM for bare metal Kubernetes clusters. We have automation in place which matches nodes in NetBox with nodes in a bare metal deployment tool (OpenStack Ironic). When a new node is discovered by the bare metal tool and it is found in NetBox and assigned to a Virtualization Cluster, we do the following steps fully automatedly:
However, there are some bits of information about the Cluster which we cannot easily represent in this way. Most importantly, the virtual IP address (the implementation of the VIP is then VRRP based) used for the Kubernetes API endpoint. This is definitely a property of the Virtualization Cluster. At the same time, the IP address s should be known to the IPAM to avoid double allocations during the automatic allocation step.
Our preferred way to solve this would be to be able to have a custom field which links an IP address to a cluster with a custom semantic (in our case "kubernetes API IP").
Other solutions we have considered:
Clearly, having this on the Cluster would be much nicer.
Thanks for reading. I understand that this is probably a non-trivial change to the data model :)
I'm going to extend the scope of this FR to include the assignment of multiple objects as well, since it appears doable with very little additional work.
NetBox version
v2.11.11
Feature type
New functionality
Proposed functionality
Add a new type of custom field which enables referencing a related NetBox object. (This will largely replicate Django's generic foreign key mechanism.)
This was originally proposed by @tyler-8 in #4408.
Use case
Provides the ability to reference one NetBox object from another where no foreign key relation exists in the database.
Database changes
We might need to extend the CustomField model, but specific implementation details are yet to be determined.
External dependencies
No response