install-config-template.yaml.j2 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. apiVersion: v1
  2. metadata:
  3. name: {{ install_type }}
  4. baseDomain: ocp4.example.com
  5. {% if install_type == 'iso' %}
  6. bootstrapInPlace:
  7. installationDisk: /dev/sda
  8. {% endif %}
  9. compute:
  10. - hyperthreading: Enabled
  11. name: worker
  12. {% if install_type == 'ipi' %}
  13. replicas: 2
  14. {% else %}
  15. replicas: 0
  16. {% endif %}
  17. controlPlane:
  18. hyperthreading: Enabled
  19. name: master
  20. {% if install_type == 'ipi' %}
  21. replicas: 3
  22. {% else %}
  23. replicas: 1
  24. {% endif %}
  25. networking:
  26. clusterNetwork:
  27. - cidr: 10.128.0.0/14
  28. hostPrefix: 23
  29. networkType: OVNKubernetes
  30. {% if install_type in ['agent','ipi'] %}
  31. machineNetwork:
  32. {% if install_type == 'agent' %}
  33. - cidr: {{ hostvars[install_host]['ansible_facts']['default_ipv4']['address'] }}/32
  34. {% else %}
  35. - cidr: {{ (hostvars[install_host]['ansible_facts']['default_ipv4']['address'] + '/' + hostvars[install_host]['ansible_facts']['default_ipv4']['netmask']) | ansible.utils.ipaddr('network/prefix') }}
  36. {% endif %}
  37. {% endif %}
  38. serviceNetwork:
  39. - 172.30.0.0/16
  40. platform:
  41. {% if install_type == 'ipi' %}
  42. baremetal:
  43. apiVIP: 192.168.50.8
  44. ingressVIP: 192.168.50.9
  45. {% else %}
  46. none: {}
  47. {% endif %}
  48. fips: false
  49. pullSecret: '{{ pull_secret | ansible.builtin.to_json }}'
  50. sshKey: '{{ public_key }}'
  51. additionalTrustBundle: |
  52. {{ lab_ca_cert | ansible.builtin.regex_replace('^', ' ', multiline=True) }}
  53. imageDigestSources:
  54. {# There are two ImageDigestMirrorSet resources in idms-oc-mirror.yaml - use a loop. #}
  55. {% for cs in content_sources %}
  56. {{ cs.spec.imageDigestMirrors | list | to_yaml }}{% endfor %}