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
fdc5a532
Commit
fdc5a532
authored
Jan 16, 2018
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'upstream/master' into ce-to-ee-2018-01-16
parents
dd58b194
78ca7d97
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
157 additions
and
170 deletions
+157
-170
app/helpers/blob_helper.rb
app/helpers/blob_helper.rb
+2
-0
app/models/repository.rb
app/models/repository.rb
+1
-1
app/views/dashboard/_activity_head.html.haml
app/views/dashboard/_activity_head.html.haml
+2
-2
app/views/dashboard/_snippets_head.html.haml
app/views/dashboard/_snippets_head.html.haml
+2
-2
app/views/profiles/gpg_keys/index.html.haml
app/views/profiles/gpg_keys/index.html.haml
+2
-2
app/views/projects/buttons/_dropdown.html.haml
app/views/projects/buttons/_dropdown.html.haml
+8
-18
app/views/projects/forks/index.html.haml
app/views/projects/forks/index.html.haml
+2
-2
app/views/shared/projects/_project.html.haml
app/views/shared/projects/_project.html.haml
+1
-1
changelogs/unreleased/41666-cannot-search-with-keyword-merge-2.yml
...s/unreleased/41666-cannot-search-with-keyword-merge-2.yml
+5
-0
changelogs/unreleased/41666-cannot-search-with-keyword-merge.yml
...ogs/unreleased/41666-cannot-search-with-keyword-merge.yml
+6
-0
changelogs/unreleased/42046-fork-icon.yml
changelogs/unreleased/42046-fork-icon.yml
+5
-0
doc/development/doc_styleguide.md
doc/development/doc_styleguide.md
+1
-1
lib/gitlab/project_search_results.rb
lib/gitlab/project_search_results.rb
+4
-9
spec/helpers/blob_helper_spec.rb
spec/helpers/blob_helper_spec.rb
+7
-0
spec/lib/gitlab/project_search_results_spec.rb
spec/lib/gitlab/project_search_results_spec.rb
+27
-12
spec/models/repository_spec.rb
spec/models/repository_spec.rb
+1
-1
vendor/prometheus/values.yaml
vendor/prometheus/values.yaml
+81
-119
No files found.
app/helpers/blob_helper.rb
View file @
fdc5a532
module
BlobHelper
def
highlight
(
blob_name
,
blob_content
,
repository:
nil
,
plain:
false
)
plain
||=
blob_content
.
length
>
Blob
::
MAXIMUM_TEXT_HIGHLIGHT_SIZE
highlighted
=
Gitlab
::
Highlight
.
highlight
(
blob_name
,
blob_content
,
plain:
plain
,
repository:
repository
)
raw
%(<pre class="code highlight"><code>#{highlighted}</code></pre>)
end
...
...
app/models/repository.rb
View file @
fdc5a532
...
...
@@ -981,7 +981,7 @@ class Repository
return
[]
if
empty?
||
query
.
blank?
offset
=
2
args
=
%W(grep -i -I -n --before-context
#{
offset
}
--after-context
#{
offset
}
-E -e
#{
Regexp
.
escape
(
query
)
}
#{
ref
||
root_ref
}
)
args
=
%W(grep -i -I -n -
z -
-before-context
#{
offset
}
--after-context
#{
offset
}
-E -e
#{
Regexp
.
escape
(
query
)
}
#{
ref
||
root_ref
}
)
run_git
(
args
).
first
.
scrub
.
split
(
/^--$/
)
end
...
...
app/views/dashboard/_activity_head.html.haml
View file @
fdc5a532
...
...
@@ -2,7 +2,7 @@
%ul
.nav-links
%li
{
class:
active_when
(
params
[
:filter
].
nil?
)
}
>
=
link_to
activity_dashboard_path
,
class:
'shortcuts-activity'
,
data:
{
placement:
'right'
}
do
Your
P
rojects
Your
p
rojects
%li
{
class:
active_when
(
params
[
:filter
]
==
'starred'
)
}
>
=
link_to
activity_dashboard_path
(
filter:
'starred'
),
data:
{
placement:
'right'
}
do
Starred
P
rojects
Starred
p
rojects
app/views/dashboard/_snippets_head.html.haml
View file @
fdc5a532
...
...
@@ -2,10 +2,10 @@
%ul
.nav-links
=
nav_link
(
page:
dashboard_snippets_path
,
html_options:
{
class:
'home'
})
do
=
link_to
dashboard_snippets_path
,
title:
'Your snippets'
,
data:
{
placement:
'right'
}
do
Your
S
nippets
Your
s
nippets
=
nav_link
(
page:
explore_snippets_path
)
do
=
link_to
explore_snippets_path
,
title:
'Explore snippets'
,
data:
{
placement:
'right'
}
do
Explore
S
nippets
Explore
s
nippets
-
if
current_user
.nav-controls.hidden-xs
...
...
app/views/profiles/gpg_keys/index.html.haml
View file @
fdc5a532
...
...
@@ -3,12 +3,12 @@
=
render
'profiles/head'
.row.prepend-top-default
.col-lg-
3
.profile-settings-sidebar
.col-lg-
4
.profile-settings-sidebar
%h4
.prepend-top-0
=
page_title
%p
GPG keys allow you to verify signed commits.
.col-lg-
9
.col-lg-
8
%h5
.prepend-top-0
Add a GPG key
%p
.profile-settings-content
...
...
app/views/projects/buttons/_dropdown.html.haml
View file @
fdc5a532
...
...
@@ -10,37 +10,28 @@
-
if
can_create_issue
%li
=
link_to
new_project_issue_path
(
@project
)
do
#{
_
(
'New issue'
)
}
=
link_to
_
(
'New issue'
),
new_project_issue_path
(
@project
)
-
if
merge_project
%li
=
link_to
project_new_merge_request_path
(
merge_project
)
do
#{
_
(
'New merge request'
)
}
=
link_to
_
(
'New merge request'
),
project_new_merge_request_path
(
merge_project
)
-
if
can_create_snippet
%li
=
link_to
new_project_snippet_path
(
@project
)
do
#{
_
(
'New snippet'
)
}
=
link_to
_
(
'New snippet'
),
new_project_snippet_path
(
@project
)
-
if
can_create_issue
||
merge_project
||
can_create_snippet
%li
.divider
-
if
can?
(
current_user
,
:push_code
,
@project
)
%li
=
link_to
project_new_blob_path
(
@project
,
@project
.
default_branch
||
'master'
)
do
#{
_
(
'New file'
)
}
=
link_to
_
(
'New file'
),
project_new_blob_path
(
@project
,
@project
.
default_branch
||
'master'
)
-
unless
@project
.
empty_repo?
%li
=
link_to
new_project_branch_path
(
@project
)
do
#{
_
(
'New branch'
)
}
=
link_to
_
(
'New branch'
),
new_project_branch_path
(
@project
)
%li
=
link_to
new_project_tag_path
(
@project
)
do
#{
_
(
'New tag'
)
}
=
link_to
_
(
'New tag'
),
new_project_tag_path
(
@project
)
-
elsif
current_user
&&
current_user
.
already_forked?
(
@project
)
%li
=
link_to
project_new_blob_path
(
@project
,
@project
.
default_branch
||
'master'
)
do
#{
_
(
'New file'
)
}
=
link_to
_
(
'New file'
),
project_new_blob_path
(
@project
,
@project
.
default_branch
||
'master'
)
-
elsif
can?
(
current_user
,
:fork_project
,
@project
)
%li
-
continue_params
=
{
to:
project_new_blob_path
(
@project
,
@project
.
default_branch
||
'master'
),
...
...
@@ -48,5 +39,4 @@
notice_now:
edit_in_new_fork_notice_now
}
-
fork_path
=
project_forks_path
(
@project
,
namespace_key:
current_user
.
namespace
.
id
,
continue:
continue_params
)
=
link_to
fork_path
,
method: :post
do
#{
_
(
'New file'
)
}
=
link_to
_
(
'New file'
),
fork_path
,
method: :post
app/views/projects/forks/index.html.haml
View file @
fdc5a532
...
...
@@ -31,11 +31,11 @@
-
if
current_user
&&
can?
(
current_user
,
:fork_project
,
@project
)
-
if
current_user
.
already_forked?
(
@project
)
&&
current_user
.
manageable_namespaces
.
size
<
2
=
link_to
namespace_project_path
(
current_user
,
current_user
.
fork_of
(
@project
)),
title:
'Go to your fork'
,
class:
'btn btn-new'
do
=
custom_icon
(
'icon_fork'
)
=
sprite_icon
(
'fork'
,
size:
12
)
%span
Fork
-
else
=
link_to
new_project_fork_path
(
@project
),
title:
"Fork project"
,
class:
'btn btn-new'
do
=
custom_icon
(
'icon_fork'
)
=
sprite_icon
(
'fork'
,
size:
12
)
%span
Fork
...
...
app/views/shared/projects/_project.html.haml
View file @
fdc5a532
...
...
@@ -52,7 +52,7 @@
=
render_project_pipeline_status
(
project
.
pipeline_status
)
-
if
forks
%span
.prepend-left-10
=
sprite_icon
(
'fork'
)
=
sprite_icon
(
'fork'
,
size:
12
)
=
number_with_delimiter
(
project
.
forks_count
)
-
if
stars
%span
.prepend-left-10
...
...
changelogs/unreleased/41666-cannot-search-with-keyword-merge-2.yml
0 → 100644
View file @
fdc5a532
---
title
:
Only highlight search results under the highlighting size limit
merge_request
:
16462
author
:
type
:
performance
changelogs/unreleased/41666-cannot-search-with-keyword-merge.yml
0 → 100644
View file @
fdc5a532
---
title
:
Fix file search results when they match file contents with a number between
two colons
merge_request
:
16462
author
:
type
:
fixed
changelogs/unreleased/42046-fork-icon.yml
0 → 100644
View file @
fdc5a532
---
title
:
Fix giant fork icons on forks page
merge_request
:
16474
author
:
type
:
fixed
doc/development/doc_styleguide.md
View file @
fdc5a532
...
...
@@ -201,7 +201,7 @@ You can combine one or more of the following:
-
Keep all file names in lower case.
-
Consider using PNG images instead of JPEG.
-
Compress all images with
<https://tinypng.com/>
or similar tool.
-
Compress gifs with
<https://ezgif.com/optimize>
or similar to
l
l.
-
Compress gifs with
<https://ezgif.com/optimize>
or similar to
o
l.
-
Images should be used (only when necessary) to _illustrate_ the description
of a process, not to _replace_ it.
...
...
lib/gitlab/project_search_results.rb
View file @
fdc5a532
...
...
@@ -44,25 +44,20 @@ module Gitlab
ref
=
nil
filename
=
nil
basename
=
nil
data
=
""
startline
=
0
result
.
each_line
.
each_with_index
do
|
line
,
index
|
matches
=
line
.
match
(
/^(?<ref>[^:]*):(?<filename>.*):(?<startline>\d+):/
)
if
matches
result
.
strip
.
each_line
.
each_with_index
do
|
line
,
index
|
prefix
||=
line
.
match
(
/^(?<ref>[^:]*):(?<filename>.*)\x00(?<startline>\d+)\x00/
)
&
.
tap
do
|
matches
|
ref
=
matches
[
:ref
]
filename
=
matches
[
:filename
]
startline
=
matches
[
:startline
]
startline
=
startline
.
to_i
-
index
extname
=
Regexp
.
escape
(
File
.
extname
(
filename
))
basename
=
filename
.
sub
(
/
#{
extname
}
$/
,
''
)
break
end
end
data
=
""
result
.
each_line
do
|
line
|
data
<<
line
.
sub
(
ref
,
''
).
sub
(
filename
,
''
).
sub
(
/^:-\d+-/
,
''
).
sub
(
/^::\d+:/
,
''
)
data
<<
line
.
sub
(
prefix
.
to_s
,
''
)
end
FoundBlob
.
new
(
...
...
spec/helpers/blob_helper_spec.rb
View file @
fdc5a532
...
...
@@ -22,6 +22,13 @@ describe BlobHelper do
expect
(
result
).
to
eq
(
%[<pre class="code highlight"><code><span id="LC1" class="line" lang="">:type "assem"))</span></code></pre>]
)
end
it
'returns plaintext for long blobs'
do
stub_const
(
'Blob::MAXIMUM_TEXT_HIGHLIGHT_SIZE'
,
1
)
result
=
helper
.
highlight
(
blob_name
,
blob_content
)
expect
(
result
).
to
eq
(
%[<pre class="code highlight"><code><span id="LC1" class="line" lang="">(make-pathname :defaults name</span>\n<span id="LC2" class="line" lang="">:type "assem"))</span></code></pre>]
)
end
it
'highlights single block'
do
expected
=
%Q[<pre class="code highlight"><code><span id="LC1" class="line" lang="common_lisp"><span class="p">(</span><span class="nb">make-pathname</span> <span class="ss">:defaults</span> <span class="nv">name</span></span>
<span id="LC2" class="line" lang="common_lisp"><span class="ss">:type</span> <span class="s">"assem"</span><span class="p">))</span></span></code></pre>]
...
...
spec/lib/gitlab/project_search_results_spec.rb
View file @
fdc5a532
...
...
@@ -70,15 +70,6 @@ describe Gitlab::ProjectSearchResults do
subject
{
described_class
.
parse_search_result
(
search_result
)
}
it
'can correctly parse filenames including ":"'
do
special_char_result
=
"
\n
master:testdata/project::function1.yaml-1----
\n
master:testdata/project::function1.yaml:2:test: data1
\n
"
blob
=
described_class
.
parse_search_result
(
special_char_result
)
expect
(
blob
.
ref
).
to
eq
(
'master'
)
expect
(
blob
.
filename
).
to
eq
(
'testdata/project::function1.yaml'
)
end
it
"returns a valid FoundBlob"
do
is_expected
.
to
be_an
Gitlab
::
SearchResults
::
FoundBlob
expect
(
subject
.
id
).
to
be_nil
...
...
@@ -90,8 +81,32 @@ describe Gitlab::ProjectSearchResults do
expect
(
subject
.
data
.
lines
[
2
]).
to
eq
(
" - Feature: Replace teams with group membership
\n
"
)
end
context
'when the matching filename contains a colon'
do
let
(
:search_result
)
{
"
\n
master:testdata/project::function1.yaml
\x00
1
\x00
---
\n
"
}
it
'returns a valid FoundBlob'
do
expect
(
subject
.
filename
).
to
eq
(
'testdata/project::function1.yaml'
)
expect
(
subject
.
basename
).
to
eq
(
'testdata/project::function1'
)
expect
(
subject
.
ref
).
to
eq
(
'master'
)
expect
(
subject
.
startline
).
to
eq
(
1
)
expect
(
subject
.
data
).
to
eq
(
'---'
)
end
end
context
'when the matching content contains a number surrounded by colons'
do
let
(
:search_result
)
{
"
\n
master:testdata/foo.txt
\x00
1
\x00
blah:9:blah"
}
it
'returns a valid FoundBlob'
do
expect
(
subject
.
filename
).
to
eq
(
'testdata/foo.txt'
)
expect
(
subject
.
basename
).
to
eq
(
'testdata/foo'
)
expect
(
subject
.
ref
).
to
eq
(
'master'
)
expect
(
subject
.
startline
).
to
eq
(
1
)
expect
(
subject
.
data
).
to
eq
(
'blah:9:blah'
)
end
end
context
"when filename has extension"
do
let
(
:search_result
)
{
"master:CONTRIBUTE.md
:5:
- [Contribute to GitLab](#contribute-to-gitlab)
\n
"
}
let
(
:search_result
)
{
"master:CONTRIBUTE.md
\x00
5
\x00
- [Contribute to GitLab](#contribute-to-gitlab)
\n
"
}
it
{
expect
(
subject
.
path
).
to
eq
(
'CONTRIBUTE.md'
)
}
it
{
expect
(
subject
.
filename
).
to
eq
(
'CONTRIBUTE.md'
)
}
...
...
@@ -99,7 +114,7 @@ describe Gitlab::ProjectSearchResults do
end
context
"when file under directory"
do
let
(
:search_result
)
{
"master:a/b/c.md
:5:
a b c
\n
"
}
let
(
:search_result
)
{
"master:a/b/c.md
\x00
5
\x00
a b c
\n
"
}
it
{
expect
(
subject
.
path
).
to
eq
(
'a/b/c.md'
)
}
it
{
expect
(
subject
.
filename
).
to
eq
(
'a/b/c.md'
)
}
...
...
@@ -144,7 +159,7 @@ describe Gitlab::ProjectSearchResults do
end
it
'finds by content'
do
expect
(
results
).
to
include
(
"master:Title.md
:1:
Content
\n
"
)
expect
(
results
).
to
include
(
"master:Title.md
\x00
1
\x00
Content
\n
"
)
end
end
...
...
spec/models/repository_spec.rb
View file @
fdc5a532
...
...
@@ -657,7 +657,7 @@ describe Repository do
subject
{
results
.
first
}
it
{
is_expected
.
to
be_an
String
}
it
{
expect
(
subject
.
lines
[
2
]).
to
eq
(
"master:CHANGELOG
:190:
- Feature: Replace teams with group membership
\n
"
)
}
it
{
expect
(
subject
.
lines
[
2
]).
to
eq
(
"master:CHANGELOG
\x00
190
\x00
- Feature: Replace teams with group membership
\n
"
)
}
end
end
...
...
vendor/prometheus/values.yaml
View file @
fdc5a532
...
...
@@ -18,138 +18,100 @@ serverFiles:
rule_files:
- /etc/config/rules
- /etc/config/alerts
scrape_configs:
- job_name: prometheus
static_configs:
- targets:
- localhost:9090
- job_name: 'kubernetes-apiservers'
kubernetes_sd_configs:
- role: endpoints
- job_name: kubernetes-cadvisor
scheme: https
tls_config:
ca_file:
/var/run/secrets/kubernetes.io/serviceaccount/ca.crt
ca_file:
"/var/run/secrets/kubernetes.io/serviceaccount/ca.crt"
insecure_skip_verify: true
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
bearer_token_file: "/var/run/secrets/kubernetes.io/serviceaccount/token"
kubernetes_sd_configs:
- role: node
api_server: https://kubernetes.default.svc:443
tls_config:
ca_file: "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt"
bearer_token_file: "/var/run/secrets/kubernetes.io/serviceaccount/token"
relabel_configs:
- source_labels: [__meta_kubernetes_namespace, __meta_kubernetes_service_name, __meta_kubernetes_endpoint_port_name]
action: keep
regex: default;kubernetes;https
- job_name: 'kubernetes-nodes'
- action: labelmap
regex: __meta_kubernetes_node_label_(.+)
- target_label: __address__
replacement: kubernetes.default.svc:443
- source_labels:
- __meta_kubernetes_node_name
regex: "(.+)"
target_label: __metrics_path__
replacement: "/api/v1/nodes/${1}/proxy/metrics/cadvisor"
metric_relabel_configs:
- source_labels:
- pod_name
target_label: environment
regex: "(.+)-.+-.+"
- job_name: kubernetes-nodes
scheme: https
tls_config:
ca_file:
/var/run/secrets/kubernetes.io/serviceaccount/ca.crt
ca_file:
"/var/run/secrets/kubernetes.io/serviceaccount/ca.crt"
insecure_skip_verify: true
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
bearer_token_file: "/var/run/secrets/kubernetes.io/serviceaccount/token"
kubernetes_sd_configs:
- role: node
- role: node
api_server: https://kubernetes.default.svc:443
tls_config:
ca_file: "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt"
bearer_token_file: "/var/run/secrets/kubernetes.io/serviceaccount/token"
relabel_configs:
- action: labelmap
regex: __meta_kubernetes_node_label_(.+)
- target_label: __address__
replacement: kubernetes.default.svc:443
- source_labels: [__meta_kubernetes_node_name]
regex: (.+)
target_label: __metrics_path__
replacement: /api/v1/nodes/${1}/proxy/metrics
- job_name: 'kubernetes-service-endpoints'
kubernetes_sd_configs:
- role: endpoints
relabel_configs:
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scrape]
action: keep
regex: true
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scheme]
action: replace
target_label: __scheme__
regex: (https?)
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_path]
action: replace
target_label: __metrics_path__
regex: (.+)
- source_labels: [__address__, __meta_kubernetes_service_annotation_prometheus_io_port]
action: replace
target_label: __address__
regex: (.+)(?::\d+);(\d+)
replacement: $1:$2
- action: labelmap
regex: __meta_kubernetes_service_label_(.+)
- source_labels: [__meta_kubernetes_namespace]
action: replace
target_label: kubernetes_namespace
- source_labels: [__meta_kubernetes_service_name]
action: replace
target_label: kubernetes_name
- job_name: 'prometheus-pushgateway'
honor_labels: true
kubernetes_sd_configs:
- role: service
relabel_configs:
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_probe]
action: keep
regex: pushgateway
- job_name: 'kubernetes-services'
metrics_path: /probe
params:
module: [http_2xx]
kubernetes_sd_configs:
- role: service
relabel_configs:
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_probe]
action: keep
regex: true
- source_labels: [__address__]
target_label: __param_target
- target_label: __address__
replacement: blackbox
- source_labels: [__param_target]
target_label: instance
- action: labelmap
regex: __meta_kubernetes_service_label_(.+)
- source_labels: [__meta_kubernetes_namespace]
target_label: kubernetes_namespace
- source_labels: [__meta_kubernetes_service_name]
target_label: kubernetes_name
- job_name: 'kubernetes-pods'
- action: labelmap
regex: __meta_kubernetes_node_label_(.+)
- target_label: __address__
replacement: kubernetes.default.svc:443
- source_labels:
- __meta_kubernetes_node_name
regex: "(.+)"
target_label: __metrics_path__
replacement: "/api/v1/nodes/${1}/proxy/metrics"
metric_relabel_configs:
- source_labels:
- pod_name
target_label: environment
regex: "(.+)-.+-.+"
- job_name: kubernetes-pods
tls_config:
ca_file: "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt"
insecure_skip_verify: true
bearer_token_file: "/var/run/secrets/kubernetes.io/serviceaccount/token"
kubernetes_sd_configs:
- role: pod
- role: pod
api_server: https://kubernetes.default.svc:443
tls_config:
ca_file: "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt"
bearer_token_file: "/var/run/secrets/kubernetes.io/serviceaccount/token"
relabel_configs:
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape]
action: keep
regex: true
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_path]
action: replace
target_label: __metrics_path__
regex: (.+)
- source_labels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port]
action: replace
regex: (.+):(?:\d+);(\d+)
replacement: ${1}:${2}
target_label: __address__
- action: labelmap
regex: __meta_kubernetes_pod_label_(.+)
- source_labels: [__meta_kubernetes_namespace]
action: replace
target_label: kubernetes_namespace
- source_labels: [__meta_kubernetes_pod_name]
action: replace
target_label: kubernetes_pod_name
- source_labels:
- __meta_kubernetes_pod_annotation_prometheus_io_scrape
action: keep
regex: 'true'
- source_labels:
- __meta_kubernetes_pod_annotation_prometheus_io_path
action: replace
target_label: __metrics_path__
regex: "(.+)"
- source_labels:
- __address__
- __meta_kubernetes_pod_annotation_prometheus_io_port
action: replace
regex: "([^:]+)(?::[0-9]+)?;([0-9]+)"
replacement: "$1:$2"
target_label: __address__
- action: labelmap
regex: __meta_kubernetes_pod_label_(.+)
- source_labels:
- __meta_kubernetes_namespace
action: replace
target_label: kubernetes_namespace
- source_labels:
- __meta_kubernetes_pod_name
action: replace
target_label: kubernetes_pod_name
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