-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from jkroepke/github_exporter
- Loading branch information
Showing
11 changed files
with
471 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# 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 | ||
*.orig | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ |
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,18 @@ | ||
apiVersion: v2 | ||
name: github-exporter | ||
description: exporter for export github metrics | ||
home: https://github.com/jkroepke/github_exporter | ||
version: 1.0.0 | ||
appVersion: 1.5.0 | ||
maintainers: | ||
- name: jkroepke | ||
email: github@jkroepke.de | ||
url: https://github.com/jkroepke | ||
keywords: | ||
- github_exporter | ||
- config | ||
- exporter | ||
- github | ||
- prometheus | ||
sources: | ||
- https://github.com/adorsys/github_exporter |
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,57 @@ | ||
# github-exporter | ||
|
||
![Version: 1.0.0](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square) | ||
|
||
exporter for export github metrics | ||
|
||
**Homepage:** <https://github.com/jkroepke/github_exporter> | ||
|
||
## Installation | ||
|
||
```shell | ||
helm repo add jkroepke https://jkroepke.github.io/helm-charts/ | ||
helm install github-exporter jkroepke/github-exporter | ||
``` | ||
|
||
## Maintainers | ||
|
||
| Name | Email | Url | | ||
| ---- | ------ | --- | | ||
| jkroepke | <github@jkroepke.de> | <https://github.com/jkroepke> | | ||
|
||
## Source Code | ||
|
||
* <https://github.com/adorsys/github_exporter> | ||
|
||
## Values | ||
|
||
| Key | Type | Default | Description | | ||
|-----|------|---------|-------------| | ||
| annotations | object | `{}` | annotations of the Deployment. | | ||
| env | object | `{}` | | | ||
| extraVolumeMounts | string | `""` | Add additional volumes mounts, e. g. for custom secrets | | ||
| extraVolumes | string | `""` | Add additional volumes, e.g. for custom secrets | | ||
| fullnameOverride | string | `""` | String to fully override amazon-eks-pod-identity.fullname template | | ||
| image.pullPolicy | string | `"IfNotPresent"` | | | ||
| image.registry | string | `"docker.io"` | github_exporter image registry | | ||
| image.repository | string | `"jkroepke/github_exporter"` | github_exporter image repository | | ||
| image.tag | string | `.Chart.AppVersion` | github_exporter image tag (immutable tags are recommended). | | ||
| imagePullSecrets | list | `[]` | registry secret names as an array | | ||
| labels | object | `{}` | labels of the Deployment. | | ||
| nameOverride | string | `""` | String to partially override github_exporter.fullname template (will maintain the release name) | | ||
| podAnnotations | object | `{}` | Annotations for github_exporter pods | | ||
| podLabels | object | `{}` | Additional labels for github_exporter pods | | ||
| podSecurityContext | object | `{}` | github_exporter pods' Security Context. | | ||
| resources.limits | object | `{}` | The resources limits for the amazon-eks-pod-identity-webhook container # Example: # limits: # cpu: 100m # memory: 128Mi | | ||
| resources.requests | object | `{}` | The requested resources for the amazon-eks-pod-identity-webhook container # Examples: # requests: # cpu: 100m # memory: 128Mi | | ||
| secrets | object | `{}` | | | ||
| securityContext.readOnlyRootFilesystem | bool | `true` | Pod securityContext: Enable read-only root filesystem | | ||
| securityContext.runAsGroup | int | `1` | Pod securityContext: Run primary group id | | ||
| securityContext.runAsNonRoot | bool | `false` | Pod securityContext: Disable root user | | ||
| securityContext.runAsUser | int | `65534` | Pod securityContext: Run user id | | ||
| service.annotations | object | `{}` | Service annotations | | ||
| service.type | string | `"ClusterIP"` | Service type | | ||
| serviceAccount.annotations | object | `{}` | Annotations for service account. Evaluated as a template. | | ||
| serviceAccount.create | bool | `true` | Enable creation of ServiceAccount for nginx pod | | ||
| serviceAccount.labels | object | `{}` | Labels for service account. Evaluated as a template. | | ||
| serviceAccount.name | string | A name is generated using the `github_exporter.fullname` template | The name of the ServiceAccount to use. | |
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,24 @@ | ||
{{ template "chart.header" . }} | ||
|
||
{{ template "chart.deprecationWarning" . }} | ||
|
||
{{ template "chart.badgesSection" . }} | ||
|
||
{{ template "chart.description" . }} | ||
|
||
{{ template "chart.homepageLine" . }} | ||
|
||
## Installation | ||
|
||
```shell | ||
helm repo add jkroepke https://jkroepke.github.io/helm-charts/ | ||
helm install {{ template "chart.name" $ }} jkroepke/{{ template "chart.name" $ }} | ||
``` | ||
|
||
{{ template "chart.maintainersSection" . }} | ||
|
||
{{ template "chart.sourcesSection" . }} | ||
|
||
{{ template "chart.requirementsSection" . }} | ||
|
||
{{ template "chart.valuesSection" . }} |
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,63 @@ | ||
{{/* vim: set filetype=mustache: */}} | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "github-exporter.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 "github-exporter.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 "github-exporter.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Common labels | ||
*/}} | ||
{{- define "github-exporter.labels" -}} | ||
helm.sh/chart: {{ include "github-exporter.chart" . }} | ||
{{ include "github-exporter.selectorLabels" . }} | ||
{{- if .Chart.AppVersion }} | ||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
{{- end }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
{{- end }} | ||
|
||
{{/* | ||
Selector labels | ||
*/}} | ||
{{- define "github-exporter.selectorLabels" -}} | ||
app.kubernetes.io/name: {{ include "github-exporter.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create the name of the service account to use | ||
*/}} | ||
{{- define "github-exporter.serviceAccountName" -}} | ||
{{- if .Values.serviceAccount.create }} | ||
{{- default (include "github-exporter.fullname" .) .Values.serviceAccount.name }} | ||
{{- else }} | ||
{{- default "default" .Values.serviceAccount.name }} | ||
{{- end }} | ||
{{- end }} |
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,73 @@ | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
{{- with .Values.annotations }} | ||
annotations: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
name: {{ template "github-exporter.fullname" . }} | ||
labels: | ||
{{- include "github-exporter.labels" . | nindent 4 }} | ||
spec: | ||
selector: | ||
matchLabels: | ||
{{- include "github-exporter.selectorLabels" . | nindent 6 }} | ||
template: | ||
metadata: | ||
{{- with .Values.podAnnotations }} | ||
annotations: | ||
{{- . | nindent 8 }} | ||
{{- end }} | ||
labels: | ||
{{- include "github-exporter.selectorLabels" . | nindent 8 }} | ||
{{- with .Values.podLabels }} | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
spec: | ||
{{- with .Values.imagePullSecrets }} | ||
imagePullSecrets: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
containers: | ||
- name: github-exporter | ||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" | ||
imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
ports: | ||
- name: metrics | ||
containerPort: 9171 | ||
{{- with .Values.resources }} | ||
resources: | ||
{{- toYaml . | nindent 12 }} | ||
{{- end }} | ||
env: | ||
- name: GITHUB_EXPORTER_PORT | ||
value: "9171" | ||
{{- range $name, $value := .Values.env }} | ||
- name: {{ $name | quote }} | ||
value: {{ tpl $value $ | quote }} | ||
{{- end }} | ||
{{- range $name, $value := .Values.secrets }} | ||
- name: {{ $name | quote }} | ||
valueFrom: | ||
secretKeyRef: | ||
name: "{{ template "github-exporter.fullname" $ }}" | ||
key: {{ $name | quote }} | ||
{{- end }} | ||
{{- with .Values.securityContext }} | ||
securityContext: | ||
{{- toYaml . | nindent 12 }} | ||
{{- end }} | ||
volumeMounts: | ||
{{- with .Values.extraVolumeMounts }} | ||
{{- tpl . $ | nindent 12 }} | ||
{{- end }} | ||
volumes: | ||
{{- with .Values.extraVolumes }} | ||
{{- tpl . $ | nindent 8 }} | ||
{{- end }} | ||
serviceAccountName: {{ include "github-exporter.serviceAccountName" . }} | ||
{{- with .Values.podSecurityContext }} | ||
securityContext: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} |
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,13 @@ | ||
{{ if .Values.secrets }} | ||
--- | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: {{ template "github-exporter.fullname" . }} | ||
labels: | ||
{{- include "github-exporter.labels" . | nindent 4 }} | ||
data: | ||
{{- range $name, $value := .Values.secrets }} | ||
{{ $name }}: "{{ tpl $value $ | b64enc }}" | ||
{{- end }} | ||
{{- end }} |
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,20 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ include "github-exporter.fullname" . }} | ||
labels: | ||
{{- include "github-exporter.labels" . | nindent 4 }} | ||
{{- with .Values.service.annotations }} | ||
annotations: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
type: {{ .Values.service.type }} | ||
ports: | ||
- port: 9171 | ||
targetPort: metrics | ||
protocol: TCP | ||
name: metrics | ||
selector: | ||
{{- include "github-exporter.selectorLabels" . | nindent 4 }} |
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,16 @@ | ||
{{- if .Values.serviceAccount.create -}} | ||
--- | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: {{ include "github-exporter.serviceAccountName" . }} | ||
labels: | ||
{{- include "github-exporter.labels" . | nindent 4 }} | ||
{{- with .Values.serviceAccount.labels }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{- with .Values.serviceAccount.annotations }} | ||
annotations: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{- end }} |
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,31 @@ | ||
{{- if .Values.metrics.serviceMonitor.enabled }} | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: ServiceMonitor | ||
metadata: | ||
name: {{ include "github-exporter.fullname" . }} | ||
labels: | ||
{{- include "github-exporter.labels" . | nindent 4 }} | ||
spec: | ||
jobLabel: {{ .Values.metrics.serviceMonitor.jobLabel | quote }} | ||
selector: | ||
matchLabels: | ||
{{- include "github-exporter.selectorLabels" . | nindent 4 }} | ||
endpoints: | ||
- port: metrics | ||
path: /metrics | ||
{{- if .Values.metrics.serviceMonitor.interval }} | ||
interval: {{ .Values.metrics.serviceMonitor.interval }} | ||
{{- end }} | ||
{{- if .Values.metrics.serviceMonitor.scrapeTimeout }} | ||
scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }} | ||
{{- end }} | ||
{{- if .Values.metrics.serviceMonitor.honorLabels }} | ||
honorLabels: {{ .Values.metrics.serviceMonitor.honorLabels }} | ||
{{- end }} | ||
{{- if .Values.metrics.serviceMonitor.metricRelabelings }} | ||
metricRelabelings: {{ toYaml .Values.metrics.serviceMonitor.metricRelabelings | nindent 8 }} | ||
{{- end }} | ||
{{- if .Values.metrics.serviceMonitor.relabelings }} | ||
relabelings: {{ toYaml .Values.metrics.serviceMonitor.relabelings | nindent 8 }} | ||
{{- end }} | ||
{{- end }} |
Oops, something went wrong.