k8s deploy method

This commit is contained in:
Sense T 2024-01-13 12:59:31 +08:00
parent 3eba88b3dd
commit fe13b65016
3 changed files with 42 additions and 1 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
target target
.direnv .direnv
*.db *.db
deploy/**/config

View File

@ -0,0 +1,27 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: hangitbot
spec:
selector:
matchLabels:
app: hangitbot
template:
metadata:
labels:
app: hangitbot
spec:
containers:
- name: hangitbot
image: <Image>
resources:
limits:
memory: "128Mi"
cpu: "100m"
envFrom:
- secretRef:
name: hangitbot
env:
- name: API_URL
value: https://tgapi.sense-t.eu.org/

View File

@ -0,0 +1,13 @@
# yaml-language-server: $schema=https://json.schemastore.org/kustomization.json
resources:
- deployment.yaml
secretGenerator:
- name: hangitbot
files:
- config/DATABASE_URI
- config/TGBOT_TOKEN
images:
- name: <Image>
newName: ghcr.io/senseab/hangitbot
newTag: v0.0.1