From 938db68be938f469b7dff02c1a178e7c022c02a7 Mon Sep 17 00:00:00 2001 From: TonyChyi Date: Sat, 20 Aug 2022 14:19:54 +0800 Subject: [PATCH] 1 --- coturn/daemonset.yaml | 2 ++ coturn/kustomization.yaml | 7 ++++++- coturn/overlay.yaml | 14 ++++++++++++++ nicball-factorio/daemonset.yaml | 28 ++++++++++++++++++++++++++++ nicball-factorio/kustomization.yaml | 6 ++++++ 5 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 coturn/overlay.yaml create mode 100644 nicball-factorio/daemonset.yaml create mode 100644 nicball-factorio/kustomization.yaml diff --git a/coturn/daemonset.yaml b/coturn/daemonset.yaml index 939a642..eeae708 100644 --- a/coturn/daemonset.yaml +++ b/coturn/daemonset.yaml @@ -39,6 +39,8 @@ spec: volumeMounts: - mountPath: /conf name: conf + - mountPath: /certs + name: certs ports: - name: turn-port1 containerPort: 3478 diff --git a/coturn/kustomization.yaml b/coturn/kustomization.yaml index 8861cb8..1feb57a 100644 --- a/coturn/kustomization.yaml +++ b/coturn/kustomization.yaml @@ -10,4 +10,9 @@ resources: configMapGenerator: - name: coturn-conf files: - - config/turnserver.conf \ No newline at end of file + - config/turnserver.conf +patches: + - path: overlay.yaml + target: + kind: DaemonSet + labelSelector: app.kubernetes.io/name=coturn \ No newline at end of file diff --git a/coturn/overlay.yaml b/coturn/overlay.yaml new file mode 100644 index 0000000..4b277ef --- /dev/null +++ b/coturn/overlay.yaml @@ -0,0 +1,14 @@ +apiVersion: apps/v1 +kind: DaemonSet +metadata: + name: coturn +spec: + selector: {} + template: + spec: + volumes: + - name: certs + secret: + secretName: wetofu-me-certs + optional: false + \ No newline at end of file diff --git a/nicball-factorio/daemonset.yaml b/nicball-factorio/daemonset.yaml new file mode 100644 index 0000000..1f5e442 --- /dev/null +++ b/nicball-factorio/daemonset.yaml @@ -0,0 +1,28 @@ +apiVersion: apps/v1 +kind: DaemonSet +metadata: + name: nicball-factorio +spec: + selector: + matchLabels: + app: nicball-factorio + template: + metadata: + labels: + app: nicball-factorio + spec: + hostNetwork: true + containers: + - name: nicball-factorio + image: alpine/socat:1.7.4.3-r0 + args: + - '-ls' + - UDP-LISTEN:34197,reuseaddr,fork + - UDP6:nuc.nicball.me:34197 + resources: + limits: + cpu: 100m + memory: 32Mi + requests: + cpu: 10m + memory: 8Mi diff --git a/nicball-factorio/kustomization.yaml b/nicball-factorio/kustomization.yaml new file mode 100644 index 0000000..f927845 --- /dev/null +++ b/nicball-factorio/kustomization.yaml @@ -0,0 +1,6 @@ +# yaml-language-server: $schema=https://json.schemastore.org/kustomization.json + +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - daemonset.yaml \ No newline at end of file