diff --git a/apps/minecraft/Chart.yaml b/apps/minecraft/Chart.yaml new file mode 100644 index 0000000..eb769be --- /dev/null +++ b/apps/minecraft/Chart.yaml @@ -0,0 +1,3 @@ +name: minecraft +version: 1.0 + diff --git a/apps/minecraft/requirements.yaml b/apps/minecraft/requirements.yaml new file mode 100644 index 0000000..85a5c86 --- /dev/null +++ b/apps/minecraft/requirements.yaml @@ -0,0 +1,4 @@ +dependencies: +- name: minecraft + version: 2.0.7 + repository: 'https://itzg.github.io/minecraft-server-charts/' \ No newline at end of file diff --git a/apps/minecraft/templates/volume.yaml b/apps/minecraft/templates/volume.yaml new file mode 100644 index 0000000..44d352d --- /dev/null +++ b/apps/minecraft/templates/volume.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: minecraft +spec: + capacity: + storage: 1Gi + accessModes: + - ReadWriteOnce + hostPath: + path: /data/minecraft diff --git a/apps/minecraft/templates/volumeclaim.yaml b/apps/minecraft/templates/volumeclaim.yaml new file mode 100644 index 0000000..04e3990 --- /dev/null +++ b/apps/minecraft/templates/volumeclaim.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: minecraft +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi + volumeMode: Filesystem + volumeName: minecraft diff --git a/apps/minecraft/values.yaml b/apps/minecraft/values.yaml new file mode 100644 index 0000000..b8a98f7 --- /dev/null +++ b/apps/minecraft/values.yaml @@ -0,0 +1,14 @@ +minecraft: + minecraftServer: + eula: "TRUE" + pvp: true + onlineMode: false + serviceType: NodePort + rcon: + enabled: true + password: "CHANGE_IN_ARGOCD" + serviceType: NodePort + persistence: + dataDir: + enabled: true + existingClaim: minecraft \ No newline at end of file diff --git a/apps/services/mysql.yaml b/apps/services/mysql.yaml new file mode 100644 index 0000000..594ae61 --- /dev/null +++ b/apps/services/mysql.yaml @@ -0,0 +1,49 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: mariadb + labels: + app: mariadb +spec: + replicas: 1 + selector: + matchLabels: + app: mariadb + template: + metadata: + labels: + app: mariadb + spec: + volumes: + # mkdir -p /data/mariadb + # chown 999.999 /data/mariadb + - name: mariadb + hostPath: + path: /data/mariadb + type: + containers: + - name: mariadb + image: mariadb + env: + - name: MYSQL_ROOT_PASSWORD_FILE + value: /var/lib/mysql/rootpwd + ports: + - containerPort: 3306 + name: mysql + volumeMounts: + - mountPath: /var/lib/mysql + name: mariadb +--- +kind: Service +apiVersion: v1 +metadata: + name: mysql +spec: + selector: + app: mariadb + ports: + - name: mysql + protocol: TCP + port: 3306 + targetPort: mysql diff --git a/main/apps/minecraft.yaml b/main/apps/minecraft.yaml new file mode 100644 index 0000000..5f76830 --- /dev/null +++ b/main/apps/minecraft.yaml @@ -0,0 +1,17 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: minecraft + namespace: argocd +spec: + destination: + namespace: minecraft + server: https://kubernetes.default.svc + project: default + source: + path: apps/minecraft + repoURL: git@github.com:gorilych/gf-k8s + syncPolicy: + automated: + prune: true + selfHeal: true