Skip to content

Commit

Permalink
👷 feat: add k8s.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
synoti21 committed Nov 1, 2023
1 parent 0e0db91 commit 5e289f3
Showing 1 changed file with 75 additions and 0 deletions.
75 changes: 75 additions & 0 deletions k8s/manifest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
apiVersion: v1
kind: Secret
metadata:
name: baekjoon-secret
type: Opaque
stringData:
DISCORD_TOKEN: ${DISCORD_TOKEN}
RDS_ENDPOINT: ${RDS_ENDPOINT}
RDS_USER: ${RDS_USER}
RDS_PASSWORD: ${RDS_PASSWORD}
RDS_DB: ${RDS_DB}
BASE_URL: ${BASE_URL}
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: baekjoon-log-volume
labels:
type: local
spec:
storageClassName: manual
capacity:
storage: 1Gi
accessModes:
- ReadWriteOnce
hostPath:
path: "/home/synoti21/boj_log"
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: baekjoon-log-claim
spec:
storageClassName: manual
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: baekjoon-deployment
spec:
replicas: 1
selector:
matchLabels:
app: baekjoon-deployment
template:
metadata:
labels:
app: baekjoon-deployment
spec:
containers:
- name: baekjoon-bot
image: synoti21/baekjoon-bot:latest
imagePullPolicy: Never
envFrom:
- secretRef:
name: baekjoon-secret
resources:
limits:
memory: "128Mi"
cpu: 1
ports:
- containerPort: 4732
volumeMounts:
- name: baekjoon-log
mountPath: /app/logs
volumes:
- name: baekjoon-log
persistentVolumeClaim:
claimName: baekjoon-log-claim

0 comments on commit 5e289f3

Please sign in to comment.