Remove Thanos components from kube-prometheus except sidecar

This commit is contained in:
Matthias Loibl
2019-07-10 16:35:11 +02:00
parent 50d90fba66
commit f1cd88fdbb
5 changed files with 42 additions and 185 deletions

View File

@@ -0,0 +1,39 @@
local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet';
local service = k.core.v1.service;
local servicePort = k.core.v1.service.mixin.spec.portsType;
{
_config+:: {
versions+:: {
thanos: 'v0.5.0',
},
imageRepos+:: {
thanos: 'improbable/thanos',
},
thanos+:: {
objectStorageConfig: {
key: 'thanos.yaml', // How the file inside the secret is called
name: 'thanos-objectstorage', // This is the name of your Kubernetes secret with the config
},
},
},
prometheus+:: {
// Add the grpc port to the Prometheus service to be able to query it with the Thanos Querier
service+: {
spec+: {
ports+: [
servicePort.newNamed('grpc', 10901, 10901),
],
},
},
prometheus+: {
spec+: {
thanos+: {
version: $._config.versions.thanos,
baseImage: $._config.imageRepos.thanos,
objectStorageConfig: $._config.thanos.objectStorageConfig,
},
},
},
},
}