Read about our upcoming Code of Conduct on this issue

Commit f8515227 authored by Ash McKenzie's avatar Ash McKenzie
Browse files

Merge branch 'generate-redis-sessions-config' into 'main'

Generate config files for sessions Redis

See merge request gitlab-org/gitlab-development-kit!2208
......@@ -171,6 +171,7 @@ clean-config:
gitlab/config/redis.shared_state.yml \
gitlab/config/redis.trace_chunks.yml \
gitlab/config/redis.rate_limiting.yml \
gitlab/config/redis.sessions.yml \
jaeger \
localhost.crt \
localhost.key \
......
......@@ -245,12 +245,14 @@ redis:
cache: 2
queues: 1
rate_limiting: 4
sessions: 5
shared_state: 0
trace_chunks: 3
test:
cache: 12
queues: 11
rate_limiting: 14
sessions: 15
shared_state: 10
trace_chunks: 13
dir: "/home/git/gdk/redis"
......
......@@ -25,6 +25,7 @@ module GDK
gitlab/config/redis.shared_state.yml
gitlab/config/redis.trace_chunks.yml
gitlab/config/redis.rate_limiting.yml
gitlab/config/redis.sessions.yml
nginx/conf/nginx.conf
openssh/sshd_config
prometheus/prometheus.yml
......
......@@ -709,6 +709,7 @@ module GDK
integer(:cache) { 2 }
integer(:trace_chunks) { 3 }
integer(:rate_limiting) { 4 }
integer(:sessions) { 5 }
end
settings(:test) do
......@@ -717,6 +718,7 @@ module GDK
integer(:cache) { 12 }
integer(:trace_chunks) { 13 }
integer(:rate_limiting) { 14 }
integer(:sessions) { 15 }
end
end
end
......
......@@ -112,6 +112,11 @@ file 'gitlab/config/redis.rate_limiting.yml' => ['support/templates/redis.yml.er
GDK::ErbRenderer.new(t.source, t.name, config: config, cluster: :rate_limiting).safe_render!
end
desc 'Generate the redis.sessions.yml config file'
file 'gitlab/config/redis.sessions.yml' => ['support/templates/redis.yml.erb', GDK::Config::FILE] do |t|
GDK::ErbRenderer.new(t.source, t.name, config: config, cluster: :sessions).safe_render!
end
desc 'Generate the database_geo.yml config file'
file 'gitlab/config/database_geo.yml' => ['support/templates/database_geo.yml.erb', GDK::Config::FILE] do |t|
GDK::ErbRenderer.new(t.source, t.name, config: config).safe_render!
......
......@@ -2129,6 +2129,12 @@ RSpec.describe GDK::Config do
expect(config.redis.databases.development.rate_limiting).to eq(4)
end
end
describe 'sessions' do
it 'is 5 by default' do
expect(config.redis.databases.development.sessions).to eq(5)
end
end
end
describe 'test' do
......@@ -2137,6 +2143,12 @@ RSpec.describe GDK::Config do
expect(config.redis.databases.test.rate_limiting).to eq(14)
end
end
describe 'sessions' do
it 'is 15 by default' do
expect(config.redis.databases.test.sessions).to eq(15)
end
end
end
end
end
......
......@@ -53,7 +53,8 @@ gitlab-config: \
gitlab/config/redis.queues.yml \
gitlab/config/redis.shared_state.yml \
gitlab/config/redis.trace_chunks.yml \
gitlab/config/redis.rate_limiting.yml \
gitlab/config/redis.rate_limiting.yml \
gitlab/config/redis.sessions.yml \
gitlab/public/uploads \
gitlab/config/puma.rb
......@@ -97,6 +98,10 @@ gitlab/config/redis.trace_chunks.yml:
gitlab/config/redis.rate_limiting.yml:
$(Q)rake $@
.PHONY: gitlab/config/redis.sessions.yml
gitlab/config/redis.sessions.yml:
$(Q)rake $@
gitlab/public/uploads:
$(Q)mkdir $@
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment