JonasProgrammer / JonasProgrammer/docker-machine-driver-hetzner
Adding a flag for RDNS domain
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 438
- Forks
- 58
- PR merge metrics
- No merged PRs in 30d
Description
I want to create whitelisting in our firewall for specific RDNS entries because I don't know the PrimaryIPv4 address of the machine that will be created.
Is it possible to add a flag for providing a domain that is used for the RDNS pointer?
I am a go newbie. Would something like this work?
func (d *Driver) setupRDNS() error {
if d.RDNSDomain == "" {
return nil
}
log.Infof("configuring RDNS ...")
opts := hcloud.PrimaryIPChangeDNSPtrOpts{
DNSPtr: d.MachineName + "." + d.RDNSDomain,
}
act, _, err := d.getClient().PrimaryIP.ChangeDNSPtr(context.Background(), opts)
if err != nil {
return fmt.Errorf("could not change DNS pointer: %w", err)
}
return d.waitForAction(act)
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names Driver.setupRDNS and hcloud.PrimaryIP.ChangeDNSPtr, but no repository file or test. Start by locating the driver setup and flag definitions, then verify the flag reaches RDNS configuration and the relevant driver tests cover the requested behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cloud, networking
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100