Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Broker config for cost insights #57

Merged
merged 2 commits into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,10 @@ jobs:
file: dockerfiles/Dockerfile
context: dockerfiles/jenkins
tags: roadiehq/broker:${{ github.run_id }}.${{ github.run_number }}.${{ github.run_attempt }}-jenkins,roadiehq/broker:jenkins
- name: Build Cost Insights
uses: docker/build-push-action@v4
with:
push: true
file: dockerfiles/Dockerfile
context: dockerfiles/cost-insights
tags: roadiehq/broker:${{ github.run_id }}.${{ github.run_number }}.${{ github.run_attempt }}-cost-insights,roadiehq/broker:cost-insights
26 changes: 26 additions & 0 deletions dockerfiles/cost-insights/accept.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"private": [
{
"method": "GET",
"path": "/last-completed-billing-date",
"origin": "${COST_INSIGHTS_API_URL}"
},
{
"method": "GET",
"path": "/group-daily-cost/:group",
"origin": "${COST_INSIGHTS_API_URL}"
},
{
"method": "GET",
"path": "/product-insights/:product",
"origin": "${COST_INSIGHTS_API_URL}"
}
],
"public": [
{
"//": "Get broker connection status",
"method": "GET",
"path": "/healthcheck"
}
]
}
8 changes: 8 additions & 0 deletions dockerfiles/cost-insights/start
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash

if [ -z "$COST_INSIGHTS_API_URL"]; then
echo "You must provide COST_INSIGHTS_API_URL"
exit 1
fi

exec broker --verbose --disableBodyVarsSubstitution --disableHeaderVarsSubstitution
Loading