Skip to content

Commit 1659070

Browse files
committed
add marge-bot chart
1 parent e97c269 commit 1659070

File tree

7 files changed

+276
-0
lines changed

7 files changed

+276
-0
lines changed

charts/marge-bot/Chart.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
apiVersion: v2
2+
name: marge-bot
3+
description: |-
4+
Helm chart to deploy [marge-bot](https://github.com/hiboxsystems/marge-bot).
5+
type: application
6+
version: 0.0.1
7+
appVersion: "0.11.0"
8+
home: https://github.com/slamdev/helm-charts/tree/master/charts/marge-bot
9+
icon: https://docs.gitlab.com/assets/images/gitlab-logo.svg
10+
maintainers:
11+
- name: slamdev
12+
email: valentin.fedoskin@gmail.com

charts/marge-bot/README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# marge-bot
2+
3+
![Version: 0.0.1](https://img.shields.io/badge/Version-0.0.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.11.0](https://img.shields.io/badge/AppVersion-0.11.0-informational?style=flat-square)
4+
5+
Helm chart to deploy [marge-bot](https://github.com/hiboxsystems/marge-bot).
6+
7+
**Homepage:** <https://github.com/slamdev/helm-charts/tree/master/charts/marge-bot>
8+
9+
## Maintainers
10+
11+
| Name | Email | Url |
12+
| ---- | ------ | --- |
13+
| slamdev | <valentin.fedoskin@gmail.com> | |
14+
15+
## Values
16+
17+
| Key | Type | Default | Description |
18+
|-----|------|---------|-------------|
19+
| additionalResources | list | `[]` | list of additional resources to create (are processed via `tpl` function) |
20+
| affinity | object | `{}` | affinity for scheduler pod assignment |
21+
| args | list | `[]` | args to pass to the container |
22+
| env | list | `[]` | additional environment variables for the deployment |
23+
| fullnameOverride | string | `""` | full name of the chart. |
24+
| image.pullPolicy | string | `"IfNotPresent"` | image pull policy |
25+
| image.repository | string | `"hiboxsystems/marge-bot"` | image repository |
26+
| image.tag | string | `""` | image tag (chart's appVersion value will be used if not set) |
27+
| imagePullSecrets | list | `[]` | image pull secret for private images |
28+
| nameOverride | string | `""` | override name of the chart |
29+
| nodeSelector | object | `{}` | node for scheduler pod assignment |
30+
| podSecurityContext | object | `{}` | specifies security settings for a pod |
31+
| resources | object | `{}` | custom resource configuration |
32+
| securityContext | object | `{}` | specifies security settings for a container |
33+
| serviceAccount.annotations | object | `{}` | annotations to add to the service account |
34+
| serviceAccount.create | bool | `false` | specifies whether a service account should be created |
35+
| serviceAccount.name | string | `nil` | the name of the service account to use; if not set and create is true, a name is generated using the fullname template |
36+
| tolerations | list | `[]` | tolerations for scheduler pod assignment |
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
{{/* vim: set filetype=mustache: */}}
2+
{{/*
3+
Expand the name of the chart.
4+
*/}}
5+
{{- define "marge-bot.name" -}}
6+
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
7+
{{- end -}}
8+
9+
{{/*
10+
Create a default fully qualified app name.
11+
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
12+
If release name contains chart name it will be used as a full name.
13+
*/}}
14+
{{- define "marge-bot.fullname" -}}
15+
{{- if .Values.fullnameOverride -}}
16+
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
17+
{{- else -}}
18+
{{- $name := default .Chart.Name .Values.nameOverride -}}
19+
{{- if contains $name .Release.Name -}}
20+
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
21+
{{- else -}}
22+
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
23+
{{- end -}}
24+
{{- end -}}
25+
{{- end -}}
26+
27+
{{/*
28+
Create chart name and version as used by the chart label.
29+
*/}}
30+
{{- define "marge-bot.chart" -}}
31+
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
32+
{{- end -}}
33+
34+
{{/*
35+
Common labels
36+
*/}}
37+
{{- define "marge-bot.labels" -}}
38+
helm.sh/chart: {{ include "marge-bot.chart" . }}
39+
{{ include "marge-bot.selectorLabels" . }}
40+
{{- if .Chart.AppVersion }}
41+
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
42+
{{- end }}
43+
app.kubernetes.io/managed-by: {{ .Release.Service }}
44+
{{- end -}}
45+
46+
{{/*
47+
Selector labels
48+
*/}}
49+
{{- define "marge-bot.selectorLabels" -}}
50+
app.kubernetes.io/name: {{ include "marge-bot.name" . }}
51+
app.kubernetes.io/instance: {{ .Release.Name }}
52+
{{- end -}}
53+
54+
{{/*
55+
Create the name of the service account to use
56+
*/}}
57+
{{- define "marge-bot.serviceAccountName" -}}
58+
{{- if .Values.serviceAccount.create -}}
59+
{{ default (include "marge-bot.fullname" .) .Values.serviceAccount.name }}
60+
{{- else -}}
61+
{{ default "default" .Values.serviceAccount.name }}
62+
{{- end -}}
63+
{{- end -}}
64+
65+
{{/*
66+
Create the tag for the docker image to use
67+
*/}}
68+
{{- define "marge-bot.tag" -}}
69+
{{- .Values.image.tag | default .Chart.AppVersion -}}
70+
{{- end -}}
71+
72+
73+
{{/*
74+
marge-bot.rawResource will create a resource template that can be
75+
merged with each item in `.Values.additionalResources`.
76+
*/}}
77+
{{- define "marge-bot.rawResource" -}}
78+
metadata:
79+
labels:
80+
{{- include "marge-bot.labels" . | nindent 4 }}
81+
{{- end }}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{{- $template := fromYaml (include "marge-bot.rawResource" .) -}}
2+
{{- range $i, $t := .Values.additionalResources }}
3+
---
4+
{{ toYaml (merge (tpl $t $ | fromYaml) $template) -}}
5+
{{- end }}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: {{ include "marge-bot.fullname" . }}
5+
namespace: {{ .Release.Namespace }}
6+
labels:
7+
{{- include "marge-bot.labels" . | nindent 4 }}
8+
spec:
9+
replicas: 1
10+
selector:
11+
matchLabels:
12+
{{- include "marge-bot.selectorLabels" . | nindent 6 }}
13+
template:
14+
metadata:
15+
labels:
16+
{{- include "marge-bot.selectorLabels" . | nindent 8 }}
17+
spec:
18+
{{- with .Values.imagePullSecrets }}
19+
imagePullSecrets:
20+
{{- toYaml . | nindent 8 }}
21+
{{- end }}
22+
serviceAccountName: {{ include "marge-bot.serviceAccountName" . }}
23+
securityContext:
24+
{{- toYaml .Values.podSecurityContext | nindent 8 }}
25+
containers:
26+
- name: {{ .Chart.Name }}
27+
securityContext:
28+
{{- toYaml .Values.securityContext | nindent 12 }}
29+
image: "{{ .Values.image.repository }}:{{ include "marge-bot.tag" . }}"
30+
args: {{ .Values.args | toYaml | nindent 12 }}
31+
imagePullPolicy: {{ .Values.image.pullPolicy }}
32+
resources:
33+
{{- toYaml .Values.resources | nindent 12 }}
34+
{{- with .Values.env }}
35+
env:
36+
{{- toYaml . | nindent 12 }}
37+
{{- end }}
38+
{{- with .Values.nodeSelector }}
39+
nodeSelector:
40+
{{- toYaml . | nindent 8 }}
41+
{{- end }}
42+
{{- with .Values.affinity }}
43+
affinity:
44+
{{- toYaml . | nindent 8 }}
45+
{{- end }}
46+
{{- with .Values.tolerations }}
47+
tolerations:
48+
{{- toYaml . | nindent 8 }}
49+
{{- end }}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{{- if .Values.serviceAccount.create -}}
2+
apiVersion: v1
3+
kind: ServiceAccount
4+
metadata:
5+
name: {{ include "marge-bot.serviceAccountName" . }}
6+
namespace: {{ .Release.Namespace }}
7+
labels:
8+
{{- include "marge-bot.labels" . | nindent 4 }}
9+
{{- with .Values.serviceAccount.annotations }}
10+
annotations:
11+
{{- toYaml . | nindent 4 }}
12+
{{- end }}
13+
{{- end -}}

charts/marge-bot/values.yaml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
image:
2+
# image.repository -- image repository
3+
repository: hiboxsystems/marge-bot
4+
# image.tag -- image tag (chart's appVersion value will be used if not set)
5+
tag: ""
6+
# image.pullPolicy -- image pull policy
7+
pullPolicy: IfNotPresent
8+
9+
# imagePullSecrets -- image pull secret for private images
10+
imagePullSecrets: [ ]
11+
# nameOverride -- override name of the chart
12+
nameOverride: ""
13+
# fullnameOverride -- full name of the chart.
14+
fullnameOverride: ""
15+
16+
# args -- args to pass to the container
17+
args: [ ]
18+
19+
serviceAccount:
20+
# serviceAccount.create -- specifies whether a service account should be created
21+
create: false
22+
# serviceAccount.annotations -- annotations to add to the service account
23+
annotations: { }
24+
# serviceAccount.name -- the name of the service account to use; if not set and create is true, a name is generated using the fullname template
25+
name:
26+
27+
# podSecurityContext -- specifies security settings for a pod
28+
podSecurityContext: { }
29+
# fsGroup: 2000
30+
31+
# securityContext -- specifies security settings for a container
32+
securityContext: { }
33+
# capabilities:
34+
# drop:
35+
# - ALL
36+
# readOnlyRootFilesystem: true
37+
# runAsNonRoot: true
38+
# runAsUser: 1000
39+
40+
41+
# resources -- custom resource configuration
42+
resources: { }
43+
# limits:
44+
# cpu: 100m
45+
# memory: 128Mi
46+
# requests:
47+
# cpu: 100m
48+
# memory: 128Mi
49+
50+
# nodeSelector -- node for scheduler pod assignment
51+
nodeSelector: { }
52+
53+
# tolerations -- tolerations for scheduler pod assignment
54+
tolerations: [ ]
55+
56+
# affinity -- affinity for scheduler pod assignment
57+
affinity: { }
58+
59+
# env -- additional environment variables for the deployment
60+
env: [ ]
61+
# - name: SAMPLE
62+
# value: text
63+
64+
# additionalResources -- list of additional resources to create (are processed via `tpl` function)
65+
additionalResources: [ ]
66+
# - |
67+
# apiVersion: v1
68+
# kind: ConfigMap
69+
# metadata:
70+
# name: {{ include "marge-bot.fullname" . }}-cm
71+
# namespace: {{ .Release.Namespace }}
72+
#
73+
# - |
74+
# apiVersion: v1
75+
# kind: Secret
76+
# metadata:
77+
# name: {{ include "marge-bot.fullname" . }}-s
78+
# namespace: {{ .Release.Namespace }}
79+
# stringData:
80+
# mykey: my-value

0 commit comments

Comments
 (0)