Skip to content

Commit

Permalink
factorio: add map server
Browse files Browse the repository at this point in the history
  • Loading branch information
zegl committed Oct 31, 2023
1 parent 2127c84 commit 74d630a
Showing 1 changed file with 107 additions and 0 deletions.
107 changes: 107 additions & 0 deletions kubernetes/ingress/caddy-factorio-map.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: caddy-factorio-map
namespace: caddy-system
data:
Caddyfile: |-
{
debug
servers {
metrics
}
admin :2019
}
:80 {
file_server {
root /www
}
}
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: caddy-factorio-map
namespace: caddy-system
spec:
replicas: 1
podManagementPolicy: "Parallel"
updateStrategy:
type: "RollingUpdate"
selector:
matchLabels:
app.kubernetes.io/name: caddy-factorio-map
template:
metadata:
labels:
app.kubernetes.io/name: caddy-factorio-map
annotations:
"prometheus.io/scrape": "true"
"prometheus.io/port": "2019"
bump: v7
spec:
securityContext: {}
containers:
- name: caddy-factorio-map
securityContext:
allowPrivilegeEscalation: true
capabilities:
add:
- NET_BIND_SERVICE
drop:
- ALL
runAsGroup: 0
runAsUser: 0
image: "caddy:2.6.2-alpine"
imagePullPolicy: IfNotPresent
args:
- "caddy"
- "run"
- "--config=/config/Caddyfile"
ports:
- name: http
containerPort: 80
protocol: TCP
- name: https
containerPort: 443
protocol: TCP
- name: metrics
containerPort: 9765
protocol: TCP
resources: {}
volumeMounts:
- name: tmp
mountPath: /tmp
- name: config-volume
mountPath: /config
- name: factorio-map
mountPath: /www
volumes:
- name: tmp
emptyDir: {}
- name: config-volume
configMap:
name: caddy-factorio-map
volumeClaimTemplates:
- metadata:
name: factorio-map
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: "10Gi"
---
kind: Service
apiVersion: v1
metadata:
name: factorio-map
namespace: caddy-system
spec:
type: NodePort
selector:
app.kubernetes.io/name: caddy-factorio-map
ports:
- protocol: TCP
port: 80
targetPort: 80

0 comments on commit 74d630a

Please sign in to comment.