main.yml 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. ---
  2. # openshift_master_defaults_in_use is a workaround to detect if we are consuming
  3. # the plays from the role or outside of the role.
  4. openshift_master_defaults_in_use: True
  5. openshift_master_debug_level: "{{ debug_level | default(2) }}"
  6. r_openshift_master_firewall_enabled: "{{ os_firewall_enabled | default(True) }}"
  7. r_openshift_master_use_firewalld: "{{ os_firewall_use_firewalld | default(False) }}"
  8. openshift_node_ips: []
  9. r_openshift_master_clean_install: false
  10. r_openshift_master_etcd3_storage: false
  11. r_openshift_master_os_firewall_enable: true
  12. r_openshift_master_os_firewall_deny: []
  13. default_r_openshift_master_os_firewall_allow:
  14. - service: api server https
  15. port: "{{ openshift.master.api_port }}/tcp"
  16. - service: api controllers https
  17. port: "{{ openshift.master.controllers_port }}/tcp"
  18. - service: skydns tcp
  19. port: "{{ openshift.master.dns_port }}/tcp"
  20. - service: skydns udp
  21. port: "{{ openshift.master.dns_port }}/udp"
  22. - service: etcd embedded
  23. port: 4001/tcp
  24. cond: "{{ groups.oo_etcd_to_config | default([]) | length == 0 }}"
  25. r_openshift_master_os_firewall_allow: "{{ default_r_openshift_master_os_firewall_allow | union(openshift_master_open_ports | default([])) }}"
  26. # oreg_url is defined by user input
  27. oreg_host: "{{ oreg_url.split('/')[0] if (oreg_url is defined and '.' in oreg_url.split('/')[0]) else '' }}"
  28. oreg_auth_credentials_path: "{{ r_openshift_master_data_dir }}/.docker"
  29. oreg_auth_credentials_replace: False
  30. l_bind_docker_reg_auth: False
  31. containerized_svc_dir: "/usr/lib/systemd/system"
  32. ha_svc_template_path: "native-cluster"
  33. # NOTE
  34. # r_openshift_master_*_default may be defined external to this role.
  35. # openshift_use_*, if defined, may affect other roles or play behavior.
  36. r_openshift_master_use_openshift_sdn_default: "{{ openshift_use_openshift_sdn | default(True) }}"
  37. r_openshift_master_use_openshift_sdn: "{{ r_openshift_master_use_openshift_sdn_default }}"
  38. r_openshift_master_use_nuage_default: "{{ openshift_use_nuage | default(False) }}"
  39. r_openshift_master_use_nuage: "{{ r_openshift_master_use_nuage_default }}"
  40. r_openshift_master_use_contiv_default: "{{ openshift_use_contiv | default(False) }}"
  41. r_openshift_master_use_contiv: "{{ r_openshift_master_use_contiv_default }}"
  42. r_openshift_master_use_kuryr_default: "{{ openshift_use_kuryr | default(False) }}"
  43. r_openshift_master_use_kuryr: "{{ r_openshift_master_use_kuryr_default }}"
  44. r_openshift_master_data_dir_default: "{{ openshift_data_dir | default('/var/lib/origin') }}"
  45. r_openshift_master_data_dir: "{{ r_openshift_master_data_dir_default }}"
  46. r_openshift_master_sdn_network_plugin_name_default: "{{ os_sdn_network_plugin_name | default('redhat/openshift-ovs-subnet') }}"
  47. r_openshift_master_sdn_network_plugin_name: "{{ r_openshift_master_sdn_network_plugin_name_default }}"
  48. openshift_master_image_config_latest_default: "{{ openshift_image_config_latest | default(False) }}"
  49. openshift_master_image_config_latest: "{{ openshift_master_image_config_latest_default }}"
  50. openshift_master_config_dir_default: "{{ (openshift.common.config_base | default('/etc/origin/master')) ~ '/master' }}"
  51. openshift_master_config_dir: "{{ openshift_master_config_dir_default }}"
  52. openshift_master_cloud_provider: "{{ openshift_cloudprovider_kind | default('aws') }}"
  53. openshift_master_node_config_networkconfig_mtu: "{{ openshift_node_sdn_mtu | default(1450) }}"
  54. openshift_master_node_config_kubeletargs_cpu: 500m
  55. openshift_master_node_config_kubeletargs_mem: 512M
  56. openshift_master_bootstrap_enabled: False
  57. openshift_master_client_binary: "{{ openshift.common.client_binary if openshift is defined else 'oc' }}"
  58. openshift_master_config_imageconfig_format: "{{ openshift.node.registry_url }}"
  59. # these are for the default settings in a generated node-config.yaml
  60. openshift_master_node_config_default_edits:
  61. - key: nodeName
  62. state: absent
  63. - key: dnsBindAddress
  64. value: 127.0.0.1:53
  65. - key: dnsDomain
  66. value: cluster.local
  67. - key: dnsRecursiveResolvConf
  68. value: /etc/origin/node/resolv.conf
  69. - key: imageConfig.format
  70. value: "{{ openshift_master_config_imageconfig_format }}"
  71. - key: kubeletArguments.cloud-config
  72. value:
  73. - "/etc/origin/cloudprovider/{{ openshift_master_cloud_provider }}.conf"
  74. - key: kubeletArguments.cloud-provider
  75. value:
  76. - "{{ openshift_master_cloud_provider }}"
  77. - key: kubeletArguments.kube-reserved
  78. value:
  79. - "cpu={{ openshift_master_node_config_kubeletargs_cpu }},memory={{ openshift_master_node_config_kubeletargs_mem }}"
  80. - key: kubeletArguments.system-reserved
  81. value:
  82. - "cpu={{ openshift_master_node_config_kubeletargs_cpu }},memory={{ openshift_master_node_config_kubeletargs_mem }}"
  83. - key: enable-controller-attach-detach
  84. value:
  85. - 'true'
  86. - key: networkConfig.mtu
  87. value: "{{ openshift_master_node_config_networkconfig_mtu }}"
  88. - key: networkConfig.networkPluginName
  89. value: "{{ r_openshift_master_sdn_network_plugin_name }}"
  90. - key: networkPluginName
  91. value: "{{ r_openshift_master_sdn_network_plugin_name }}"
  92. # We support labels for all nodes here
  93. openshift_master_node_config_kubeletargs_default_labels: []
  94. # We do support overrides for node group labels
  95. openshift_master_node_config_kubeletargs_master_labels: []
  96. openshift_master_node_config_kubeletargs_infra_labels: []
  97. openshift_master_node_config_kubeletargs_compute_labels: []
  98. openshift_master_node_config_master:
  99. type: master
  100. edits:
  101. - key: kubeletArguments.node-labels
  102. value: "{{ openshift_master_node_config_kubeletargs_default_labels |
  103. union(openshift_master_node_config_kubeletargs_master_labels) |
  104. union(['type=master']) }}"
  105. openshift_master_node_config_infra:
  106. type: infra
  107. edits:
  108. - key: kubeletArguments.node-labels
  109. value: "{{ openshift_master_node_config_kubeletargs_default_labels |
  110. union(openshift_master_node_config_kubeletargs_infra_labels) |
  111. union(['type=infra']) }}"
  112. openshift_master_node_config_compute:
  113. type: compute
  114. edits:
  115. - key: kubeletArguments.node-labels
  116. value: "{{ openshift_master_node_config_kubeletargs_default_labels |
  117. union(openshift_master_node_config_kubeletargs_compute_labels) |
  118. union(['type=compute']) }}"
  119. openshift_master_node_configs:
  120. - "{{ openshift_master_node_config_infra }}"
  121. - "{{ openshift_master_node_config_compute }}"
  122. openshift_master_bootstrap_namespace: openshift-node