Skip to content

feat(coredhcp/coresmd): implement flexible hostname policy#52

Open
synackd wants to merge 2 commits intomainfrom
feat/hostname-policy
Open

feat(coredhcp/coresmd): implement flexible hostname policy#52
synackd wants to merge 2 commits intomainfrom
feat/hostname-policy

Conversation

@synackd
Copy link
Collaborator

@synackd synackd commented Mar 17, 2026

Pull Request Template

Thank you for your contribution! Please ensure the following before submitting:

Checklist

  • My code follows the style guidelines of this project
  • I have added/updated comments where needed
  • I have added tests that prove my fix is effective or my feature works
  • I have run make test (or equivalent) locally and all tests pass
  • DCO Sign-off: All commits are signed off (git commit -s) with my real name and email
  • REUSE Compliance:
    • Each new/modified source file has SPDX copyright and license headers
    • Any non-commentable files include a <filename>.license sidecar
    • All referenced licenses are present in the LICENSES/ directory

Description

Replace the hostname_by_type, hostname_default, *_pattern, etc. hostname specifiers with a flexible, rich hostname rule system specified by one or more hostname_rule specifiers. hostname_rule allows arbitrary matching apecifiers (e.g. type for SMD component type, subnet) to be specified to apply hostname patterns for. The specification of multiple rules behaves like iptables/nftables chains in the way that a given components traverse the rule list until a rule matches or the list is exhausted.

node_pattern and bmc_pattern will still work, though they will be converted into hostname rules if used, which means that the order they are specified will potentially matter.

See examples/coredhcp/hostnames.md for more documentation on how rules work.

Fixes #46

NOTE: For testing, a replace directive in go.mod is necessary to use the local repository's packages:

go mod edit -replace=github.com/openchami/coresmd=./

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

For more info, see Contributing Guidelines.

@synackd synackd force-pushed the feat/hostname-policy branch from 3c6f75f to 1c95202 Compare March 18, 2026 16:55
@synackd synackd added the needs testing Requires additional testing before merge label Mar 18, 2026
@synackd synackd marked this pull request as ready for review March 18, 2026 16:57
synackd added 2 commits March 18, 2026 13:41
Signed-off-by: Devon Bautista <17506592+synackd@users.noreply.github.com>
Signed-off-by: Devon Bautista <17506592+synackd@users.noreply.github.com>
@synackd synackd force-pushed the feat/hostname-policy branch from 1c95202 to 39dbe0c Compare March 18, 2026 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs testing Requires additional testing before merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Configurable Hostname Policy in CoreSMD (CoreDHCP Plugin)

1 participant