Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for metal-operators Endpoint API #185

Merged
merged 17 commits into from
Sep 20, 2024
Merged

Conversation

damyan
Copy link
Contributor

@damyan damyan commented Sep 19, 2024

Proposed Changes

With this PR allows you to configure FeDHCP to create automatically Endpoint objects for a given machine

Discovered machines can be defined via the following configuration

- name: server-01
  macAddress: 00:1A:2B:3C:4D:5E
- name: server-02
  macAddress: 00:1A:2B:3C:4D:5F

This configuration can be passed to the FeDHCP metal plugin via the following configuration:

server6:
    listen:
        - "[::]"
    plugins:
        - metal: machines-v6.yaml
server4:
    listen:
        - ":"
    plugins:
        - metal: machines-v4.yaml

After each lease, the plugin does the following:
- if the MAC address of the client (peer address) is not found in the
  internal inventory database - quit
- else if an IP.IPAM object with that mac is not found - quit
- else, with the mac and the IP address from the object above - create
  an Endpoint object
- add parametrization tests
- add more IPv6 tests
Remove all magic constants from test, go for constant strings instead
Add IP address family validator
@github-actions github-actions bot added size/XL documentation Improvements or additions to documentation labels Sep 19, 2024
@damyan damyan added the enhancement New feature or request label Sep 19, 2024
internal/api/config.go Outdated Show resolved Hide resolved
plugins/metal/plugin.go Outdated Show resolved Hide resolved
@afritzler afritzler changed the title Add support for Endpoint API from metal-operator Add support for metal-operators Endpoint API Sep 20, 2024
@damyan damyan merged commit b79599f into main Sep 20, 2024
8 checks passed
@damyan damyan deleted the enhancement/metal-api branch September 20, 2024 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request size/XL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants