Skip to content

Commit eacda21

Browse files
Taka NishidaRobert Marshall
authored andcommitted
Support optional grpc log level config for KAS
Adds the gitlab_kas['grpc_log_level'] config option. Changelog: added
1 parent 90aff3e commit eacda21

File tree

4 files changed

+7
-1
lines changed

4 files changed

+7
-1
lines changed

files/gitlab-config-template/gitlab.rb.template

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2152,6 +2152,7 @@ external_url 'GENERATED_EXTERNAL_URL'
21522152

21532153
##! Log configuration for GitLab KAS
21542154
# gitlab_kas['log_level'] = 'info'
2155+
# gitlab_kas['grpc_log_level'] = 'error'
21552156

21562157
##! Environment variables for GitLab KAS
21572158
# gitlab_kas['env'] = {

files/gitlab-cookbooks/gitlab-kas/attributes/default.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
default['gitlab_kas']['sentry_dsn'] = nil
3535
default['gitlab_kas']['sentry_environment'] = nil
3636
default['gitlab_kas']['log_level'] = 'info'
37+
default['gitlab_kas']['grpc_log_level'] = 'error'
3738
default['gitlab_kas']['dir'] = '/var/opt/gitlab/gitlab-kas'
3839
default['gitlab_kas']['log_directory'] = '/var/log/gitlab/gitlab-kas'
3940
default['gitlab_kas']['env_directory'] = '/opt/gitlab/etc/gitlab-kas/env'

files/gitlab-cookbooks/gitlab-kas/templates/default/gitlab-kas-config.yml.erb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ observability:
4141
<%- end %>
4242
logging:
4343
level: <%= @log_level %>
44+
grpc_level: <%= @grpc_log_level %>
4445
redis:
4546
network: <%= @redis_network %>
4647
tls:

spec/chef/cookbooks/gitlab-kas/recipes/gitlab-kas_spec.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
},
7373
logging: {
7474
level: 'info',
75+
grpc_level: 'error'
7576
},
7677
usage_reporting_period: '60s'
7778
},
@@ -117,6 +118,7 @@
117118
sentry_dsn: 'https://my_key:[email protected]/test_project',
118119
sentry_environment: 'production',
119120
log_level: 'debug',
121+
grpc_log_level: 'debug',
120122
env: {
121123
'OWN_PRIVATE_API_HOST' => 'fake-host.example.com'
122124
}
@@ -144,7 +146,8 @@
144146
network: 'tcp'
145147
},
146148
logging: {
147-
level: 'debug'
149+
level: 'debug',
150+
grpc_level: 'debug'
148151
},
149152
usage_reporting_period: '120s',
150153
sentry: {

0 commit comments

Comments
 (0)