2018-08-08 12:22:50 +00:00
|
|
|
{
|
|
|
|
"apiVersion": "v1",
|
|
|
|
"kind": "List",
|
|
|
|
"items": [
|
|
|
|
{
|
|
|
|
"kind": "Endpoints",
|
|
|
|
"apiVersion": "v1",
|
|
|
|
"metadata": {
|
|
|
|
"name": "heketi-storage-endpoints",
|
|
|
|
"creationTimestamp": null
|
|
|
|
},
|
|
|
|
"subsets": [
|
|
|
|
{% set nodeblocks = [] %}
|
|
|
|
{% for node in nodes %}
|
|
|
|
{% set nodeblock %}
|
|
|
|
{
|
|
|
|
"addresses": [
|
|
|
|
{
|
2019-10-16 11:25:42 +00:00
|
|
|
"ip": "{{ hostvars[node].ip }}"
|
2018-08-08 12:22:50 +00:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"ports": [
|
|
|
|
{
|
|
|
|
"port": 1
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
{% endset %}
|
|
|
|
{% if nodeblocks.append(nodeblock) %}{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
{{ nodeblocks|join(',') }}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"kind": "Service",
|
|
|
|
"apiVersion": "v1",
|
|
|
|
"metadata": {
|
|
|
|
"name": "heketi-storage-endpoints",
|
|
|
|
"creationTimestamp": null
|
|
|
|
},
|
|
|
|
"spec": {
|
|
|
|
"ports": [
|
|
|
|
{
|
|
|
|
"port": 1,
|
|
|
|
"targetPort": 0
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"status": {
|
|
|
|
"loadBalancer": {}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|