Skip to content

Commit

Permalink
feat: helm chart
Browse files Browse the repository at this point in the history
  • Loading branch information
fython committed Mar 2, 2024
1 parent 70a1884 commit 44c3a59
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 0 deletions.
1 change: 1 addition & 0 deletions helm-chart/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.tgz
10 changes: 10 additions & 0 deletions helm-chart/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: v1
name: coriander-bot-rs
version: 1.0.0
keywords:
- telegram
maintainers:
- name: Siubeng
sources:
- https://github.com/fython/coriander-bot-rs
description: A telegram bot written in Rust
8 changes: 8 additions & 0 deletions helm-chart/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Release.Name }}-configmap
data:
RUST_LOG: "{{ .Values.env.RUST_LOG }}"
TELOXIDE_TOKEN: "{{ .Values.bot.token }}"
CORIANDER_MAINTAINER_USER_ID: "{{ .Values.bot.maintainerUserId }}"
23 changes: 23 additions & 0 deletions helm-chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-deploy
labels:
app: coriander-bot
spec:
replicas: 1
selector:
matchLabels:
app: coriander-bot
template:
metadata:
labels:
app: coriander-bot
spec:
containers:
- name: {{ .Release.Name }}
envFrom:
- configMapRef:
name: {{ .Release.Name }}-configmap
image: '{{ .Values.image.repository }}:{{ .Values.image.tag }}'
imagePullPolicy: {{ .Values.image.pullPolicy }}
12 changes: 12 additions & 0 deletions helm-chart/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# 镜像配置
image:
repository: ghcr.io/fython/coriander-bot-rs
tag: latest
pullPolicy: IfNotPresent
# 机器人配置
bot:
token: ""
maintainerUserId: 0
# 其他环境变量
env:
RUST_LOG: "info,std::option"

0 comments on commit 44c3a59

Please sign in to comment.