Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce faster build times for kubernetes development #3664

Closed
sotojn opened this issue Jun 20, 2024 · 0 comments
Closed

Introduce faster build times for kubernetes development #3664

sotojn opened this issue Jun 20, 2024 · 0 comments
Assignees
Labels
enhancement k8s Applies to Teraslice in kubernetes cluster mode only. performance

Comments

@sotojn
Copy link
Contributor

sotojn commented Jun 20, 2024

As of right now the development workflow for kubernetes is as follows:

  1. Run yarn k8s to build teraslice image and create all resources needed in kindcluster
  2. Test build
  3. Make a change to teraslice code
  4. Run yarn k8s:rebuild which triggers the following:
    4.1. Deletes teraslice deployment resource
    4.2. Rebuilds teraslice image and re-uploads to kubernetes control plane
    4.3. Re-creates teraslice deployment resource
  5. Repeat starting from step 2

My proposal is optimizing steps 1 and 4 because building the docker image takes up a significant amount of time. Build times can take anywhere from 1-2 minutes each time not including the time it takes to redeploy the resource and upload the image to kubernetes.

If we instead give the master deployment the base image and provide a volume of the host machines repo, we can completely skip the build step and make instant changes with build:watch running. Perhaps we can also change yarn k8s:rebuild to simply restart the master pod which would re-trigger the node service command.

@sotojn sotojn self-assigned this Jun 20, 2024
@sotojn sotojn added enhancement k8s Applies to Teraslice in kubernetes cluster mode only. performance labels Jun 20, 2024
@godber godber closed this as completed Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement k8s Applies to Teraslice in kubernetes cluster mode only. performance
Projects
None yet
Development

No branches or pull requests

2 participants