The files in this folder are patches and additions to the base configuration stored in the bases folder. These patches and additions provide all the needed tweaks and configuration needed to run the app locally in Minikube.
Credentials needed for the app to run in dev mode are stored in Kubernetes secrets that are generated by kustomize from .env files. The following files will need to exist:
This file stores credentials for the api to talk to the database, notify and other auth related values. An example:
$ cat api.env
DB_USER=track_dmarc
DB_PASS=somepassword
DB_HOST=postgres
DB_PORT=5432
DB_NAME=track_dmarc
BASE32_SECRET=somestring
SUPER_SECRET_KEY=anotherstring
SUPER_SECRET_SALT=yetanotherstring
NOTIFICATION_API_KEY=test_key-yournotify-test-key
NOTIFICATION_API_URL=https://api.notification.alpha.canada.ca
SA_USER_NAME=superadmin@somedomain.com
SA_PASSWORD=averysecurepassword
SA_DISPLAY_NAME=SuperUser
TOKEN_KEY=test_jwt_token
DMARC_REPORT_API_URL=https://dmarc-reports.com
DMARC_REPORT_API_TOKEN=a.jwt.token
Kiali is an observabilty dashboard for Istio. It looks for a login credentials stored in a secret and uses those for the login credentials.
With minikube running and the app installed you can access kiali with the command istioctl dashboard kiali.
$ cat kiali.env
username=someuser
passphrase=somepasswordforkiali
The official Postgres Docker image accepts credentials that postgres uses to create a default user and database. Whatever password you set here has to match the value in the api's DB_PASS variable.
$ cat postgres.env
POSTGRES_USER=track_dmarc
POSTGRES_PASSWORD=somepasswordFor our scanners to work they need to insert results into the database, so we need credentials for them to do that too.
$ cat overlays/minikube/scanners.env
DB_USER=track_dmarc
DB_PASS=somepassword
DB_HOST=postgres
DB_NAME=track_dmarc
SA_USER_NAME=superadmin@somedomain.com
SA_PASSWORD=averysecurepassword
SA_DISPLAY_NAME=SuperUserWith those files created you can start minikube and the app with the following commands in root directory. Both minikube and Istio require a lot of resources... so throw everything you can at it.
minikube start --cpus 4 --memory 20480
kustomize build platform/overlays/minikube | kubectl apply -f -
minikube service list