diff --git a/tobru-ch/Caddyfile b/tobru-ch/Caddyfile new file mode 100644 index 0000000..117d2f4 --- /dev/null +++ b/tobru-ch/Caddyfile @@ -0,0 +1,4 @@ +http://localhost:8080 { + header content-type "application/jrd+json; charset=utf-8" + respond "{\"subject\":\"acct:tobru@mstdn.social\",\"aliases\":[\"https://mstdn.social/@tobru\",\"https://mstdn.social/users/tobru\"],\"links\":[{\"rel\":\"http://webfinger.net/rel/profile-page\",\"type\":\"text/html\",\"href\":\"https://mstdn.social/@tobru\"},{\"rel\":\"self\",\"type\":\"application/activity+json\",\"href\":\"https://mstdn.social/users/tobru\"},{\"rel\":\"http://ostatus.org/schema/1.0/subscribe\",\"template\":\"https://mstdn.social/authorize_interaction?uri={uri}\"}]}" +} \ No newline at end of file diff --git a/tobru-ch/cm-caddyfile.yaml b/tobru-ch/cm-caddyfile.yaml new file mode 100644 index 0000000..fc59eec --- /dev/null +++ b/tobru-ch/cm-caddyfile.yaml @@ -0,0 +1,7 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: caddyconfig +data: + Caddyfile: "http://localhost:8080 {\n\theader content-type \"application/jrd+json; + charset=utf-8\"\n\trespond \"{\\\"subject\\\":\\\"acct:tobru@mstdn.social\\\",\\\"aliases\\\":[\\\"https://mstdn.social/@tobru\\\",\\\"https://mstdn.social/users/tobru\\\"],\\\"links\\\":[{\\\"rel\\\":\\\"http://webfinger.net/rel/profile-page\\\",\\\"type\\\":\\\"text/html\\\",\\\"href\\\":\\\"https://mstdn.social/@tobru\\\"},{\\\"rel\\\":\\\"self\\\",\\\"type\\\":\\\"application/activity+json\\\",\\\"href\\\":\\\"https://mstdn.social/users/tobru\\\"},{\\\"rel\\\":\\\"http://ostatus.org/schema/1.0/subscribe\\\",\\\"template\\\":\\\"https://mstdn.social/authorize_interaction?uri={uri}\\\"}]}\"\n}\n" diff --git a/tobru-ch/deployment.yaml b/tobru-ch/deployment.yaml index fcbdcef..2463ed9 100644 --- a/tobru-ch/deployment.yaml +++ b/tobru-ch/deployment.yaml @@ -60,6 +60,14 @@ spec: - name: data mountPath: /var/lib/ghost/content subPath: ghost + - image: docker.io/library/caddy:2.6.2-alpine + imagePullPolicy: IfNotPresent + name: caddy + ports: + - containerPort: 8080 + volumeMounts: + - mountPath: /etc/caddy + name: caddyfile dnsPolicy: ClusterFirst restartPolicy: Always schedulerName: default-scheduler @@ -69,3 +77,7 @@ spec: - name: data persistentVolumeClaim: claimName: data + - configMap: + defaultMode: 420 + name: caddyconfig + name: caddyfile