Kubernetes operator which will dynamically or statically provision AWS S3 Bucket storage and access.
The project uses a kind cluster for development and test purposes.
Requirements:
kind
: v0.17.0controller-gen
> 0.4kustomize
>= 4.0docker
: latest versiongolang
>= 1.17
This script will create kind cluster, build image of the controller and deploy it, deploy kong ingress controller and will run local aws on cluster with ingress (localstack)
sh ./hack/scripts/runLocalEnv.sh # you might need to run this as sudo if a regular user can't use docker
Set up on non-local env
Todo
go test ./controllers/... -v
The tests run against your local kind cluster and the localstack service that run on your cluster.
run tests:
1. upload local env:
1.1. sh ./hack/scripts/runLocalEnv.sh
2. go test ./tests/systemTest/system_test.go -v # -v flag for log all tests as they are run
The integretion tests test the functionality of integration between deploying/update app to deploying new s3bucket
run tests:
- deploy local env -> see (Quick-Start)
- Run
sh ./tests/integrationTests/testApp/uploadApp.sh
go test ./tests/integrationTests/integration_test.go -timeout 120s -v
The recommended development flow is based on Tilt - it is used for quick iteration on code running in live containers. Setup based on official docs can be found in the Tiltfile.
Prerequisites:
- Install the Tilt tool
- Run
sh ./hack/scripts/runLocalEnv.sh
- Run
tilt up
and go the indicated localhost webpage
> tilt up
Tilt started on http://localhost:10350/
v0.22.15, built 2021-10-29
(space) to open the browser
(s) to stream logs (--stream=true)
(t) to open legacy terminal mode (--legacy=true)
(ctrl-c) to exit