Creates dev microk8s environment using skaffold #4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is a sample solution for a development environment with microk8s. It's related to the Jira tasks RTW-5 and RTW-4 whose requirements are to investigate the whether microk8s can be a valid development environment, and if so, create such an environment.
For this I propose the use of Skaffold, a tool made to help iterate from code to k8s cluster. Specifically, it can watch source files and on changes, build images and re-apply the cluster with those changes automatically. Further, it can sync files between host and container directly to avoid rebuilding images and improve the cycle speed.
I've set it up so that changes to files like Dockerfile and k8s.yaml will trigger a rebuild and redeploy the cluster. While changes to files under src and tests directories sync automatically without rebuilding for performance. Find screen recordings below. Note that the cluster is a bit heavy at least on my weak machine so I can imagine it's not a great development experience for weak machines (but there might be ways to reduce microk8s load). Also this solution doesn't can technically run on a VM and doesn't need to run locally:
Screencast from 07-04-23 13:00:11.webm
Screencast from 07-04-23 13:02:03.webm
Screencast from 07-04-23 13:03:25.webm