Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xavier Thompson
slapos
Commits
8cafb994
Commit
8cafb994
authored
Jun 11, 2021
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
caddy-frontend: Separate each server name
parent
84dbfeae
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
10 deletions
+10
-10
software/caddy-frontend/buildout.hash.cfg
software/caddy-frontend/buildout.hash.cfg
+1
-1
software/caddy-frontend/templates/backend-haproxy.cfg.in
software/caddy-frontend/templates/backend-haproxy.cfg.in
+2
-2
software/caddy-frontend/test/test.py
software/caddy-frontend/test/test.py
+7
-7
No files found.
software/caddy-frontend/buildout.hash.cfg
View file @
8cafb994
...
...
@@ -50,7 +50,7 @@ md5sum = 13cd08d630cc51666a9f7e469fb6ea52
[template-backend-haproxy-configuration]
_update_hash_filename_ = templates/backend-haproxy.cfg.in
md5sum =
17f9582671327d8e4321a7fd1cdcb0fe
md5sum =
5e126be0f74d8ae390a5594e1e912a59
[template-empty]
_update_hash_filename_ = templates/empty.in
...
...
software/caddy-frontend/templates/backend-haproxy.cfg.in
View file @
8cafb994
...
...
@@ -120,7 +120,7 @@ backend {{ slave_instance['slave_reference'] }}-{{ scheme }}
{%- endif %}
{%- do active_check_option_list.append('timeout check %ss' % (slave_instance['health-check-timeout'])) %}
{%- endif %}
server {{ slave_instance['slave_reference'] }}-backend {{ hostname }}:{{ port }} {{ ' '.join(ssl_list) }} {{ ' ' + ' '.join(active_check_list)}}
server {{ slave_instance['slave_reference'] }}-backend
-{{ scheme }}
{{ hostname }}:{{ port }} {{ ' '.join(ssl_list) }} {{ ' ' + ' '.join(active_check_list)}}
{%- for active_check_option in active_check_option_list %}
{{ active_check_option }}
{%- endfor %}
...
...
@@ -162,7 +162,7 @@ backend {{ slave_instance['slave_reference'] }}-{{ scheme }}-failover
timeout server {{ slave_instance['request-timeout'] }}s
timeout connect {{ slave_instance['backend-connect-timeout'] }}s
retries {{ slave_instance['backend-connect-retries'] }}
server {{ slave_instance['slave_reference'] }}-backend {{ hostname }}:{{ port }} {{ ' '.join(ssl_list) }}
server {{ slave_instance['slave_reference'] }}-backend
-{{ scheme }}
{{ hostname }}:{{ port }} {{ ' '.join(ssl_list) }}
{%- if path %}
http-request set-path {{ path }}%[path]
{%- endif %}
...
...
software/caddy-frontend/test/test.py
View file @
8cafb994
...
...
@@ -1913,7 +1913,7 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin):
'
_Url_backend_log
',
r'
^
\
d
{
1
,
3
}
\
.
\
d
{
1
,
3
}
\
.
\
d
{
1
,
3
}
\
.
\
d
{
1
,
3
}:
\
d
+
'
r'
\
[
\
d
{
2
}
\
/
.{
3
}
\
/
\
d
{
4
}
\
:
\
d
{
2
}
\
:
\
d
{
2
}
\
:
\
d
{
2
}.
\
d
{
3
}
\
]
'
r'
http
-
backend
_Url
-
http
\
/
_Url
-
backend
'
r'
http
-
backend
_Url
-
http
\
/
_Url
-
backend
-
http
'
r'
\
d
+/
\
d
+
\
/
\
d
+
\
/
\
d
+
\
/
\
d
+
'
r'
200
\
d
+
-
-
----
'
r'
\
d
+
\
/
\
d
+
\
/
\
d
+
\
/
\
d
+
\
/
\
d
+
\
d
+
\
/
\
d
+
'
...
...
@@ -7236,13 +7236,13 @@ backend _health-check-disabled-http
timeout server 12s
timeout connect 5s
retries 3
server _health-check-disabled-backend %s"""
%
(
backend
,),
server _health-check-disabled-backend
-http
%s"""
%
(
backend
,),
'health-check-connect'
:
"""
\
backend _health-check-connect-http
timeout server 12s
timeout connect 5s
retries 3
server _health-check-connect-backend %s check inter 5s"""
server _health-check-connect-backend
-http
%s check inter 5s"""
""" rise 1 fall 2
timeout check 2s"""
%
(
backend
,),
'health-check-custom'
:
"""
\
...
...
@@ -7250,7 +7250,7 @@ backend _health-check-custom-http
timeout server 12s
timeout connect 5s
retries 3
server _health-check-custom-backend %s check inter 15s"""
server _health-check-custom-backend
-http
%s check inter 15s"""
""" rise 3 fall 7
option httpchk POST /POST-path%%20to%%20be%%20encoded HTTP/1.0
timeout check 7s"""
%
(
backend
,),
...
...
@@ -7259,7 +7259,7 @@ backend _health-check-default-http
timeout server 12s
timeout connect 5s
retries 3
server _health-check-default-backend %s check inter 5s"""
server _health-check-default-backend
-http
%s check inter 5s"""
""" rise 1 fall 2
option httpchk GET / HTTP/1.1
timeout check 2s"""
%
(
backend
,
)
...
...
@@ -7334,7 +7334,7 @@ backend _health-check-default-http
r'^\
d{
1,3}\
.
\d{1,3}\
.
\d{1,3}\
.
\d{1,3}:\
d+
'
r'
\
[
\
d
{
2
}
\
/
.{
3
}
\
/
\
d
{
4
}
\
:
\
d
{
2
}
\
:
\
d
{
2
}
\
:
\
d
{
2
}.
\
d
{
3
}
\
]
'
r'
https
-
backend
_health
-
check
-
failover
-
url
-
https
-
failover
'
r'
\
/
_health
-
check
-
failover
-
url
-
backend
'
r'
\
/
_health
-
check
-
failover
-
url
-
backend
-
https
'
r'
\
d
+/
\
d
+
\
/
\
d
+
\
/
\
d
+
\
/
\
d
+
'
r'
200
\
d
+
-
-
----
'
r'
\
d
+
\
/
\
d
+
\
/
\
d
+
\
/
\
d
+
\
/
\
d
+
\
d
+
\
/
\
d
+
'
...
...
@@ -7349,7 +7349,7 @@ backend _health-check-default-http
r'
^
\
d
{
1
,
3
}
\
.
\
d
{
1
,
3
}
\
.
\
d
{
1
,
3
}
\
.
\
d
{
1
,
3
}:
\
d
+
'
r'
\
[
\
d
{
2
}
\
/
.{
3
}
\
/
\
d
{
4
}
\
:
\
d
{
2
}
\
:
\
d
{
2
}
\
:
\
d
{
2
}.
\
d
{
3
}
\
]
'
r'
http
-
backend
_health
-
check
-
failover
-
url
-
http
-
failover
'
r'
\
/
_health
-
check
-
failover
-
url
-
backend
'
r'
\
/
_health
-
check
-
failover
-
url
-
backend
-
http
'
r'
\
d
+/
\
d
+
\
/
\
d
+
\
/
\
d
+
\
/
\
d
+
'
r'
200
\
d
+
-
-
----
'
r'
\
d
+
\
/
\
d
+
\
/
\
d
+
\
/
\
d
+
\
/
\
d
+
\
d
+
\
/
\
d
+
'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment