forked from kubernetes-retired/kpng
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Metrics server to export prometheus metrics. Add Service monitor for KPNG server and client endpoints Add config to deploy KPNG with metrics activated Some small fixups to our deployment scripts Signed-off-by: Andrew Stoycos <[email protected]>
- Loading branch information
Showing
15 changed files
with
294 additions
and
851 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
labels: | ||
app.kubernetes.io/component: kpng | ||
app.kubernetes.io/instance: main | ||
app.kubernetes.io/name: kpng | ||
app.kubernetes.io/part-of: kube-prometheus | ||
app.kubernetes.io/version: 0.24.0 | ||
name: kpng-main | ||
namespace: kube-system | ||
spec: | ||
ports: | ||
- name: kpng-metrics | ||
port: 9099 | ||
selector: | ||
app: kpng | ||
sessionAffinity: ClientIP | ||
--- | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: ServiceMonitor | ||
metadata: | ||
labels: | ||
app.kubernetes.io/component: kpng | ||
app.kubernetes.io/instance: main | ||
app.kubernetes.io/name: kpng | ||
app.kubernetes.io/part-of: kube-prometheus | ||
app.kubernetes.io/version: 0.24.0 | ||
name: kpng-main | ||
namespace: kube-system | ||
spec: | ||
endpoints: | ||
- interval: 1s | ||
port: kpng-metrics | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/component: kpng | ||
app.kubernetes.io/instance: main | ||
app.kubernetes.io/name: kpng | ||
app.kubernetes.io/part-of: kube-prometheus | ||
app.kubernetes.io/version: 0.24.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
global: | ||
scrape_interval: 15s # By default, scrape targets every 15 seconds. | ||
|
||
# Attach these labels to any time series or alerts when communicating with | ||
# external systems (federation, remote storage, Alertmanager). | ||
external_labels: | ||
monitor: 'kpng' | ||
|
||
# A scrape configuration containing exactly one endpoint to scrape: | ||
# Here it's Prometheus itself. | ||
scrape_configs: | ||
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config. | ||
- job_name: 'prometheus-kpng' | ||
|
||
# Override the global default and scrape targets from this job every 5 seconds. | ||
scrape_interval: 2s | ||
|
||
static_configs: | ||
- targets: ['localhost:9090', 'localhost:8081'] |
Oops, something went wrong.