Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
kube-prometheus
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
prometheus-operator
kube-prometheus
Commits
8c71e8c8
Commit
8c71e8c8
authored
4 years ago
by
Kemal Akkoyun
Browse files
Options
Downloads
Patches
Plain Diff
Remove ksonnet from kube-prometheus-thanos-sidecar.libsonnet
Signed-off-by:
Kemal Akkoyun
<
kakkoyun@gmail.com
>
parent
6d641706
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
jsonnet/kube-prometheus/kube-prometheus-thanos-sidecar.libsonnet
+20
-19
20 additions, 19 deletions
.../kube-prometheus/kube-prometheus-thanos-sidecar.libsonnet
with
20 additions
and
19 deletions
jsonnet/kube-prometheus/kube-prometheus-thanos-sidecar.libsonnet
+
20
−
19
View file @
8c71e8c8
local
k
=
import
'github.com/ksonnet/ksonnet-lib/ksonnet.beta.4/k.libsonnet'
;
local
service
=
k
.
core
.
v1
.
service
;
local
servicePort
=
k
.
core
.
v1
.
service
.
mixin
.
spec
.
portsType
;
{
{
_config
+::
{
_config
+::
{
versions
+::
{
versions
+::
{
thanos
:
'v0.14.0'
},
thanos
:
'v0.14.0'
,
imageRepos
+::
{
thanos
:
'quay.io/thanos/thanos'
},
},
imageRepos
+::
{
thanos
:
'quay.io/thanos/thanos'
,
},
thanos
+::
{
thanos
+::
{
objectStorageConfig
:
{
objectStorageConfig
:
{
key
:
'thanos.yaml'
,
// How the file inside the secret is called
key
:
'thanos.yaml'
,
// How the file inside the secret is called
...
@@ -22,19 +14,28 @@ local servicePort = k.core.v1.service.mixin.spec.portsType;
...
@@ -22,19 +14,28 @@ local servicePort = k.core.v1.service.mixin.spec.portsType;
service
+:
{
service
+:
{
spec
+:
{
spec
+:
{
ports
+:
[
ports
+:
[
servicePort
.
newN
ame
d
(
'grpc'
,
10901
,
10901
)
,
{
n
ame
:
'grpc'
,
port
:
10901
,
targetPort
:
10901
}
,
],
],
},
},
},
},
// Create a new service that exposes both sidecar's HTTP metrics port and gRPC StoreAPI
// Create a new service that exposes both sidecar's HTTP metrics port and gRPC StoreAPI
serviceThanosSidecar
:
serviceThanosSidecar
:
{
local
thanosGrpcSidecarPort
=
servicePort
.
newNamed
(
'grpc'
,
10901
,
10901
);
apiVersion
:
'v1'
,
local
thanosHttpSidecarPort
=
servicePort
.
newNamed
(
'http'
,
10902
,
10902
);
kind
:
'Service'
,
service
.
new
(
'prometheus-'
+
$
.
_config
.
prometheus
.
name
+
'-thanos-sidecar'
,
{
app
:
'prometheus'
,
prometheus
:
$
.
_config
.
prometheus
.
name
})
+
metadata
:
{
service
.
mixin
.
spec
.
withPorts
([
thanosGrpcSidecarPort
,
thanosHttpSidecarPort
])
+
name
:
'prometheus-'
+
$
.
_config
.
prometheus
.
name
+
'-thanos-sidecar'
,
service
.
mixin
.
spec
.
withClusterIp
(
'None'
)
+
namespace
:
$
.
_config
.
namespace
,
service
.
mixin
.
metadata
.
withLabels
({
'prometheus'
:
$
.
_config
.
prometheus
.
name
,
'app'
:
'thanos-sidecar'
})
+
labels
:
{
prometheus
:
$
.
_config
.
prometheus
.
name
,
app
:
'thanos-sidecar'
},
service
.
mixin
.
metadata
.
withNamespace
(
$
.
_config
.
namespace
),
},
spec
:
{
ports
:
[
{
name
:
'grpc'
,
port
:
10901
,
targetPort
:
10901
},
{
name
:
'http'
,
port
:
10902
,
targetPort
:
10902
},
],
selector
:
{
app
:
'prometheus'
,
prometheus
:
$
.
_config
.
prometheus
.
name
},
clusterIP
:
'None'
,
},
},
prometheus
+:
{
prometheus
+:
{
spec
+:
{
spec
+:
{
thanos
+:
{
thanos
+:
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment