Updated to push to VM cluster as well as prom

Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
This commit is contained in:
Marcus Noble 2022-06-02 21:16:51 +01:00
parent f942f9e358
commit a9c8e36931
Signed by: AverageMarcus
GPG Key ID: B8F2DB8A7AEBAF78
4 changed files with 46 additions and 4 deletions

View File

@ -15,6 +15,7 @@ data:
"api.tasks.cluster.fun": "api.tasks.cluster.local", "api.tasks.cluster.fun": "api.tasks.cluster.local",
"mealie.cluster.fun": "mealie.cluster.local", "mealie.cluster.fun": "mealie.cluster.local",
"prometheus.auth-proxy.svc": "prometheus.cluster.local", "prometheus.auth-proxy.svc": "prometheus.cluster.local",
"vmcluster.auth-proxy.svc": "vmcluster.cluster.local",
"loki.auth-proxy.svc": "loki.cluster.local", "loki.auth-proxy.svc": "loki.cluster.local",
"loki.auth-proxy.svc:80": "loki.cluster.local" "loki.auth-proxy.svc:80": "loki.cluster.local"
} }
@ -142,6 +143,23 @@ spec:
app: internal-proxy app: internal-proxy
type: ClusterIP type: ClusterIP
--- ---
apiVersion: v1
kind: Service
metadata:
name: vmcluster
namespace: auth-proxy
labels:
app: internal-proxy
spec:
ports:
- name: http
port: 80
protocol: TCP
targetPort: 8080
selector:
app: internal-proxy
type: ClusterIP
---
apiVersion: apps/v1 apiVersion: apps/v1

View File

@ -115,11 +115,13 @@ data:
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: vmagent
namespace: monitoring
labels: labels:
app.kubernetes.io/name: victoria-metrics app.kubernetes.io/name: victoria-metrics
app.kubernetes.io/component: agent app.kubernetes.io/component: agent
name: vmagent annotations:
namespace: monitoring configmap.reloader.stakater.com/reload: "vmagent"
spec: spec:
strategy: strategy:
type: Recreate type: Recreate
@ -141,6 +143,7 @@ spec:
imagePullPolicy: "IfNotPresent" imagePullPolicy: "IfNotPresent"
args: args:
- -remoteWrite.url=http://prometheus.proxy-civo.svc/api/v1/write - -remoteWrite.url=http://prometheus.proxy-civo.svc/api/v1/write
- -remoteWrite.url=http://vmcluster.proxy-civo.svc/insert/0/prometheus/
- -remoteWrite.showURL - -remoteWrite.showURL
- -promscrape.config=/config/prometheus.yml - -promscrape.config=/config/prometheus.yml
volumeMounts: volumeMounts:

View File

@ -115,11 +115,13 @@ data:
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: vmagent
namespace: monitoring
labels: labels:
app.kubernetes.io/name: victoria-metrics app.kubernetes.io/name: victoria-metrics
app.kubernetes.io/component: agent app.kubernetes.io/component: agent
name: vmagent annotations:
namespace: monitoring configmap.reloader.stakater.com/reload: "vmagent"
spec: spec:
strategy: strategy:
type: Recreate type: Recreate
@ -141,6 +143,7 @@ spec:
imagePullPolicy: "IfNotPresent" imagePullPolicy: "IfNotPresent"
args: args:
- -remoteWrite.url=http://prometheus.auth-proxy.svc/api/v1/write - -remoteWrite.url=http://prometheus.auth-proxy.svc/api/v1/write
- -remoteWrite.url=http://vmcluster.auth-proxy.svc/insert/0/prometheus/
- -remoteWrite.showURL - -remoteWrite.showURL
- -promscrape.config=/config/prometheus.yml - -promscrape.config=/config/prometheus.yml
volumeMounts: volumeMounts:

View File

@ -19,6 +19,7 @@ data:
mapping.json: | mapping.json: |
{ {
"prometheus.proxy-civo.svc": "prometheus.cluster.local", "prometheus.proxy-civo.svc": "prometheus.cluster.local",
"vmcluster.proxy-civo.svc": "vmcluster.cluster.local",
"loki.proxy-civo.svc": "loki.cluster.local", "loki.proxy-civo.svc": "loki.cluster.local",
"loki.proxy-civo.svc:80": "loki.cluster.local" "loki.proxy-civo.svc:80": "loki.cluster.local"
} }
@ -129,3 +130,20 @@ spec:
app: internal-proxy app: internal-proxy
type: ClusterIP type: ClusterIP
--- ---
apiVersion: v1
kind: Service
metadata:
name: vmcluster
namespace: proxy-civo
labels:
app: internal-proxy
spec:
ports:
- name: http
port: 80
protocol: TCP
targetPort: 8080
selector:
app: internal-proxy
type: ClusterIP
---