77 lines
1.7 KiB
YAML
77 lines
1.7 KiB
YAML
#SPDX-License-Identifier: MIT-0
|
|
---
|
|
# tasks file for ansible-role-vintage-story
|
|
- name: Create Vintage Story namespace
|
|
k8s:
|
|
state: present
|
|
definition:
|
|
apiVersion: v1
|
|
kind: Namespace
|
|
metadata:
|
|
name: vintage-story
|
|
|
|
- name: Create a persistent volume claim
|
|
k8s:
|
|
state: present
|
|
definition:
|
|
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
name: data
|
|
namespace: vintage-story
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
resources:
|
|
requests:
|
|
storage: 32Gi
|
|
|
|
- name: Create Deployment for Vintage Story
|
|
k8s:
|
|
definition:
|
|
apiVersion: v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: vintage-story
|
|
namespace: vintage-story
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: vintage-story
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: vintage-story
|
|
spec:
|
|
containers:
|
|
- name: vintage-story
|
|
image: devidian/vintagestory
|
|
volumeMounts:
|
|
- name: data
|
|
mountPath: /gamedata
|
|
imagePullPolicy: IfNotPresent
|
|
ports:
|
|
- containerPort: 42420
|
|
volumes:
|
|
- name: data
|
|
persistentVolumeClaim:
|
|
claimName: data
|
|
|
|
- name: Create Service for Vintage Story
|
|
k8s:
|
|
definition:
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: vintage-story
|
|
namespace: vintage-story
|
|
spec:
|
|
selector:
|
|
app: vintage-story
|
|
ports:
|
|
- port: 42420
|
|
name: http
|
|
type: LoadBalancer
|
|
|