-
Notifications
You must be signed in to change notification settings - Fork 2
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 #12 from Arslanbekov/helm
Helm deploy (chart)
- Loading branch information
Showing
10 changed files
with
231 additions
and
19 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 |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
|
||
*.test | ||
*.out | ||
slack-duty-bot | ||
config.yaml | ||
slack-duty-bot | ||
!/slack-duty-bot | ||
.kubernetes/deploy.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,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,5 @@ | ||
apiVersion: v1 | ||
appVersion: "1.0" | ||
description: A Helm chart for Kubernetes | ||
name: slack-duty-bot | ||
version: 0.1.0 |
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,32 @@ | ||
{{/* vim: set filetype=mustache: */}} | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "slack-duty-bot.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 "slack-duty-bot.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 "slack-duty-bot.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} | ||
{{- 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,19 @@ | ||
kind: ConfigMap | ||
apiVersion: v1 | ||
metadata: | ||
name: "{{ include "slack-duty-bot.name" . }}-config-map" | ||
data: | ||
config.yaml: |- | ||
slack: | ||
keyword: | ||
{{- range $keyword := .Values.configuration.keywords }} | ||
- {{ $keyword | quote}} | ||
{{- end }} | ||
duties: | ||
- [ {{ .Values.dutyUsers.sunday | quote }} ] | ||
- [ {{ .Values.dutyUsers.monday | quote }} ] | ||
- [ {{ .Values.dutyUsers.tuesday | quote }} ] | ||
- [ {{ .Values.dutyUsers.wednesday | quote }} ] | ||
- [ {{ .Values.dutyUsers.thursday | quote }} ] | ||
- [ {{ .Values.dutyUsers.friday | quote }} ] | ||
- [ {{ .Values.dutyUsers.saturday | quote }} ] |
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,43 @@ | ||
apiVersion: apps/v1beta2 | ||
kind: Deployment | ||
metadata: | ||
name: {{ include "slack-duty-bot.fullname" . }} | ||
labels: | ||
app.kubernetes.io/name: {{ include "slack-duty-bot.name" . }} | ||
helm.sh/chart: {{ include "slack-duty-bot.chart" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
spec: | ||
replicas: {{ .Values.replicaCount }} | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: {{ include "slack-duty-bot.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
template: | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: {{ include "slack-duty-bot.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
spec: | ||
containers: | ||
- name: {{ .Chart.Name }} | ||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" | ||
imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
args: ["--config.path=/etc/slack-duty-bot"] | ||
env: | ||
- name: SDB_SLACK_TOKEN | ||
valueFrom: | ||
secretKeyRef: | ||
name: "{{ include "slack-duty-bot.name" . }}-secret" | ||
key: token | ||
volumeMounts: | ||
- name: "{{ include "slack-duty-bot.name" . }}-config-volume" | ||
mountPath: /etc/slack-duty-bot | ||
resources: | ||
{{ toYaml .Values.resources | indent 12 }} | ||
volumes: | ||
- name: "{{ include "slack-duty-bot.name" . }}-config-volume" | ||
configMap: | ||
name: "{{ include "slack-duty-bot.name" . }}-config-map" | ||
restartPolicy: Always | ||
terminationGracePeriodSeconds: 30 |
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,8 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: "{{ include "slack-duty-bot.name" . }}-secret" | ||
type: Opaque | ||
data: | ||
token: {{ .Values.configuration.slackToken | b64enc }} |
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,35 @@ | ||
# Default values for slack-duty-bot. | ||
# This is a YAML-formatted file. | ||
# Declare variables to be passed into your templates. | ||
|
||
nameOverride: "slack-duty-bot" | ||
fullnameOverride: "slack-duty-bot" | ||
|
||
replicaCount: 1 | ||
|
||
image: | ||
repository: iqoption/slack-duty-bot | ||
tag: 1.1.0 | ||
pullPolicy: IfNotPresent | ||
|
||
configuration: | ||
slackToken: "" | ||
keywords: | ||
- duty | ||
|
||
dutyUsers: | ||
sunday: user.one, user.two | ||
monday: user.one | ||
tuesday: user.two | ||
wednesday: user.one | ||
thursday: user.two | ||
friday: user.one | ||
saturday: user.one, user.two | ||
|
||
resources: {} | ||
# limits: | ||
# cpu: 100m | ||
# memory: 128Mi | ||
# requests: | ||
# cpu: 100m | ||
# memory: 128Mi |
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
Oops, something went wrong.