Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
bassplay3r opened this issue May 13, 2024 · 0 comments
Open

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

bassplay3r opened this issue May 13, 2024 · 0 comments

Comments

@bassplay3r
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant