mirror of
https://github.com/Noratrieb/vps.git
synced 2026-01-14 16:55:00 +01:00
karin
This commit is contained in:
parent
3f0a29eabf
commit
68768a3e7c
4 changed files with 109 additions and 0 deletions
6
kube/karin-secret.yaml
Normal file
6
kube/karin-secret.yaml
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
apiVersion: v1
|
||||||
|
data:
|
||||||
|
DISCORD_TOKEN: QQ==
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: karin
|
||||||
34
kube/karin.yaml
Normal file
34
kube/karin.yaml
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: karin
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: karin
|
||||||
|
replicas: 1
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: karin
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: court-bot
|
||||||
|
image: discord-court-bot:1.0
|
||||||
|
envFrom:
|
||||||
|
- configMapRef:
|
||||||
|
name: karin
|
||||||
|
- secretRef:
|
||||||
|
name: karin
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: karin
|
||||||
|
data:
|
||||||
|
RUST_LOG: court_bot=DEBUG
|
||||||
|
GUILD_ID: "459006129670979584"
|
||||||
|
MONGO_URI: mongodb://localhost:27017
|
||||||
|
DB_NAME: karin
|
||||||
|
MONGO_INITDB_ROOT_USERNAME: root
|
||||||
|
SET_GLOBAL: ''
|
||||||
7
kube/mongo-secret.yaml
Normal file
7
kube/mongo-secret.yaml
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
apiVersion: v1
|
||||||
|
data:
|
||||||
|
MONGO_INITDB_ROOT_USERNAME: cm9vdA==
|
||||||
|
MONGO_INITDB_ROOT_PASSWORD: QQ==
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: mongodb
|
||||||
62
kube/mongo.yaml
Normal file
62
kube/mongo.yaml
Normal file
|
|
@ -0,0 +1,62 @@
|
||||||
|
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: mongodb-service
|
||||||
|
labels:
|
||||||
|
name: mongo
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- port: 27017
|
||||||
|
targetPort: 27017
|
||||||
|
clusterIP: None
|
||||||
|
selector:
|
||||||
|
role: mongo
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: StatefulSet
|
||||||
|
metadata:
|
||||||
|
name: mongod
|
||||||
|
spec:
|
||||||
|
serviceName: mongodb-service
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
role: mongo
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
role: mongo
|
||||||
|
environment: test
|
||||||
|
replicaset: MainRepSet
|
||||||
|
spec:
|
||||||
|
terminationGracePeriodSeconds: 10
|
||||||
|
containers:
|
||||||
|
- name: mongod-container
|
||||||
|
image: mongo
|
||||||
|
command:
|
||||||
|
- "mongod"
|
||||||
|
- "--bind_ip"
|
||||||
|
- "0.0.0.0"
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 0.2
|
||||||
|
memory: 200Mi
|
||||||
|
limits:
|
||||||
|
cpu: 0.3
|
||||||
|
memory: 300Mi
|
||||||
|
ports:
|
||||||
|
- containerPort: 27017
|
||||||
|
volumeMounts:
|
||||||
|
- name: mongodb-persistent-storage-claim
|
||||||
|
mountPath: /data/db
|
||||||
|
volumeClaimTemplates:
|
||||||
|
- metadata:
|
||||||
|
name: mongodb-persistent-storage-claim
|
||||||
|
annotations:
|
||||||
|
volume.beta.kubernetes.io/storage-class: "standard"
|
||||||
|
spec:
|
||||||
|
accessModes: [ "ReadWriteOnce" ]
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 100Mi
|
||||||
Loading…
Add table
Add a link
Reference in a new issue