kolla-ansible/ansible/roles/magnum/templates/magnum-api.json.j2
Christian Berendt c939504da6 magnum: support kubeconfig configuration file
If a file {{ node_custom_config }}/magnum/kubeconfig exists, it is
copied to /var/lib/magnum/.kube/config in all Magnum Service Containers.
At this location, the vexxhost/magnum-cluster-api will loo for the Kubeconfig
configuration file to control the Cluster API Control Plane. If the
vexxhost/magnum-cluster-api is installed in the Magnum container images,
control of a cluster API control plane can then take place via the Magnum API.

Depends-On: https://review.opendev.org/c/openstack/kolla/+/902101
Change-Id: I986c5192fe96b9c480a2d8fa87d719a50ce78186
2023-12-01 07:15:25 +00:00

32 lines
991 B
Django/Jinja

{
"command": "magnum-api --config-file /etc/magnum/magnum.conf",
"config_files": [
{
"source": "{{ container_config_directory }}/magnum.conf",
"dest": "/etc/magnum/magnum.conf",
"owner": "magnum",
"perm": "0600"
}{% if magnum_kubeconfig_file_path is defined %},
{
"source": "{{ container_config_directory }}/kubeconfig",
"dest": "/var/lib/magnum/.kube/config",
"owner": "magnum",
"perm": "0600"
}{% endif %}
{% if magnum_policy_file is defined %},
{
"source": "{{ container_config_directory }}/{{ magnum_policy_file }}",
"dest": "/etc/magnum/{{ magnum_policy_file }}",
"owner": "magnum",
"perm": "0600"
}{% endif %}
],
"permissions": [
{
"path": "/var/log/kolla/magnum",
"owner": "magnum:magnum",
"recurse": true
}
]
}