Skip to content

How to influence DNS hostnames when using the static IP config #318

@bassplay3r

Description

@bassplay3r

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions