Skip to content

Commit

Permalink
extract local development
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Wiesner committed May 13, 2023
1 parent 8b8b95e commit 0b3e53d
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 31 deletions.
32 changes: 1 addition & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,37 +103,7 @@ curl --request POST 'https://<SEALED_SECRETS_WEB_BASE_URL>/api/validate' \
For development, we are using a local Kubernetes cluster using kind. When the cluster is created we install **Sealed Secrets** using Helm:

```sh
# install registry
docker run -d --restart=always -p "127.0.0.1:5001:5000" --name kind-registry registry:2

# startup kind
curl -L https://raw.githubusercontent.com/bakito/kind-with-registry-action/main/kind-config.yaml -o testdata/e2e/kind-config.yaml
kind create cluster --config=testdata/e2e/kind-config.yaml

# setup registry
docker network connect kind kind-registry
kubectl apply -f https://raw.githubusercontent.com/bakito/kind-with-registry-action/main/configmap-registry.yaml

# setup ingress
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yaml
kubectl wait --namespace ingress-nginx \
--for=condition=ready pod \
--selector=app.kubernetes.io/component=controller \
--timeout=90s

# build image
./testdata/e2e/buildImage.sh

# install sealed secrets
helm repo add sealed-secrets https://bitnami-labs.github.io/sealed-secrets
helm install sealed-secrets sealed-secrets/sealed-secrets \
--namespace sealed-secrets \
--create-namespace \
--atomic

# install sealed secrets web
./testdata/e2e/installSealedSecretsWebChart.sh yaml

./run_local.sh
```

Access the interface via http://localhost/ssw
34 changes: 34 additions & 0 deletions run_local.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/sh

set -eo pipefail

# install registry
docker run -d --restart=always -p "127.0.0.1:5001:5000" --name kind-registry registry:2

# startup kind
curl -L https://raw.githubusercontent.com/bakito/kind-with-registry-action/main/kind-config.yaml -o testdata/e2e/kind-config.yaml
kind create cluster --config=testdata/e2e/kind-config.yaml

# setup registry
docker network connect kind kind-registry
kubectl apply -f https://raw.githubusercontent.com/bakito/kind-with-registry-action/main/configmap-registry.yaml

# setup ingress
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yaml
kubectl wait --namespace ingress-nginx \
--for=condition=ready pod \
--selector=app.kubernetes.io/component=controller \
--timeout=90s

# build image
./testdata/e2e/buildImage.sh

# install sealed secrets
helm repo add sealed-secrets https://bitnami-labs.github.io/sealed-secrets
helm install sealed-secrets sealed-secrets/sealed-secrets \
--namespace sealed-secrets \
--create-namespace \
--atomic

# install sealed secrets web
./testdata/e2e/installSealedSecretsWebChart.sh yaml

0 comments on commit 0b3e53d

Please sign in to comment.