Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
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
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
e8e53f28
Commit
e8e53f28
authored
Apr 16, 2020
by
Alan (Maciej) Paruszewski
Committed by
Jarka Košanová
Apr 16, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Switch from startupProbe to livenessProbe in Modsecurity
parent
b46bfa0c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
5 deletions
+12
-5
app/models/clusters/applications/ingress.rb
app/models/clusters/applications/ingress.rb
+6
-5
spec/models/clusters/applications/ingress_spec.rb
spec/models/clusters/applications/ingress_spec.rb
+6
-0
No files found.
app/models/clusters/applications/ingress.rb
View file @
e8e53f28
...
@@ -30,7 +30,6 @@ module Clusters
...
@@ -30,7 +30,6 @@ module Clusters
enum
modsecurity_mode:
{
logging:
0
,
blocking:
1
}
enum
modsecurity_mode:
{
logging:
0
,
blocking:
1
}
FETCH_IP_ADDRESS_DELAY
=
30
.
seconds
FETCH_IP_ADDRESS_DELAY
=
30
.
seconds
MODSEC_SIDECAR_INITIAL_DELAY_SECONDS
=
10
state_machine
:status
do
state_machine
:status
do
after_transition
any
=>
[
:installed
]
do
|
application
|
after_transition
any
=>
[
:installed
]
do
|
application
|
...
@@ -108,11 +107,13 @@ module Clusters
...
@@ -108,11 +107,13 @@ module Clusters
"readOnly"
=>
true
"readOnly"
=>
true
}
}
],
],
"
startup
Probe"
=>
{
"
liveness
Probe"
=>
{
"exec"
=>
{
"exec"
=>
{
"command"
=>
[
"ls"
,
"/var/log/modsec"
]
"command"
=>
[
},
"ls"
,
"initialDelaySeconds"
=>
MODSEC_SIDECAR_INITIAL_DELAY_SECONDS
"/var/log/modsec/audit.log"
]
}
}
}
}
}
],
],
...
...
spec/models/clusters/applications/ingress_spec.rb
View file @
e8e53f28
...
@@ -219,6 +219,12 @@ describe Clusters::Applications::Ingress do
...
@@ -219,6 +219,12 @@ describe Clusters::Applications::Ingress do
expect
(
subject
.
values
).
to
include
(
'extraContainers'
)
expect
(
subject
.
values
).
to
include
(
'extraContainers'
)
end
end
it
'includes livenessProbe for modsecurity sidecar container'
do
probe_config
=
YAML
.
safe_load
(
subject
.
values
).
dig
(
'controller'
,
'extraContainers'
,
0
,
'livenessProbe'
)
expect
(
probe_config
).
to
eq
(
'exec'
=>
{
'command'
=>
[
'ls'
,
'/var/log/modsec/audit.log'
]
})
end
end
end
context
'when modsecurity_enabled is disabled'
do
context
'when modsecurity_enabled is disabled'
do
...
...
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