# TiDB Quote Calculator

This is a price calculator developed for the TiDB product, using SvelteKit for development.

## Developing

Once you've created a project and installed dependencies with `pnpm install`, start a development server:

```bash
pnpm run dev

# or start the server and open the app in a new browser tab
pnpm run dev -- --open
```

## Building for local

To create a production version of your app:

```bash
pnpm run build
```

You can preview the production build with `pnpm run preview`.

## Building and deploy for production

```bash
# remember to modify the version
docker build --tag asia-east2-docker.pkg.dev/gcp-digital-infra/cicd-repo/quotecalc:x.x.x . 
# then push
docker push asia-east2-docker.pkg.dev/gcp-digital-infra/cicd-repo/quotecalc:x.x.x
# cd k8s
cd ./k8s
# set image
kustomize edit set image quotecalc:latest=asia-east2-docker.pkg.dev/gcp-digital-infra/cicd-repo/quotecalc:x.x.x
# deploy
kustomize build . | kubectl apply -f -
```

TODO: add github CICD


