Warning This repository is in development
OCost is a simple frontend for OpenCost and includes a deployment template. Kubernetes namespace costs are displayed to users dependent on their assigned groups in Azure Active Directory. See doc/ for documentation.
0. Create an AAD app
You must have sufficient permissions on Azure active directory to perform these steps.
0.0. Go to https://portal.azure.com
0.1. Navigate to Azure Active Directory
then App registrations
0.2. Click New registration
and fill in the required fields. The redirect URL will be the apps root URL appended with /oauth2/callback
e.g. https://cost.example.com:443/oauth2/callback
0.3. On the create applications navigate to API permissions
and add a Microsoft Graph permission for Group.ReadAll
0.4 Click Grant admin consent for TENANT
0.5 Create a secret by navigating to Certificates & secrets
and clicking New client secret
0.6 Paste the secret into the .env
file created from .env.sample
0.7 Find the application ID from the Overview
pane of the application
0.8 Add the groups claim to the returned token in the Token configuration
pane by selecting Security Groups
then add
-
Create a
.env
file from.env.sample
and replace at least the CHANGE_ME values -
Create a
config.yaml
fromconfig.sample.yaml
-
Run
make dev
- Fork this repository and make sure pre-commit is installed (
pre-commit install
). - Use the
[issue-number]-[issue-title]
branching convention and favour short-lived branches. - Raise pull request (PRs) against
main
for review. - The person creating the PR is responsible for merging and deleting the branch.