Skip to content
This repository was archived by the owner on Jul 3, 2023. It is now read-only.

Commit 9c9ab35

Browse files
committed
Added a symlink for the config of cloudkitty-api
When mounting a ConfigMap on kubernetes, it erases the content of the directory. That's why a second directory is required in order to preserve static configuration files. Also updated README to explain where the config files are.
1 parent 8169a6e commit 9c9ab35

3 files changed

Lines changed: 19 additions & 3 deletions

File tree

CloudKitty/api/Dockerfile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
FROM python:3.7-slim-buster
22

3-
RUN apt-get update \
3+
RUN apt-get update \
44
&& apt-get install --no-install-recommends -y \
55
apache2 \
66
libapache2-mod-wsgi-py3 \
77
gcc \
88
python3-dev \
99
&& pip install cloudkitty \
10-
&& mkdir /etc/cloudkitty \
10+
&& mkdir \
11+
/etc/cloudkitty \
12+
/etc/cloudkitty-config \
13+
&& ln -sf \
14+
/etc/cloudkitty/cloudkitty.conf \
15+
/etc/cloudkitty-config/cloudkitty.conf \
16+
&& ln -sf \
17+
/etc/cloudkitty/metrics.yml \
18+
/etc/cloudkitty-config/metrics.yml \
1119
&& apt-get purge -y \
1220
gcc \
1321
python3-dev \

CloudKitty/processor/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
FROM python:3.7-buster
22

3-
RUN pip install cloudkitty
3+
RUN pip install cloudkitty \
4+
&& mkdir /etc/cloudkitty
45

56
CMD [ "cloudkitty-processor" ]

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ This repository contains the Dockerfiles for Objectif Libre's official images.
88

99
Contains the Dockerfile for CloudKitty's API and its dependencies.
1010

11+
If you wish to configure CloudKitty, the configuration files are located here :
12+
13+
- `/etc/cloudkitty-config/metrics.yml`
14+
- `/etc/cloudkitty-config/cloudkitty.conf`
15+
16+
Please, refer to the [documentation of cloudkitty](https://docs.openstack.org/cloudkitty/latest/admin/configuration/configuration.html) if you don't know how to use theses files.
17+
1118
### processor
1219

1320
Contains the Dockerfile for CloudKitty's processor.

0 commit comments

Comments
 (0)