{"id":38805763,"url":"https://github.com/aenix-io/dnsmasq-controller","last_synced_at":"2026-01-17T12:50:25.716Z","repository":{"id":42129438,"uuid":"255655081","full_name":"aenix-io/dnsmasq-controller","owner":"aenix-io","description":"Run DNS- and DHCP-server inside Kubernetes cluster","archived":false,"fork":false,"pushed_at":"2024-10-20T06:22:16.000Z","size":142,"stargazers_count":76,"open_issues_count":2,"forks_count":21,"subscribers_count":4,"default_branch":"master","last_synced_at":"2026-01-14T23:27:03.558Z","etag":null,"topics":["dhcp","dns","dnsmasq","dnsmasq-controller","kubebuilder","kubernetes","operator"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aenix-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-04-14T15:57:00.000Z","updated_at":"2026-01-07T15:04:51.000Z","dependencies_parsed_at":"2024-06-18T23:15:00.616Z","dependency_job_id":"7f44a4a1-b4e8-4781-a8af-299d1cb73010","html_url":"https://github.com/aenix-io/dnsmasq-controller","commit_stats":{"total_commits":22,"total_committers":3,"mean_commits":7.333333333333333,"dds":0.09090909090909094,"last_synced_commit":"0f116836a67c5367a01040d4573c808d722452fe"},"previous_names":["kvaps/dnsmasq-controller","aenix-io/dnsmasq-controller","kubefarm/dnsmasq-controller"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/aenix-io/dnsmasq-controller","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aenix-io%2Fdnsmasq-controller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aenix-io%2Fdnsmasq-controller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aenix-io%2Fdnsmasq-controller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aenix-io%2Fdnsmasq-controller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aenix-io","download_url":"https://codeload.github.com/aenix-io/dnsmasq-controller/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aenix-io%2Fdnsmasq-controller/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28508635,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T11:50:55.898Z","status":"ssl_error","status_checked_at":"2026-01-17T11:50:55.569Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dhcp","dns","dnsmasq","dnsmasq-controller","kubebuilder","kubernetes","operator"],"created_at":"2026-01-17T12:50:25.143Z","updated_at":"2026-01-17T12:50:25.703Z","avatar_url":"https://github.com/aenix-io.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dnsmasq-controller\n\nA Dnsmasq-controller for Kubernetes, implemented in go using [kubebuilder](https://kubebuilder.io/).\n\n## Status\n\n![GitHub](https://img.shields.io/badge/status-beta-blue?style=for-the-badge)\n![GitHub](https://img.shields.io/github/license/kristofferahl/healthchecksio-operator?style=for-the-badge)\n![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/kristofferahl/healthchecksio-operator?style=for-the-badge)\n\n## Supported resources\n\n- DnsmasqOptions\n- DnsHosts\n- DhcpHosts\n- DhcpOptions\n\n\n### Configuration\n\n| Flag                      | Type   | Required | Description                                                                                                                             |\n|---------------------------|--------|----------|-----------------------------------------------------------------------------------------------------------------------------------------|\n| `-cleanup`                | bool   | false    | Cleanup Dnsmasq config directory before start.                                                                                          |\n| `-conf-dir`               | string | false    | Dnsmasq config directory for write configuration to. (default \"/etc/dnsmasq.d\")                                                         |\n| `-controller`             | string | false    | Name of the controller this controller satisfies. (default \"\")                                                                          |\n| `-development`            | bool   | false    | Run the controller in development mode.                                                                                                 |\n| `-dhcp`                   | bool   | false    | Enable DHCP Service and configuration discovery.                                                                                        |\n| `-dns`                    | bool   | false    | Enable DNS Service and configuration discovery.                                                                                         |\n| `-enable-leader-election` | bool   | false    | Enable leader election for controller manager. Enabling this will ensure there is only one active controller manager.                   |\n| `-kubeconfig`             | string | false    | Paths to a kubeconfig. Only required if out-of-cluster.                                                                                 |\n| `-log-level`              | string | false    | The log level used by the operator. (default \"info\")                                                                                    |\n| `-metrics-addr`           | string | false    | The address the metric endpoint binds to. (default \":8080\")                                                                             |\n| `-sync-delay`             | int    | false    | Time in seconds to syncronise Dnsmasq configuration. (default 1)                                                                        |\n| `-watch-namespace`        | string | false    | Namespace the controller watches for updates to Kubernetes objects. All namespaces are watched if this parameter is left empty.         |\n| `--`                      | array  | false    | Additional command line arguments for Dnsmasq may be specified after `--` (read [dnsmasq-man] for more details)                         |\n\n[dnsmasq-man]: http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html\n\n## Installation\n\n```bash\n# CRDs\nkubectl apply -k config/crd/bases\n\n# RBAC\nkubectl apply -k config/rbac\n\n# DNS-server (for infra.example.org)\nkubectl apply -k config/dns-server\n\n# DHCP-server\nkubectl apply -k config/dhcp-server\n\n# Add dnsmasq role to your nodes\nkubectl label node \u003cnode1\u003e \u003cnode2\u003e \u003cnode3\u003e node-role.kubernetes.io/dnsmasq=\n```\n\n## Examples\n\nGlobal DHCP-configuration:\n\n```yaml\n---\napiVersion: dnsmasq.kvaps.cf/v1beta1\nkind: DhcpOptions\nmetadata:\n  name: default-network-configuration\nspec:\n  controller: \"\"\n  options:\n  - key: option:router\n    values: [192.168.67.1]\n  - key: option:dns-server\n    values: [192.168.67.1]\n  - key: option:domain-name\n    values: [infra.example.org]\n  - key: option:domain-search\n    values: [infra.example.org]\n---\napiVersion: dnsmasq.kvaps.cf/v1beta1\nkind: DnsmasqOptions\nmetadata:\n  name: default-matchers\nspec:\n  controller: \"\"\n  options:\n  - key: dhcp-range\n    values: [192.168.67.0,static,infinite]\n  - key: dhcp-match\n    values: [set:iPXE,\"175\",\"39\"]\n  - key: dhcp-match\n    values: [set:X86PC,option:client-arch,\"0\"]\n  - key: dhcp-match\n    values: [set:X86-64_EFI,option:client-arch,\"7\"]\n  - key: dhcp-match\n    values: [set:X86-64_EFI,option:client-arch,\"9\"]\n```\n\nGlobal DNS-configuration:\n\n```yaml\n---\napiVersion: dnsmasq.kvaps.cf/v1beta1\nkind: DnsmasqOptions\nmetadata:\n  name: global-dns\nspec:\n  controller: \"\"\n  options:\n  - key: srv-host\n    values: [_kerberos-master._tcp.infra.example.org,freeipa.example.org,\"88\"]\n  - key: srv-host\n    values: [_kerberos-master._udp.infra.example.org,freeipa.example.org,\"88\"]\n  - key: srv-host\n    values: [_kerberos._tcp.infra.example.org,freeipa.example.org,\"88\"]\n  - key: srv-host\n    values: [_kerberos._udp.infra.example.org,freeipa.example.org,\"88\"]\n  - key: srv-host\n    values: [_kpasswd._tcp.infra.example.org,freeipa.example.org,\"464\"]\n  - key: srv-host\n    values: [_kpasswd._udp.infra.example.org,freeipa.example.org,\"464\"]\n  - key: srv-host\n    values: [_ldap._tcp.infra.example.org,freeipa.example.org,\"389\"]\n  - key: srv-host\n    values: [_ntp._udp.infra.example.org,129.6.15.28,\"123\"]\n  - key: srv-host\n    values: [_ntp._udp.infra.example.org,129.6.15.29,\"123\"]\n  - key: txt-record\n    values: [_kerberos.infra.example.org,EXAMPLE.ORG]\n```\n\nNetboot-server configuration with tag `ltsp1`:\n\n```yaml\n---\napiVersion: dnsmasq.kvaps.cf/v1beta1\nkind: DhcpOptions\nmetadata:\n  name: ltsp1\nspec:\n  controller: \"\"\n  options:\n  - key: option:server-ip-address\n    tags: [ltsp1]\n    values: [192.168.67.11]\n  - key: option:tftp-server\n    tags: [ltsp1]\n    values: [ltsp1]\n  - key: option:bootfile-name\n    tags: [ltsp1,X86PC]\n    values: [ltsp/grub/i386-pc/core.0]\n  - key: option:bootfile-name\n    tags: [ltsp1,X86-64_EFI]\n    values: [ltsp/grub/x86_64-efi/core.efi]\n```\n\nDHCP-client for network booting using assigned tag `ltsp1`:\n\n```yaml\n---\napiVersion: dnsmasq.kvaps.cf/v1beta1\nkind: DhcpHosts\nmetadata:\n  name: netboot-client\nspec:\n  controller: \"\"\n  hosts:\n  - ip: 192.168.67.20\n    macs:\n    - 94:57:a5:d3:b6:f2\n    - 94:57:a5:d3:b6:f3\n    clientIDs: [\"*\"]\n    setTags: [ltsp1]\n    hostname: node1\n    leaseTime: infinite\n```\n\nAdd A, AAAA and PTR records to the DNS:\n\n```yaml\n---\napiVersion: dnsmasq.kvaps.cf/v1beta1\nkind: DnsHosts\nmetadata:\n  name: netboot-client\nspec:\n  controller: \"\"\n  hosts:\n  - ip: 192.168.67.20\n    hostnames:\n    - node1\n    - node1.infra.example.org\n```\n\n## Development\n\n### Pre-requisites\n- [Go](https://golang.org/) 1.13 or later\n- [Kubebuilder](https://kubebuilder.io/) 2.3.1\n- [Kubernetes](https://kubernetes.io/) cluster\n\n### Getting started\n```bash\nmake install\nmake run\n```\n\n### Running tests\n```bash\nmake test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faenix-io%2Fdnsmasq-controller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faenix-io%2Fdnsmasq-controller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faenix-io%2Fdnsmasq-controller/lists"}