mirror of
https://github.com/prometheus-operator/kube-prometheus.git
synced 2025-08-27 01:11:53 +02:00
Merge pull request #766 from kakkoyun/ksonnet_no_more_9
Remove ksonnet from kube-prometheus-thanos-sidecar.libsonnet
This commit is contained in:
commit
01b396efc5
@ -1,15 +1,7 @@
|
|||||||
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;
|
|||||||
service+: {
|
service+: {
|
||||||
spec+: {
|
spec+: {
|
||||||
ports+: [
|
ports+: [
|
||||||
servicePort.newNamed('grpc', 10901, 10901),
|
{ name: '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+: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user