diff --git a/templates/configMap.yaml b/templates/configMap.yaml new file mode 100644 index 0000000000000000000000000000000000000000..9e48a5f63028512c827b7d3876f2e8e159342879 --- /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 + } + }