tree: 997f8bf39df78d11ee034730c86a18251810e2ee [path history] [tgz]
  1. README.md
  2. common.go
  3. manager.go
  4. promserver.go
  5. promserver_test.go
  6. stats.go
pkg/stats/README.md

Helm Chart configuration

Prometheus based stats server

Below is the configuration for running exposing the statistics on port 8081. A running prometheus on kubernetes will grab the statistics from this service looking at the annotations.

deployment.yaml

apiVersion: apps/v1
kind: Deployment
metadata:
  name: test
spec:
  template:
    metadata:
      {{- with .Values.deployment.annotations }}
      annotations: {{- toYaml . | nindent 8 }}
      {{- end }}
    spec:
      containers:
        - name: testContainer
          ports:
          - name: promserver
            containerPort: 8081

values.yaml

deployment:
  annotations:
    prometheus.io/path: "/metrics"
    prometheus.io/port: "8081"
    prometheus.io/scrape: "true"

service.yaml

apiVersion: v1
kind: Service
metadata:
  name: test
spec:
  type: ClusterIP
  ports:
    - port: 8081
      targetPort: promserver
      protocol: TCP
      name: promserver