mirror of
https://gitea.fenix-dev.com/fenix-gitea-admin/iac-ansible-private.git
synced 2026-05-14 00:15:20 +00:00
minecraft
This commit is contained in:
@ -6,10 +6,15 @@ metadata:
|
||||
data:
|
||||
SERVER_NAME: "Example Minecraft Server"
|
||||
EULA: "true"
|
||||
VERSION: "1.21.1"
|
||||
MAX_PLAYERS: "10"
|
||||
ENABLE_WHITELIST: "true"
|
||||
OPS: |
|
||||
tomas
|
||||
ENABLE_WHITELIST: "true"
|
||||
Shy_Doge
|
||||
aleroqu
|
||||
kiuma
|
||||
WHITELIST: |
|
||||
tomas
|
||||
tomas
|
||||
Shy_Doge
|
||||
aleroqu
|
||||
kiuma
|
||||
|
||||
9
roles/minecraft/files/minecraft-secret
Normal file
9
roles/minecraft/files/minecraft-secret
Normal file
@ -0,0 +1,9 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: minecraft-secret
|
||||
namespace: minecraft
|
||||
data:
|
||||
SECRET_KEY: >-
|
||||
c2VjcmV0IGRvIHBsYWl0Z2c=
|
||||
|
||||
@ -2,11 +2,12 @@ apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: minecraft-service
|
||||
namespace: stack-arr
|
||||
namespace: minecraft
|
||||
spec:
|
||||
ports:
|
||||
- port: 19132
|
||||
protocol: UDP
|
||||
- port: 25565
|
||||
protocol: TCP
|
||||
selector:
|
||||
app: minecraft
|
||||
type: ClusterIP
|
||||
type: LoadBalancer
|
||||
loadBalancerIP: 192.168.1.153
|
||||
@ -13,6 +13,7 @@ spec:
|
||||
labels:
|
||||
app: minecraft
|
||||
spec:
|
||||
hostNetwork: true # equivalente ao network_mode: host
|
||||
securityContext:
|
||||
runAsNonRoot: true
|
||||
runAsUser: 1013
|
||||
@ -20,6 +21,14 @@ spec:
|
||||
imagePullSecrets:
|
||||
- name: regcred
|
||||
containers:
|
||||
- name: playit
|
||||
image: ghcr.io/playit-cloud/playit-agent:0.17
|
||||
env:
|
||||
- name: SECRET_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: minecraft-secret # nome do Secret
|
||||
key: SECRET_KEY # chave dentro do Secret
|
||||
- name: minecraft
|
||||
image: itzg/minecraft-server
|
||||
stdin: true
|
||||
@ -32,7 +41,7 @@ spec:
|
||||
- configMapRef:
|
||||
name: minecraft-configmap
|
||||
ports:
|
||||
- containerPort: 19132
|
||||
- containerPort: 25565
|
||||
name: serverport
|
||||
volumeMounts:
|
||||
- name: data
|
||||
|
||||
@ -18,18 +18,18 @@
|
||||
mode: '0644'
|
||||
|
||||
|
||||
#- name: Obter várias notas do Bitwarden
|
||||
# shell: |
|
||||
# echo "unlock"
|
||||
# BW_SESSION=$(bw unlock {{ bw_password }} --raw)
|
||||
# echo "get item"
|
||||
# bw get item "{{ item.id }}" --session $BW_SESSION | jq -r '.notes' > {{ item.dest }}
|
||||
# loop:
|
||||
# - { id: "iac.ansible.stackarr.minecraft.secret", dest: "/tmp/stack-arr/minecraft/kubernetes-files/files/minecraft-secret.yaml" }
|
||||
# args:
|
||||
# executable: /bin/bash
|
||||
# environment:
|
||||
# BW_PASSWORD: "{{ BW_PASSWORD }}"
|
||||
- name: Obter várias notas do Bitwarden
|
||||
shell: |
|
||||
echo "unlock"
|
||||
BW_SESSION=$(bw unlock {{ bw_password }} --raw)
|
||||
echo "get item"
|
||||
bw get item "{{ item.id }}" --session $BW_SESSION | jq -r '.notes' > {{ item.dest }}
|
||||
loop:
|
||||
- { id: "iac.ansible.minecraft.minecraft.secret", dest: "/tmp/minecraft/minecraft/kubernetes-files/files/minecraft-secret.yaml" }
|
||||
args:
|
||||
executable: /bin/bash
|
||||
environment:
|
||||
BW_PASSWORD: "{{ BW_PASSWORD }}"
|
||||
|
||||
|
||||
- name: Listar conteúdo do diretório remoto
|
||||
|
||||
Reference in New Issue
Block a user