main.yml 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  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. 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. # oreg_url is defined by user input
  26. oreg_host: "{{ oreg_url.split('/')[0] if (oreg_url is defined and '.' in oreg_url.split('/')[0]) else '' }}"
  27. oreg_auth_credentials_path: "{{ r_openshift_master_data_dir }}/.docker"
  28. oreg_auth_credentials_replace: False
  29. l_bind_docker_reg_auth: False
  30. containerized_svc_dir: "/usr/lib/systemd/system"
  31. ha_svc_template_path: "native-cluster"
  32. # NOTE
  33. # r_openshift_master_*_default may be defined external to this role.
  34. # openshift_use_*, if defined, may affect other roles or play behavior.
  35. r_openshift_master_use_openshift_sdn_default: "{{ openshift_use_openshift_sdn | default(True) }}"
  36. r_openshift_master_use_openshift_sdn: "{{ r_openshift_master_use_openshift_sdn_default }}"
  37. r_openshift_master_use_nuage_default: "{{ openshift_use_nuage | default(False) }}"
  38. r_openshift_master_use_nuage: "{{ r_openshift_master_use_nuage_default }}"
  39. r_openshift_master_use_contiv_default: "{{ openshift_use_contiv | default(False) }}"
  40. r_openshift_master_use_contiv: "{{ r_openshift_master_use_contiv_default }}"
  41. r_openshift_master_use_kuryr_default: "{{ openshift_use_kuryr | default(False) }}"
  42. r_openshift_master_use_kuryr: "{{ r_openshift_master_use_kuryr_default }}"
  43. r_openshift_master_data_dir_default: "{{ openshift_data_dir | default('/var/lib/origin') }}"
  44. r_openshift_master_data_dir: "{{ r_openshift_master_data_dir_default }}"
  45. r_openshift_master_sdn_network_plugin_name_default: "{{ os_sdn_network_plugin_name | default('redhat/openshift-ovs-subnet') }}"
  46. r_openshift_master_sdn_network_plugin_name: "{{ r_openshift_master_sdn_network_plugin_name_default }}"
  47. openshift_master_image_config_latest_default: "{{ openshift_image_config_latest | default(False) }}"
  48. openshift_master_image_config_latest: "{{ openshift_master_image_config_latest_default }}"
  49. openshift_master_config_dir_default: "{{ (openshift.common.config_base | default('/etc/origin/master')) ~ '/master' }}"
  50. openshift_master_config_dir: "{{ openshift_master_config_dir_default }}"
  51. openshift_master_cloud_provider: "{{ openshift_cloudprovider_kind | default('aws') }}"
  52. openshift_master_node_config_networkconfig_mtu: 1450
  53. openshift_master_node_config_kubeletargs_cpu: 500m
  54. openshift_master_node_config_kubeletargs_mem: 512M
  55. openshift_master_bootstrap_enabled: False
  56. openshift_master_client_binary: "{{ openshift.common.client_binary if openshift is defined else 'oc' }}"
  57. openshift_master_config_imageconfig_format: "{{ oreg_url if oreg_url != '' else 'registry.access.redhat.com/openshift3/ose-${component}:${version}' }}"
  58. # these are for the default settings in a generated node-config.yaml
  59. openshift_master_node_config_default_edits:
  60. - key: nodeName
  61. state: absent
  62. - key: dnsBindAddress
  63. value: 127.0.0.1:53
  64. - key: dnsDomain
  65. value: cluster.local
  66. - key: dnsRecursiveResolvConf
  67. value: /etc/origin/node/resolv.conf
  68. - key: imageConfig.format
  69. value: "{{ openshift_master_config_imageconfig_format }}"
  70. - key: kubeletArguments.cloud-config
  71. value:
  72. - "/etc/origin/cloudprovider/{{ openshift_master_cloud_provider }}.conf"
  73. - key: kubeletArguments.cloud-provider
  74. value:
  75. - "{{ openshift_master_cloud_provider }}"
  76. - key: kubeletArguments.kube-reserved
  77. value:
  78. - "cpu={{ openshift_master_node_config_kubeletargs_cpu }},memory={{ openshift_master_node_config_kubeletargs_mem }}"
  79. - key: kubeletArguments.system-reserved
  80. value:
  81. - "cpu={{ openshift_master_node_config_kubeletargs_cpu }},memory={{ openshift_master_node_config_kubeletargs_mem }}"
  82. - key: enable-controller-attach-detach
  83. value:
  84. - 'true'
  85. - key: networkConfig.mtu
  86. value: 8951
  87. - key: networkConfig.networkPluginName
  88. value: "{{ r_openshift_master_sdn_network_plugin_name }}"
  89. - key: networkPluginName
  90. value: "{{ r_openshift_master_sdn_network_plugin_name }}"
  91. # We support labels for all nodes here
  92. openshift_master_node_config_kubeletargs_default_labels: []
  93. # We do support overrides for node group labels
  94. openshift_master_node_config_kubeletargs_master_labels: []
  95. openshift_master_node_config_kubeletargs_infra_labels: []
  96. openshift_master_node_config_kubeletargs_compute_labels: []
  97. openshift_master_node_config_master:
  98. type: master
  99. edits:
  100. - key: kubeletArguments.node-labels
  101. value: "{{ openshift_master_node_config_kubeletargs_default_labels |
  102. union(openshift_master_node_config_kubeletargs_master_labels) |
  103. union(['type=master']) }}"
  104. openshift_master_node_config_infra:
  105. type: infra
  106. edits:
  107. - key: kubeletArguments.node-labels
  108. value: "{{ openshift_master_node_config_kubeletargs_default_labels |
  109. union(openshift_master_node_config_kubeletargs_infra_labels) |
  110. union(['type=infra']) }}"
  111. openshift_master_node_config_compute:
  112. type: compute
  113. edits:
  114. - key: kubeletArguments.node-labels
  115. value: "{{ openshift_master_node_config_kubeletargs_default_labels |
  116. union(openshift_master_node_config_kubeletargs_compute_labels) |
  117. union(['type=compute']) }}"
  118. openshift_master_node_configs:
  119. - "{{ openshift_master_node_config_infra }}"
  120. - "{{ openshift_master_node_config_compute }}"
  121. openshift_master_bootstrap_namespace: openshift-node