Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
/test-suite.kind-config.yaml
/test-suite.kind-config.calico.yaml
/docker_mirror_cache
/docker_mirror_certs
39 changes: 39 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,42 @@ Documentation on probes for pod startup is [here](https://kubernetes.io/docs/con
$ docker run --rm --interactive --detach --network host --name ct "--volume=$(pwd):/workdir" "--workdir=/workdir" --volume=$(pwd)/default.ct.yaml:/etc/ct/ct.yaml quay.io/helmpack/chart-testing:latest cat
$ docker exec ct ct lint
```

### Run lagoon-remote and lagoon-core in a local kind cluster

#### Create the kind cluster

```shell
make create-kind-cluster
```

#### Configure local cache

This step is optional but makes local image pulls much faster.

Start the local image registry cache in another terminal:

```shell
docker run --rm -it \
--name docker_registry_proxy \
--net kind \
--hostname docker-registry-proxy \
-e ENABLE_MANIFEST_CACHE=true \
-v $(pwd)/docker_mirror_cache:/docker_mirror_cache \
-v $(pwd)/docker_mirror_certs:/ca \
-v $(pwd)/resolvers.conf:/etc/nginx/resolvers.conf \
-e REGISTRIES="k8s.gcr.io gcr.io quay.io registry.k8s.io" \
rpardini/docker-registry-proxy:0.6.4
```

Configure kind to use the proxy:

```shell
./configure-kind-node-proxy
```

#### Install Lagoon Core and Remote

```shell
make install-lagoon-remote
```
13 changes: 13 additions & 0 deletions configure-kind-node-proxy
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh
KIND_NAME=${1-chart-testing}
SETUP_URL=http://docker-registry-proxy:3128/setup/systemd
pids=""
for NODE in $(kind get nodes --name "$KIND_NAME"); do
docker exec "$NODE" sh -c "\
curl $SETUP_URL \
| sed s/docker\.service/containerd\.service/g \
| sed '/Environment/ s/$/ \"NO_PROXY=127.0.0.0\/8,10.0.0.0\/8,172.16.0.0\/12,192.168.0.0\/16\"/' \
| bash" &
pids="$pids $!" # Configure every node in background
done
wait $pids # Wait for all configurations to end
1 change: 1 addition & 0 deletions resolvers.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
resolver 127.0.0.11 ipv6=off;