...

Text file src/edge-infra.dev/cmd/edge/bannerctl/README.md

Documentation: edge-infra.dev/cmd/edge/bannerctl

     1# Banner Controller
     2
     3### How to run the bannerctl locally
     4- Create a .env file in the cmd/bannerctl directory
     5- Add the following environment variables needed to run the bannerctl, CHARIOT_ENDPOINT, DOMAIN, GCP_FOREMAN_PROJECT_ID, GCP_PLAT_INFRA_PROJECT_ID, GCP_TENANTS_FOLDER_ID, REGISTRY_PROJECT_ID, REGISTRY_RESOURCE_ID, GOOGLE_APPLICATION_CREDENTIALS. P.S. if you do not know these values, you can obtain them from a currently running bannerctl pod in dev0 foreman.
     6- The GOOGLE_APPLICATION_CREDENTIALS will be the path to the bannerctl service account
     7- Set your kubectl context to the context of the kubernetes cluster you will like to run the controller against.
     8- For VSCode users you can add a new configuration to your launch.json file that will look like so
     9
    10```
    11{
    12    "name": "Bannerctl",
    13    "type": "go",
    14    "request": "launch",
    15    "mode": "debug",
    16    "program": "${workspaceFolder}/cmd/bannerctl",
    17    "envFile": "${workspaceFolder}/cmd/bannerctl/.env"
    18},
    19``` 
    20This will enable you to run the bannerctl in debug mode with the advantages of adding breakpoints and stepping into and through functions.

View as plain text