diff --git a/chart/test-values.yaml b/chart/test-values.yaml index edca641a..5438b500 100644 --- a/chart/test-values.yaml +++ b/chart/test-values.yaml @@ -1,6 +1,8 @@ --- secretName: devstack configMap: + ceilometer: + dbUri: "sqlite:///:memory:" horizon: ingress: host: "horizon.vexxhost.com" diff --git a/config/samples/operator-config.yaml b/config/samples/operator-config.yaml index 20313b53..dad93b00 100644 --- a/config/samples/operator-config.yaml +++ b/config/samples/operator-config.yaml @@ -4,6 +4,8 @@ metadata: name: operator-config data: operator-config.yaml: | + ceilometer: + dbUri: "sqlite:///:memory:" horizon: ingress: host: "horizon.vexxhost.com" diff --git a/openstack_operator/ceilometer.py b/openstack_operator/ceilometer.py index 1b381acc..aed284a1 100644 --- a/openstack_operator/ceilometer.py +++ b/openstack_operator/ceilometer.py @@ -25,8 +25,10 @@ def create_or_resume(spec): """Create or start-up Ceilometer.""" config_hash = utils.generate_hash(spec) + env = utils.get_uwsgi_env() utils.create_or_update('ceilometer/secret.yml.j2', spec=spec) utils.create_or_update('ceilometer/deployment-agent-notification.yml.j2', - spec=spec, config_hash=config_hash) + spec=spec, env=env, + config_hash=config_hash) utils.create_or_update('ceilometer/horizontalpodautoscaler.yml.j2') diff --git a/openstack_operator/templates/ceilometer/deployment-agent-notification.yml.j2 b/openstack_operator/templates/ceilometer/deployment-agent-notification.yml.j2 index 79a6adf3..9a7d1a2f 100644 --- a/openstack_operator/templates/ceilometer/deployment-agent-notification.yml.j2 +++ b/openstack_operator/templates/ceilometer/deployment-agent-notification.yml.j2 @@ -35,6 +35,13 @@ spec: containers: - name: agent image: vexxhost/ceilometer-agent-notification:latest + env: + - name: "DATABASE_URI" + value: "{{ spec.dbUri }}" + {% for v in env %} + - name: "{{ v.name }}" + value: "{{ v.value }}" + {% endfor %} volumeMounts: - name: ceilometer-config mountPath: /etc/ceilometer @@ -48,10 +55,7 @@ spec: ephemeral-storage: 1G memory: 128M - name: atmosphere-ingress - image: jmalloc/echo-server - env: - - name: LOG_HTTP_BODY - value: 'true' + image: vexxhost/atmosphere-ingress volumes: - name: ceilometer-config secret: