-
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 #4 from curie-data-factory/gitlabmonitor
add chart
- Loading branch information
Showing
14 changed files
with
387 additions
and
3 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
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,21 @@ | ||
# 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 |
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,22 @@ | ||
apiVersion: v2 | ||
name: gitlab-monitor | ||
description: A web-based monitor dashboard for GitLab CI | ||
appVersion: "1.7" | ||
version: 1.2.5 | ||
home: https://github.com/timoschwarzer/gitlab-monitor | ||
icon: https://github.com/timoschwarzer/gitlab-monitor/blob/main/logo.svg | ||
sources: | ||
- https://github.com/timoschwarzer/gitlab-monitor | ||
maintainers: | ||
- name: armandleopold | ||
email: [email protected] | ||
kubeVersion: ">= 1.14.0-0" | ||
keywords: | ||
- dashboard | ||
- devops | ||
- gitlab | ||
- git | ||
annotations: | ||
artifacthub.io/images: | | ||
- name: gitlab-monitor | ||
image: timoschwarzer/gitlab-monitor:latest |
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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2021 Institut Curie | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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,105 @@ | ||
# Gitlab Monitor | ||
|
||
A web-based monitor dashboard for GitLab CI | ||
|
||
To get more informations : | ||
|
||
* [Github Source Code](https://github.com/timoschwarzer/gitlab-monitor) | ||
* [Dockerhub Docker Image](https://hub.docker.com/r/timoschwarzer/gitlab-monitor) | ||
|
||
## Prerequisites | ||
|
||
1. Have a running [Kubernetes](https://kubernetes.io/docs/setup/) environment | ||
2. Setup [Helm](https://github.com/kubernetes/helm) | ||
|
||
## Installing the Chart | ||
|
||
Before you can install the chart you will need to add the `curiedfcharts` repo to [Helm](https://helm.sh/). | ||
|
||
```shell | ||
helm repo add curiedfcharts https://curie-data-factory.github.io/helm-charts | ||
helm repo update | ||
``` | ||
|
||
After you've installed the repo you can install the chart. | ||
|
||
```shell | ||
helm upgrade --install --namespace default --values ./my-values.yaml my-release curiedfcharts/gitlab-monitor | ||
``` | ||
|
||
## Configuration | ||
|
||
The following table lists the configurable parameters of the chart and their default values. | ||
|
||
`config` : | ||
|
||
```yaml | ||
config: | | ||
{ | ||
"gitlabApi": "https://gitlab.example.com/api/v4", | ||
"privateToken": "ABCDEF123456", | ||
"maxAge": 168, | ||
"fetchCount": 20, | ||
"pipelinesOnly": false, | ||
"autoZoom": false, | ||
"showPipelineIds": true, | ||
"showJobs": "iconAndName", | ||
"showDurations": true, | ||
"showUsers": false, | ||
"projectVisibility": "any", | ||
"linkToFailureSound": null , | ||
"title": null, | ||
"pollingIntervalMultiplier": 10, | ||
"filter": { | ||
"include": ".*", | ||
"includeTags": ".*", | ||
"exclude": null, | ||
"excludeTags": null | ||
}, | ||
"projectFilter": { | ||
"*": { | ||
"include": ".*", | ||
"exclude": null, | ||
"default": null, | ||
"showMerged": false, | ||
"showTags": true, | ||
"maxPipelines": 10, | ||
"notifyFailureOn": null | ||
} | ||
} | ||
} | ||
``` | ||
`resources` : | ||
|
||
```yaml | ||
resources: | ||
limits: | ||
cpu: 100m | ||
memory: 128Mi | ||
requests: | ||
cpu: 100m | ||
memory: 128Mi | ||
``` | ||
|
||
|
||
| Parameter | Description | Default | | ||
|----------------------------------|--------------------------------------------------|---------------------------------------------------------------------| | ||
| `image.replicaCount` | Number of replicas to create | `1` | | ||
| `image.repository` | Image repository. | `timoschwarzer/gitlab-monitor` | | ||
| `image.tag` | Image Tag. | `latest` | | ||
| `image.pullPolicy` | Image pull policy. | `IfNotPresent` | | ||
| `image.name` | Image name | `gitlabmonitor` | | ||
| `image.deployRegistry` | If the image is stored in a private registry | `false` | | ||
| `image.imagePullSecrets` | Docker registry credentials Secret name | `registrysecret` | | ||
| `image.dataSecret` | Secret storing docker image registry credentials | `{"auths":{"registry.compagny.com":{"password":"","username":""}}}` | | ||
| `service.type` | Service Type | `ClusterIP` | | ||
| `service.targetPort` | Service Port | `80` | | ||
| `service.protocol` | Service Protocol | `TCP` | | ||
| `ingress.enabled` | Expose application with ingress | `true` | | ||
| `ingress.hostnames` | Urls of exposed application | `['gitlabmonitor.company.com']` | | ||
| `ingress.tls` | Array of TLS Hosts | `[]` | | ||
| `ingress.tls[hosts]` | Host name | `['gitlabmonitor.company.com']` | | ||
| `ingress.tls[hosts[secretName]]` | Secret for the current host name | `gitlabmonitor` | | ||
| `resources` | Resources requirements & limits | `See values.yaml` | | ||
| `config` | Config values for Gitlab Monitor | `See values.yaml` | |
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 @@ | ||
Gitlab Monitor installed ! |
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,45 @@ | ||
{{/* vim: set filetype=mustache: */}} | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "gitlabmonitor.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 "gitlabmonitor.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 "gitlabmonitor.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Common labels | ||
*/}} | ||
{{- define "gitlabmonitor.labels" -}} | ||
app.kubernetes.io/name: {{ include "gitlabmonitor.name" . }} | ||
helm.sh/chart: {{ include "gitlabmonitor.chart" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
{{- if .Chart.AppVersion }} | ||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
{{- end }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
{{- 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,38 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: "{{ .Release.Name }}-{{ .Values.image.name }}" | ||
labels: | ||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" | ||
heritage: {{ .Release.Service }} | ||
release: {{ .Release.Name }} | ||
{{ include "gitlabmonitor.labels" . | indent 4 }} | ||
spec: | ||
replicas: {{ .Values.replicaCount }} | ||
selector: | ||
matchLabels: | ||
app: "{{ .Release.Name }}-{{ .Values.image.name }}" | ||
release: {{ .Release.Name }} | ||
template: | ||
metadata: | ||
labels: | ||
app: "{{ .Release.Name }}-{{ .Values.image.name }}" | ||
release: {{ .Release.Name }} | ||
annotations: | ||
rollme: {{ randAlphaNum 5 | quote }} | ||
spec: | ||
containers: | ||
- name: {{ .Values.image.name }} | ||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" | ||
imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
env: | ||
- name: GITLAB_MONITOR_CONFIG | ||
value: | {{ .Values.config | trim | nindent 12 }} | ||
ports: | ||
- containerPort: {{ .Values.service.targetPort }} | ||
name: {{ .Values.service.targetPort }}{{ .Values.service.protocol | lower }} | ||
protocol: {{ .Values.service.protocol }} | ||
resources: | ||
{{ toYaml .Values.resources | indent 12 }} | ||
imagePullSecrets: | ||
- name: {{ .Values.image.imagePullSecrets }} |
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,33 @@ | ||
{{- if .Values.ingress.enabled -}} | ||
{{- $serviceName := print .Release.Name "-" .Values.image.name "-" .Values.service.type | lower -}} | ||
{{- $servicePort := print .Values.service.targetPort .Values.service.protocol | lower -}} | ||
|
||
apiVersion: networking.k8s.io/v1beta1 | ||
kind: Ingress | ||
metadata: | ||
name: {{ .Values.image.name }} | ||
labels: | ||
app: {{ .Values.image.name }} | ||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" | ||
heritage: {{ .Release.Service }} | ||
release: {{ .Release.Name }} | ||
{{- if .Values.ingress.annotations }} | ||
annotations: | ||
{{ toYaml .Values.ingress.annotations | indent 4 }} | ||
{{- end }} | ||
spec: | ||
{{- if .Values.ingress.tls }} | ||
tls: | ||
{{ toYaml .Values.ingress.tls | indent 4 }} | ||
{{- end }} | ||
rules: | ||
{{- range .Values.ingress.hostnames }} | ||
- host: "{{ . }}" | ||
http: | ||
paths: | ||
- path: / | ||
backend: | ||
serviceName: {{ $serviceName }} | ||
servicePort: {{ $servicePort }} | ||
{{- 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,10 @@ | ||
{{- if .Values.image.deployRegistry -}} | ||
apiVersion: v1 | ||
kind: Secret | ||
type: kubernetes.io/dockerconfigjson | ||
metadata: | ||
name: {{ .Values.image.imagePullSecrets }} | ||
namespace: {{ .Release.Namespace }} | ||
data: | ||
.dockerconfigjson: {{ .Values.image.dataSecret | b64enc }} | ||
{{- 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,14 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: "{{ .Release.Name }}-{{ .Values.image.name }}" | ||
spec: | ||
type: {{ .Values.service.type }} | ||
ports: | ||
- name: "http" | ||
port: {{ .Values.service.targetPort }} | ||
protocol: {{ .Values.service.protocol }} | ||
targetPort: {{ .Values.service.targetPort }} | ||
selector: | ||
app: "{{ .Release.Name }}-{{ .Values.image.name }}" | ||
release: {{ .Release.Name }} |
Oops, something went wrong.