files/gitlab-cookbooks/gitlab/templates/default/resque.yml.erb (45 lines of code) (raw):
production:
<%- if @redis_extra_config_command -%>
config_command: "<%= @redis_extra_config_command %>"
<%- end -%>
<% if !@redis_enable_client %>
id:
<% end %>
<% if @redis_connect_timeout %>
connect_timeout: <%= @redis_connect_timeout %>
<% end %>
<% if @redis_read_timeout %>
read_timeout: <%= @redis_read_timeout %>
<% end %>
<% if @redis_write_timeout %>
write_timeout: <%= @redis_write_timeout %>
<% end %>
<% if defined?(@cluster_nodes) && !@cluster_nodes.empty? %>
<%- if @cluster_username %>username: <%= @cluster_username %><% end %>
<%- if @cluster_password %>password: <%= @cluster_password %><% end %>
cluster:
<% @cluster_nodes.each do |node| %>
-
host: <%= node['host'] %>
port: <%= node['port'] %>
<% end %>
<% else %>
url: <%= @redis_url %>
secret_file: <%= @redis_encrypted_settings_file %>
<%- if @redis_ssl %>
ssl_params:
<%- if @redis_tls_ca_cert_dir %>ca_path: "<%= @redis_tls_ca_cert_dir %>"<% end %>
<%- if @redis_tls_ca_cert_file %>ca_file: "<%= @redis_tls_ca_cert_file %>"<% end %>
<%- if @redis_tls_client_cert_file %>cert_file: "<%= @redis_tls_client_cert_file %>"<% end %>
<%- if @redis_tls_client_key_file %>key_file: "<%= @redis_tls_client_key_file %>"<% end %>
<% end %>
<% unless @redis_sentinels.empty? %>
sentinels:
<% @redis_sentinels.each do |sentinel| %>
-
host: <%= sentinel['host'] %>
port: <%= sentinel['port'] %>
<%- if @redis_sentinels_password %>password: "<%= @redis_sentinels_password %>"<% end %>
<% end %>
<% end %>
<% end %>