install-config-template.yaml.j2 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. replicas: 0
  13. controlPlane:
  14. hyperthreading: Enabled
  15. name: master
  16. {% if install_type == 'ipi' %}
  17. replicas: 3
  18. {% else %}
  19. replicas: 1
  20. {% endif %}
  21. networking:
  22. clusterNetwork:
  23. - cidr: 10.128.0.0/14
  24. hostPrefix: 23
  25. networkType: OVNKubernetes
  26. {% if install_type in ['agent','ipi'] %}
  27. machineNetwork:
  28. {% if install_type == 'agent' %}
  29. - cidr: {{ hostvars[install_host]['ansible_facts']['default_ipv4']['address'] }}/32
  30. {% else %}
  31. - cidr: {{ (hostvars[install_host]['ansible_facts']['default_ipv4']['address'] + '/24') | ansible.utils.ipaddr('net') }}
  32. {% endif %}
  33. {% endif %}
  34. serviceNetwork:
  35. - 172.30.0.0/16
  36. platform:
  37. none: {}
  38. fips: false
  39. pullSecret: '{{ pull_secret | ansible.builtin.to_json }}'
  40. sshKey: '{{ public_key }}'
  41. additionalTrustBundle: |
  42. {{ lab_ca_cert | ansible.builtin.regex_replace('^', ' ', multiline=True) }}
  43. imageDigestSources:
  44. {# There are two ImageDigestMirrorSet resources in idms-oc-mirror.yaml - use a loop. #}
  45. {% for cs in content_sources %}
  46. {{ cs.spec.imageDigestMirrors | list | to_yaml }}{% endfor %}