#Tyk-K8S-bootstrap
This is a standalone app meant to help with the bootstrapping of the tyk-stack when installed via tyk-helm-charts and its deletion.
a. Creates a basic organization with the values specified in the env vars via the tyk-helm charts b. Creates a user to access the dashboard (values determined as above) c. Bootstraps tyk-portal with a mock page (only if enabled in tyk-helm-charts) d. Creates the secret required for the tyk-operator to work (only if enabled in tyk-helm-charts)
a. Ensures that no failed jobs are still running by deleting them (as they prevented a clean uninstallation of the helm charts) b. Also detects and deletes an existing tyk-operator-secret on helm charts uninstallation
Useful debug/test tips/commands:
If you want to create a k8s kind cluster that also has a local repository where you can push the images generated by the Makefile just run the "local_registry.sh" script. After, the commands below help you with building and pushing the containers to the local repository.
rm bin/bootstrapapp-post && make build-bootstrap-post && docker build -t localhost:5001/bootstrap-tyk-post:$bsVers -f ./.container/image/bootstrap-post/Dockerfile . && docker push localhost:5001/bootstrap-tyk-post:$bsVers
rm bin/bootstrapapp-pre-delete && make build-bootstrap-pre-delete && docker build -t localhost:5001/bootstrap-tyk-pre-delete:$bsVers -f ./.container/image/bootstrap-pre-delete/Dockerfile . & docker push localhost:5001/bootstrap-tyk-pre-delete:$bsVers
The "hack" folder comes with a job (job.yaml) that can be applied directly together with the role.yaml (which contains the ServiceAccount and ClusterRoleBinding) into a namespace running an empty tyk stack for debugging/development purposes.