From 99fd0332d369923f19bc9678bda1d63de53e4714 Mon Sep 17 00:00:00 2001 From: Georgi Todorov <georgi.todorov@cleverpine.com> Date: Thu, 17 Aug 2023 13:40:15 +0000 Subject: [PATCH] Add new file --- templates/configMap.yaml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 templates/configMap.yaml diff --git a/templates/configMap.yaml b/templates/configMap.yaml new file mode 100644 index 0000000..9e48a5f --- /dev/null +++ b/templates/configMap.yaml @@ -0,0 +1,35 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: caddy + namespace: ocm +data: + Caddyfile: | + { + debug + } + + :80 { + @websockets { + header Connection upgrade + header_regexp Connection (?i)^upgrade$ + header Upgrade websocket + } + + # Handle any traffic that matches the `@websockets` pattern + handle @websockets { + reverse_proxy SERVICE:PORT + } + + # Handle all other traffic. + handle { + reverse_proxy http://SERVICE:PORT + } + + # What logs should look like. + log { + output stdout + # format single_field common_log + level DEBUG + } + } -- GitLab