add deployment.yml
This commit is contained in:
parent
fb999d190b
commit
bfcabbdf11
1 changed files with 49 additions and 0 deletions
49
src/main/resources/deployment.yml
Normal file
49
src/main/resources/deployment.yml
Normal file
|
@ -0,0 +1,49 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: k8s-mastodon-bot
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: k8s-mastodon-bot
|
||||
strategy:
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: k8s-mastodon-bot
|
||||
spec:
|
||||
containers:
|
||||
- image: postgres
|
||||
name: k8s-mastodon-bot
|
||||
env:
|
||||
- name: POSTGRES_USER_FILE
|
||||
value: /var/run/secrets/postgres-secrets/postgres-user
|
||||
- name: POSTGRES_DB_FILE
|
||||
value: /var/run/secrets/postgres-secrets/postgres-db
|
||||
- name: POSTGRES_PASSWORD_FILE
|
||||
value: /var/run/secrets/postgres-secrets/postgres-password
|
||||
ports:
|
||||
- containerPort: 5432
|
||||
name: k8s-mastodon-bot
|
||||
cmd:
|
||||
volumeMounts:
|
||||
- name: k8s-mastodon-bot
|
||||
mountPath: /var/lib/k8s-mastodon-bot/data
|
||||
- name: postgres-secret-volume
|
||||
mountPath: /var/run/secrets/postgres-secrets
|
||||
readOnly: true
|
||||
- name: postgres-config-volume
|
||||
mountPath: /etc/k8s-mastodon-bot/k8s-mastodon-bot.conf
|
||||
subPath: k8s-mastodon-bot.conf
|
||||
readOnly: true
|
||||
volumes:
|
||||
- name: k8s-mastodon-bot
|
||||
persistentVolumeClaim:
|
||||
claimName: postgres-claim
|
||||
- name: postgres-secret-volume
|
||||
secret:
|
||||
secretName: postgres-secret
|
||||
- name: postgres-config-volume
|
||||
configMap:
|
||||
name: postgres-config
|
Loading…
Reference in a new issue