Skip to content

Automatic rollout kubernetes deployments on Loco translations updates.

Notifications You must be signed in to change notification settings

graillus/translations-refresher

Repository files navigation

translations-refresher

Automatic rollout kubernetes deployments on Loco translations updates.

Usage

Run the app locally

go run *.go -kubeconfig ~/.kube/config

Build docker image

docker build -t translations-refresher:test .

Install Helm chart

helm install translations-refresher deploy/helm

Testing

  1. Install Kind (Kubernetes IN Docker) https://kind.sigs.k8s.io/docs/user/quick-start/#installation

  2. Launch the local cluster

kind create cluster --name translations --config test/cluster.yaml
  1. Load the docker image inside the cluster
kind load docker-image translations-refresher:test --name translations
  1. Install the chart
helm install translations-refresher deploy/helm \
    --set image.tag=test \
    --set env.LOCO_API_KEY_DOCUMENTS=<loco_api_key> \
    --set env.LOCO_API_KEY_CATALOG=<loco_api_key> \
    --set env.LOCO_API_KEY_EMAILS=<loco_api_key>
  1. Install the test deployment
kubectl apply -f test/deployment.yaml

The refresher is now running in the cluster and should have mutated the test deployment.

kubectl describe deployment/test-app