diff --git a/files/gitlab-cookbooks/consul/attributes/default.rb b/files/gitlab-cookbooks/consul/attributes/default.rb index d30cee00e72c45f83d809d9d6b842fc2c444c02e_ZmlsZXMvZ2l0bGFiLWNvb2tib29rcy9jb25zdWwvYXR0cmlidXRlcy9kZWZhdWx0LnJi..c24ace64c958272ede3df3e9773feefe6f23a991_ZmlsZXMvZ2l0bGFiLWNvb2tib29rcy9jb25zdWwvYXR0cmlidXRlcy9kZWZhdWx0LnJi 100644 --- a/files/gitlab-cookbooks/consul/attributes/default.rb +++ b/files/gitlab-cookbooks/consul/attributes/default.rb @@ -15,12 +15,8 @@ 'SSL_CERT_DIR' => '/opt/gitlab/embedded/ssl/certs/' } -# Critical state of service:postgresql indicates a node is not a master -# It does not need to be logged. Health status should be checked from -# the consul cluster. -default['consul']['logging_filters'] = { - postgresql_warning: "-*agent: Check 'service:postgresql' is now critical" -} +default['consul']['logging_filters'] = {} + default['consul']['monitoring_service_discovery'] = false default['consul']['encryption_key'] = nil diff --git a/spec/chef/cookbooks/consul/recipes/consul_spec.rb b/spec/chef/cookbooks/consul/recipes/consul_spec.rb index d30cee00e72c45f83d809d9d6b842fc2c444c02e_c3BlYy9jaGVmL2Nvb2tib29rcy9jb25zdWwvcmVjaXBlcy9jb25zdWxfc3BlYy5yYg==..c24ace64c958272ede3df3e9773feefe6f23a991_c3BlYy9jaGVmL2Nvb2tib29rcy9jb25zdWwvcmVjaXBlcy9jb25zdWxfc3BlYy5yYg== 100644 --- a/spec/chef/cookbooks/consul/recipes/consul_spec.rb +++ b/spec/chef/cookbooks/consul/recipes/consul_spec.rb @@ -118,6 +118,9 @@ group: 'bar', configuration: { log_json: true + }, + logging_filters: { + label: 'filter' } } ) @@ -137,6 +140,12 @@ } end + it 'renders log config with logging_filters keys/values as comments/values' do + expect(chef_run).to render_file('/opt/gitlab/sv/consul/log/config').with_content { |content| + expect(content).to match(%r{# label\nfilter}) + } + end + it_behaves_like 'enabled runit service', 'consul', 'foo', 'bar', 'foo', 'bar' end