Move StackLight database to a separate class
diff --git a/influxdb/database/stacklight.yml b/influxdb/database/stacklight.yml
new file mode 100644
index 0000000..d741380
--- /dev/null
+++ b/influxdb/database/stacklight.yml
@@ -0,0 +1,23 @@
+parameters:
+ influxdb:
+ server:
+ database:
+ lma:
+ enabled: true
+ name: lma
+ retention_policy:
+ - name: lma
+ is_default: true
+ duration: 30d
+ replication: 1
+ user:
+ lma:
+ enabled: true
+ name: lma
+ password: ${_param:influxdb_stacklight_password}
+ grant:
+ grant_lma_all:
+ enabled: true
+ user: lma
+ database: lma
+ privilege: all
diff --git a/influxdb/server/single.yml b/influxdb/server/single.yml
index 3d40099..ed0b2d5 100644
--- a/influxdb/server/single.yml
+++ b/influxdb/server/single.yml
@@ -19,23 +19,3 @@
enabled: true
name: 'root'
password: ${_param:influxdb_admin_password}
- database:
- lma:
- enabled: true
- name: lma
- retention_policy:
- - name: lma
- is_default: true
- duration: 30d
- replication: 1
- user:
- lma:
- enabled: true
- name: lma
- password: ${_param:influxdb_stacklight_password}
- grant:
- grant_lma_all:
- enabled: true
- user: lma
- database: lma
- privilege: all
diff --git a/reclass/storage/system/stacklight_server_cluster.yml b/reclass/storage/system/stacklight_server_cluster.yml
index 5a106b9..1ffe9b3 100644
--- a/reclass/storage/system/stacklight_server_cluster.yml
+++ b/reclass/storage/system/stacklight_server_cluster.yml
@@ -8,6 +8,7 @@
classes:
- cluster.${_param:cluster_name}.stacklight.server
- system.influxdb.server.single
+ - system.influxdb.database.stacklight
- system.elasticsearch.client.single
- system.grafana.client.single
- system.kibana.client.single