add gitlab ci

This commit is contained in:
ducoterra
2020-05-16 12:19:36 -04:00
parent 151867fd49
commit 3ce71a6682
9 changed files with 100 additions and 15 deletions

23
helm/.helmignore Normal file
View File

@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/

23
helm/Chart.yaml Normal file
View File

@@ -0,0 +1,23 @@
apiVersion: v2
name: charts
description: A Helm chart for Kubernetes
# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: 1.16.0

View File

@@ -0,0 +1,41 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}
spec:
selector:
matchLabels:
app: {{ .Release.Name }}
template:
metadata:
labels:
app: {{ .Release.Name }}
spec:
containers:
- name: {{ .Release.Name }}
image: {{ .Values.image }}
ports:
- containerPort: 25565
volumeMounts:
- mountPath: /mc_data
name: data
tty: true
stdin: true
env:
- name: MAX_RAM
value: "4"
- name: MIN_RAM
value: "1"
- name: THREADS
value: "4"
resources:
requests:
memory: "2Gi"
cpu: 250m
limits:
memory: "4Gi"
cpu: "4"
volumes:
- name: data
persistentVolumeClaim:
claimName: {{ .Release.Name }}

11
helm/templates/pvc.yaml Normal file
View File

@@ -0,0 +1,11 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ .Release.Name }}
spec:
storageClassName: nfs-encrypted
accessModes:
- ReadWriteMany
resources:
requests:
storage: 32Gi

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Service
metadata:
name: {{ .Release.Name }}
spec:
selector:
app: {{ .Release.Name }}
ports:
- port: 25565
targetPort: 25565
name: {{ .Release.Name }}
type: LoadBalancer

1
helm/values.yaml Normal file
View File

@@ -0,0 +1 @@
image: hub.ducoterra.net/ducoterra/minecraft:1.15.2_1