Skip to content

Commit

Permalink
Add billing enabled and sales email to Helm chart and /settings API e…
Browse files Browse the repository at this point in the history
…ndpoint (#1873)

Backend work for first two tasks of
#1875

New /billing API endpoint to be added separately once we have a better
idea of what data we can get from the payment processor.
  • Loading branch information
tw4l authored Jun 25, 2024
1 parent a7382eb commit 7af3980
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions backend/btrixcloud/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ def main():
),
"maxPagesPerCrawl": int(os.environ.get("MAX_PAGES_PER_CRAWL", 0)),
"maxScale": int(os.environ.get("MAX_CRAWL_SCALE", 3)),
"billingEnabled": is_bool(os.environ.get("BILLING_ENABLED")),
"salesEmail": os.environ.get("SALES_EMAIL"),
}

invites = init_invites(mdb, email)
Expand Down
2 changes: 2 additions & 0 deletions backend/test/test_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ def test_settings():
"maxPagesPerCrawl": 4,
"maxScale": 3,
"defaultPageLoadTimeSeconds": 120,
"billingEnabled": False,
"salesEmail": "[email protected]",
}
4 changes: 4 additions & 0 deletions chart/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ data:

MAX_CRAWLER_MEMORY: "{{ .Values.max_crawler_memory }}"

BILLING_ENABLED: "{{ .Values.billing_enabled }}"

SALES_EMAIL: "{{ .Values.sales_email }}"

---
apiVersion: v1
kind: ConfigMap
Expand Down
3 changes: 3 additions & 0 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ job_memory: "70Mi"

profile_browser_idle_seconds: 60

billing_enabled: false
sales_email: "[email protected]"

# if set, print last 'log_failed_crawl_lines' of each failed
# crawl pod to backend operator stdout
# mostly intended for debugging / testing
Expand Down

0 comments on commit 7af3980

Please sign in to comment.