Browse Source

Only designate-central and mdns require database access

According to Designate architecture documentation,
only the designate-central and mdns services require database access.

This change removes the designate::db class for generic service and
include the designate::db class for services that need it instead.

Change-Id: I696745e2d57aade6cbb0fe89e334fddf1beaafdb
tags/14.1.0
Mathieu Gagné 7 months ago
parent
commit
412ca9519c

+ 1
- 0
manifests/central.pp View File

@@ -69,6 +69,7 @@ class designate::central (
69 69
 ) inherits designate {
70 70
 
71 71
   include ::designate::deps
72
+  include ::designate::db
72 73
 
73 74
   designate_config {
74 75
     'service:central/managed_resource_email'     : value => $managed_resource_email;

+ 0
- 1
manifests/generic_service.pp View File

@@ -41,7 +41,6 @@ define designate::generic_service(
41 41
 
42 42
   include ::designate::deps
43 43
   include ::designate::params
44
-  include ::designate::db
45 44
 
46 45
   $designate_title = "designate-${name}"
47 46
   Exec['post-designate_config'] ~> Anchor['designate::service::end']

+ 1
- 0
manifests/mdns.pp View File

@@ -68,6 +68,7 @@ class designate::mdns (
68 68
 ) inherits designate {
69 69
 
70 70
   include ::designate::deps
71
+  include ::designate::db
71 72
 
72 73
   designate_config {
73 74
     'service:mdns/workers'            : value => $workers;

+ 4
- 0
spec/classes/designate_central_spec.rb View File

@@ -26,6 +26,10 @@ describe 'designate::central' do
26 26
         )
27 27
       end
28 28
 
29
+      it 'includes designate::db' do
30
+        is_expected.to contain_class('designate::db')
31
+      end
32
+
29 33
       it 'configures designate-central with default parameters' do
30 34
         is_expected.to contain_designate_config('service:central/managed_resource_email').with_value('hostmaster@example.com')
31 35
         is_expected.to contain_designate_config('service:central/managed_resource_tenant_id').with_value('123456')

+ 4
- 0
spec/classes/designate_mdns_spec.rb View File

@@ -27,6 +27,10 @@ describe 'designate::mdns' do
27 27
         )
28 28
       end
29 29
 
30
+      it 'includes designate::db' do
31
+        is_expected.to contain_class('designate::db')
32
+      end
33
+
30 34
       it 'configures designate-mdns with default parameters' do
31 35
         is_expected.to contain_designate_config('service:mdns/workers').with_value(8)
32 36
         is_expected.to contain_designate_config('service:mdns/threads').with_value('<SERVICE DEFAULT>')

Loading…
Cancel
Save