1 ##############################################################################
2 # Copyright (c) 2019 Mirantis Inc., Enea AB and others.
3 # All rights reserved. This program and the accompanying materials
4 # are made available under the terms of the Apache License, Version 2.0
5 # which accompanies this distribution, and is available at
6 # http://www.apache.org/licenses/LICENSE-2.0
7 ##############################################################################
8 {%- import 'net_map.j2' as nm with context %}
11 - system.reclass.storage.salt
12 - system.reclass.storage.system.kubernetes_control_single
13 {%- if nm.cluster.has_baremetal_nodes %}
14 - system.reclass.storage.system.infra_maas_single
16 - system.salt.master.api
17 - system.salt.master.single
18 - system.salt.minion.ca.salt_master
19 - system.salt.minion.cert.k8s_server_single
20 - cluster.mcp-k8s-calico-noha
23 salt_master_environment_repository: 'https://github.com/salt-formulas'
24 salt_master_environment_revision: master
25 reclass_data_repository: local
26 salt_master_base_environment: prd
27 salt_master_host: 127.0.0.1
28 salt_minion_ca_host: ${linux:network:fqdn}
29 # yamllint disable-line rule:line-length
30 salt_api_password_hash: "$6$sGnRlxGf$al5jMCetLP.vfI/fTl3Z0N7Za1aeiexL487jAtyRABVfT3NlwZxQGVhO7S1N8OwS/34VHYwZQA8lkXwKMN/GS1"
31 kubernetes_control_node01_deploy_address: ${_param:opnfv_openstack_control_node01_pxe_admin_address}
32 kubernetes_control_system_codename: bionic
40 accept_policy: open_mode
47 x509.get_pem_entries: ['/etc/pki/all_cas/*']
53 kubernetes_control_node01:
55 pxe_admin_interface: {{ nm.ctl01.nic_admin }}
56 pxe_admin_address: ${_param:opnfv_openstack_control_node01_pxe_admin_address}
57 # We support per-node (not only per-role) compute configuration via IDF
58 {%- for cmp in range(1, nm.cmp_nodes + 1) %}
59 {%- set n = '%02d' | format(cmp) %}
60 {%- set i = nm.cmp001.idx + cmp - 1 %}
62 {%- set admin = nm.net_admin_hosts | length + nm.start_ip[nm.net_admin] + loop.index %}
63 {%- set mgmt = nm.net_mgmt_hosts | length + nm.start_ip[nm.net_mgmt] + loop.index %}
64 {%- set pub = nm.net_public_hosts | length + nm.start_ip[nm.net_public] + loop.index %}
65 {%- set pri = nm.net_private_hosts | length + nm.start_ip[nm.net_private] + loop.index %}
66 kubernetes_compute_node{{ n }}:
67 name: cmp{{ '%03d' | format(cmp) }}
68 domain: ${_param:cluster_domain}
70 - cluster.${_param:cluster_name}.kubernetes.compute
72 pxe_admin_address: {{ nm.net_admin | ipnet_hostaddr(admin) }}
73 pxe_admin_interface: {{ conf.idf.fuel.network.node[i].interfaces[nm.idx_admin] }}
74 single_address: {{ nm.net_mgmt | ipnet_hostaddr(mgmt) }}
75 tenant_address: {{ nm.net_private | ipnet_hostaddr(pri) }}
76 external_address: {{ nm.net_public | ipnet_hostaddr(pub) }}
77 salt_master_host: ${_param:reclass_config_master}
78 linux_system_codename: ${_param:kubernetes_control_system_codename}