Skip to content

Commit

Permalink
Mastodon at 3 (#69)
Browse files Browse the repository at this point in the history
* mastodon at 3

* haproxy

* haproxy

* fix
  • Loading branch information
james-otten authored Dec 30, 2024
1 parent 9f494d1 commit dae1650
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
13 changes: 13 additions & 0 deletions ansible/roles/k8s-lb/templates/haproxy.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,14 @@ frontend meshdb
acl app_grafana hdr(host) -i stats-new.nycmesh.net
acl app_stats hdr(host) -i stats.nycmesh.net
use_backend be_grafana if app_grafana OR app_stats

# Mastodon to unique backend
acl app_mastodon hdr(host) -i mastodon.nycmesh.net
use_backend be_mastodon if app_mastodon
http-request add-header X-Forwarded-Proto "https" if app_mastodon
http-request add-header X-Forwarded-Port "443" if app_mastodon
http-request set-header X-Forwarded-For %[src] if app_mastodon
http-request set-header host mastodon.nycmesh.net if app_mastodon

# Redirect wiki.mesh.nycmesh.net to wiki.nycmesh.net
acl is_wiki_mesh hdr(host) -i wiki.mesh.nycmesh.net
Expand Down Expand Up @@ -87,6 +95,11 @@ backend be_grafana
mode http
server srv_grafana 10.70.90.82:3000

backend be_mastodon
log global
mode http
server srv_mastodon 10.70.187.12:80

# Expose metrics locally for DD
frontend prometheus
bind 127.0.0.1:8405
Expand Down
1 change: 1 addition & 0 deletions terraform/prod1.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,5 @@ meshdb_fqdn = [
"wiki.nycmesh.net",
"wiki.mesh.nycmesh.net",
"los-backend.db.nycmesh.net",
"mastodon.nycmesh.net",
]

0 comments on commit dae1650

Please sign in to comment.