redhat-cop / redhat-cop/ocp4-helpernode

How to influence DNS hostnames when using the static IP config

Open
#318 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Jinja
Stars
358
Forks
308
PR merge metrics
No merged PRs in 30d

Description

We are moving from DHCP to static vars.yaml but we want to use our site's DNS and not the DNS on the helper


# cat ocp4-helpernode/vars.yaml
---
ansible_default_ipv4:
  alias: "enp1s0"
  broadcast: "10.192.131.255"
  gateway: "10.192.128.1"
  interface: "enp1s0"
  macaddress: "52:54:00:95:09:92"
  mtu: 1500
  netmask: "255.255.240.0"
  network: "10.192.131.0"
  prefix: "24"
  type: "ether"
disk: vda
ssh_gen_key: false
staticips: true
helper:
  name: "helper"
  ipaddr: "10.192.131.60"
dns:
  domain: "foo.bar.com"
  clusterid: "hjkzitv"
  forwarder1: "10.193.0.250"
  forwarder2: "10.192.0.250"
bootstrap:
  name: "bootstrap"
  ipaddr: "10.192.131.77"
masters:
  - name: "master0"
    ipaddr: "10.192.131.78"
  - name: "master1"
    ipaddr: "10.192.131.79"
  - name: "master2"
    ipaddr: "10.192.131.80"

workers:
  - name: "worker0"
    ipaddr: "10.192.131.81"
  - name: "worker1"
    ipaddr: "10.192.131.82"

When I resolve the nodes I get this

# cat /etc/resolv.conf
search hjkzitv.foo.bar.com
nameserver 127.0.0.1

# host master0
master0.hjkzitv.foo.bar.com has address 10.192.131.78

My nodes are already in our site's DNS as -vm1.foo.bar.com how do I get ocp4-helpernode to create the node names like that instead of master0..foo.bar.com?

is always random since we build the clusters every time we run in the CI

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with ocp4-helpernode/vars.yaml and compare the configured dns values with the generated /etc/resolv.conf and node names shown in the issue. Trace where the clusterid-based hostnames are produced and determine whether the configuration can use the site's existing hostname pattern. Done means the generated node names follow that pattern instead of ...

Written by the indexing model from the issue text.

Assessment

Tech stack
yaml
Domain
infrastructure, networking
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.