From 5e3bdf0f1e4f753ffb572502712a771e0c9d604a Mon Sep 17 00:00:00 2001 From: Cees-Jan Kiewiet Date: Wed, 20 May 2020 00:31:57 +0200 Subject: [PATCH] Add Docker Hub Exporter --- README.md | 1 + charts/docker-hub-exporter/.helmignore | 22 + charts/docker-hub-exporter/Chart.yaml | 11 + .../templates/_helpers.tpl | 63 +++ .../templates/deployment.yaml | 38 ++ ...grafana-dashboard-docker-hub-influxdb.yaml | 492 ++++++++++++++++++ ...afana-dashboard-docker-hub-prometheus.yaml | 395 ++++++++++++++ .../templates/service.yaml | 15 + charts/docker-hub-exporter/values.yaml | 13 + 9 files changed, 1050 insertions(+) create mode 100644 charts/docker-hub-exporter/.helmignore create mode 100644 charts/docker-hub-exporter/Chart.yaml create mode 100644 charts/docker-hub-exporter/templates/_helpers.tpl create mode 100644 charts/docker-hub-exporter/templates/deployment.yaml create mode 100644 charts/docker-hub-exporter/templates/grafana-dashboard-docker-hub-influxdb.yaml create mode 100644 charts/docker-hub-exporter/templates/grafana-dashboard-docker-hub-prometheus.yaml create mode 100644 charts/docker-hub-exporter/templates/service.yaml create mode 100644 charts/docker-hub-exporter/values.yaml diff --git a/README.md b/README.md index 000e726..efa9c19 100644 --- a/README.md +++ b/README.md @@ -4,5 +4,6 @@ Opinionated helm chats for my personal projects, and OSS Projects that either do ## Charts in this repository +* [`docker-hub-exporter`](https://hub.helm.sh/charts/wyrihaximusnet/docker-hub-exporter) * [`redirect`](https://hub.helm.sh/charts/wyrihaximusnet/redirect) diff --git a/charts/docker-hub-exporter/.helmignore b/charts/docker-hub-exporter/.helmignore new file mode 100644 index 0000000..50af031 --- /dev/null +++ b/charts/docker-hub-exporter/.helmignore @@ -0,0 +1,22 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/charts/docker-hub-exporter/Chart.yaml b/charts/docker-hub-exporter/Chart.yaml new file mode 100644 index 0000000..c649627 --- /dev/null +++ b/charts/docker-hub-exporter/Chart.yaml @@ -0,0 +1,11 @@ +apiVersion: v2 +name: docker-hub-exporter +description: Docker Hub exporter +home: https://github.com/jessestuart/docker-hub-exporter +icon: https://helm.wyrihaximus.net/images/charts/docker-hub-exporter.png +type: application +version: 0.1.0 +appVersion: d05df48 +maintainers: + - name: WyriHaximus + email: helm@wyrihaximus.net diff --git a/charts/docker-hub-exporter/templates/_helpers.tpl b/charts/docker-hub-exporter/templates/_helpers.tpl new file mode 100644 index 0000000..884fed3 --- /dev/null +++ b/charts/docker-hub-exporter/templates/_helpers.tpl @@ -0,0 +1,63 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define ".helm.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define ".helm.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define ".helm.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Common labels +*/}} +{{- define ".helm.labels" -}} +helm.sh/chart: {{ include ".helm.chart" . }} +{{ include ".helm.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end -}} + +{{/* +Selector labels +*/}} +{{- define ".helm.selectorLabels" -}} +app.kubernetes.io/name: {{ include ".helm.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end -}} + +{{/* +Create the name of the service account to use +*/}} +{{- define ".helm.serviceAccountName" -}} +{{- if .Values.serviceAccount.create -}} + {{ default (include ".helm.fullname" .) .Values.serviceAccount.name }} +{{- else -}} + {{ default "default" .Values.serviceAccount.name }} +{{- end -}} +{{- end -}} diff --git a/charts/docker-hub-exporter/templates/deployment.yaml b/charts/docker-hub-exporter/templates/deployment.yaml new file mode 100644 index 0000000..921a12c --- /dev/null +++ b/charts/docker-hub-exporter/templates/deployment.yaml @@ -0,0 +1,38 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include ".helm.fullname" . }} + labels: + app: {{ include ".helm.fullname" . }} + release: {{ include ".helm.fullname" . }} + {{- include ".helm.labels" . | nindent 4 }} +spec: + replicas: 1 + selector: + matchLabels: + {{- include ".helm.selectorLabels" . | nindent 6 }} + template: + metadata: + annotations: + prometheus.io/scrape: "true" + prometheus.io/port: {{ .Values.service.port | quote}} + labels: + app: {{ include ".helm.fullname" . }} + release: {{ include ".helm.fullname" . }} + {{- include ".helm.selectorLabels" . | nindent 8 }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + containers: + - name: docker-hub-exporter + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - name: metrics + containerPort: {{ .Values.service.port }} + protocol: TCP + args: + - -listen-address=:{{ .Values.service.port }} + - -organisations={{ .Values.organisations }} diff --git a/charts/docker-hub-exporter/templates/grafana-dashboard-docker-hub-influxdb.yaml b/charts/docker-hub-exporter/templates/grafana-dashboard-docker-hub-influxdb.yaml new file mode 100644 index 0000000..34e87f5 --- /dev/null +++ b/charts/docker-hub-exporter/templates/grafana-dashboard-docker-hub-influxdb.yaml @@ -0,0 +1,492 @@ +{{- if .Values.grafana.influxdb -}} +apiVersion: v1 +kind: ConfigMap +metadata: + name: grafana-docker-hub-influxdb + labels: + grafana_dashboard: docker-hub-influxdb +data: + docker-hub-influxdb.json: | + { + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "id": 7, + "links": [], + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 18, + "x": 0, + "y": 0 + }, + "hiddenSeries": false, + "id": 2, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "[[tag_image]] ([[tag_user]])", + "expr": "rate(docker_hub_image_pulls_total[1h])", + "format": "time_series", + "groupBy": [ + { + "params": [ + "1h" + ], + "type": "time" + }, + { + "params": [ + "user" + ], + "type": "tag" + }, + { + "params": [ + "image" + ], + "type": "tag" + } + ], + "intervalFactor": 1, + "measurement": "docker_hub_image_pulls_total", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "counter" + ], + "type": "field" + }, + { + "params": [], + "type": "last" + }, + { + "params": [ + "1h" + ], + "type": "non_negative_derivative" + } + ] + ], + "tags": [] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Pulls", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "transparent": true, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "locale", + "label": "Pulls per hour", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "columns": [], + "datasource": null, + "fontSize": "100%", + "gridPos": { + "h": 18, + "w": 6, + "x": 18, + "y": 0 + }, + "id": 4, + "links": [], + "pageSize": null, + "scroll": true, + "showHeader": true, + "sort": { + "col": 0, + "desc": true + }, + "styles": [ + { + "alias": "Time", + "align": "auto", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "link": false, + "pattern": "Time", + "type": "hidden" + }, + { + "alias": "Image", + "align": "auto", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "image", + "preserveFormat": false, + "thresholds": [], + "type": "string", + "unit": "short", + "valueMaps": [] + }, + { + "alias": "User", + "align": "auto", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "user", + "thresholds": [], + "type": "string", + "unit": "short", + "valueMaps": [] + }, + { + "alias": "Downloads", + "align": "auto", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "pattern": "Value", + "thresholds": [], + "type": "number", + "unit": "short" + }, + { + "alias": "", + "align": "auto", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "decimals": 2, + "pattern": "/.*/", + "thresholds": [], + "type": "hidden", + "unit": "short" + } + ], + "targets": [ + { + "expr": "docker_hub_image_pulls_total", + "format": "table", + "groupBy": [ + { + "params": [ + "user" + ], + "type": "tag" + }, + { + "params": [ + "image" + ], + "type": "tag" + } + ], + "instant": true, + "intervalFactor": 1, + "legendFormat": "", + "measurement": "docker_hub_image_pulls_total", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "counter" + ], + "type": "field" + }, + { + "params": [], + "type": "last" + } + ] + ], + "tags": [] + } + ], + "title": "Repositories", + "transform": "table", + "transparent": true, + "type": "table" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 18, + "x": 0, + "y": 9 + }, + "hiddenSeries": false, + "id": 7, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "[[tag_image]] ([[tag_user]])", + "expr": "rate(docker_hub_image_stars[1h])", + "format": "time_series", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "image" + ], + "type": "tag" + }, + { + "params": [ + "user" + ], + "type": "tag" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "intervalFactor": 1, + "measurement": "docker_hub_image_stars", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "gauge" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Stars", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "transparent": true, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "locale", + "label": "Stars per hour", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "refresh": "", + "schemaVersion": 22, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-7d", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "", + "title": "Docker Hub", + "uid": "XsMEtCgiz", + "variables": { + "list": [] + }, + "version": 1 + } +{{ end }} \ No newline at end of file diff --git a/charts/docker-hub-exporter/templates/grafana-dashboard-docker-hub-prometheus.yaml b/charts/docker-hub-exporter/templates/grafana-dashboard-docker-hub-prometheus.yaml new file mode 100644 index 0000000..3b3d0c8 --- /dev/null +++ b/charts/docker-hub-exporter/templates/grafana-dashboard-docker-hub-prometheus.yaml @@ -0,0 +1,395 @@ +{{- if .Values.grafana.prometheus -}} +apiVersion: v1 +kind: ConfigMap +metadata: + name: grafana-docker-hub-prometheus + labels: + grafana_dashboard: docker-hub-prometheus +data: + docker-hub-prometheus.json: | + { + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "id": 9, + "iteration": 1589925510054, + "links": [], + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "VictoriaMetrics", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 18, + "x": 0, + "y": 0 + }, + "hiddenSeries": false, + "id": 2, + "interval": "", + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(rate(docker_hub_image_pulls_total_counter{user=~\"$user\"}[1h])) by (image, user)", + "hide": false, + "instant": false, + "interval": "", + "legendFormat": "\{\{image}} (\{\{user\}\})", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Pulls", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "transparent": true, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "locale", + "label": "Pulls per hour", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "columns": [], + "datasource": "VictoriaMetrics", + "fontSize": "100%", + "gridPos": { + "h": 16, + "w": 6, + "x": 18, + "y": 0 + }, + "id": 9, + "pageSize": null, + "showHeader": true, + "sort": { + "col": 3, + "desc": true + }, + "styles": [ + { + "alias": "User", + "align": "auto", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "DD-MM-YYYY", + "decimals": 0, + "mappingType": 1, + "pattern": "user", + "thresholds": [], + "type": "string", + "unit": "s" + }, + { + "alias": "Image", + "align": "auto", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "image", + "thresholds": [], + "type": "string", + "unit": "short" + }, + { + "alias": "Updated At", + "align": "auto", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "DD-MM-YYYY", + "decimals": 2, + "mappingType": 1, + "pattern": "Value", + "thresholds": [], + "type": "date", + "unit": "short" + }, + { + "alias": "", + "align": "auto", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "mappingType": 1, + "pattern": "/.*/", + "thresholds": [], + "type": "hidden", + "unit": "short" + } + ], + "targets": [ + { + "expr": "sum(max_over_time(sort_desc(docker_hub_image_last_updated_gauge{user=~\"$user\"} * 1000))) by (user, image)", + "format": "table", + "instant": true, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Image last Updated At", + "transform": "table", + "transparent": true, + "type": "table" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "VictoriaMetrics", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 18, + "x": 0, + "y": 9 + }, + "hiddenSeries": false, + "id": 7, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(docker_hub_image_stars_gauge{user=~\"$user\"}) by (image, user)", + "interval": "", + "legendFormat": "\{\{image}} (\{\{user\}\})", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Stars", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "transparent": true, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "locale", + "label": "Stars per hour", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "refresh": "15m", + "schemaVersion": 22, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "allValue": null, + "current": { + "tags": [], + "text": "All", + "value": [ + "$__all" + ] + }, + "datasource": "VictoriaMetrics", + "definition": "label_values(docker_hub_image_pulls_total_counter, user)", + "hide": 0, + "includeAll": true, + "index": -1, + "label": "User", + "multi": true, + "name": "user", + "options": [], + "query": "label_values(docker_hub_image_pulls_total_counter, user)", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-7d", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "", + "title": "Docker Hub", + "uid": "XsMetCgiz", + "variables": { + "list": [] + }, + "version": 1 + } +{{ end }} \ No newline at end of file diff --git a/charts/docker-hub-exporter/templates/service.yaml b/charts/docker-hub-exporter/templates/service.yaml new file mode 100644 index 0000000..141456a --- /dev/null +++ b/charts/docker-hub-exporter/templates/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include ".helm.fullname" . }} + labels: + {{- include ".helm.labels" . | nindent 4 }} +spec: + type: ClusterIP + ports: + - port: {{ .Values.service.port }} + targetPort: {{ .Values.service.port }} + protocol: TCP + name: metrics + selector: + {{- include ".helm.selectorLabels" . | nindent 4 }} diff --git a/charts/docker-hub-exporter/values.yaml b/charts/docker-hub-exporter/values.yaml new file mode 100644 index 0000000..6959e00 --- /dev/null +++ b/charts/docker-hub-exporter/values.yaml @@ -0,0 +1,13 @@ +image: + repository: jessestuart/docker-hub-exporter + tag: d05df48 + pullPolicy: IfNotPresent + +organisations: YOUR_USER_OR_ORG + +grafana: + influxdb: false + prometheus: false + +service: + port: 9170