Skip to content

randomcoww/etcd-wrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

474 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Generate certs and manifests

tofu() {
  set -x
  podman run -it --rm --security-opt label=disable \
    -v $(pwd):$(pwd) \
    -w $(pwd) \
    --net=host \
    ghcr.io/opentofu/opentofu:latest "$@"
  rc=$?; set +x; return $rc
}
tofu -chdir=test init -upgrade && tofu -chdir=test apply

Go build and test

Launch minio for testing

podman play kube test/outputs/minio.yaml

Add etcd binary for testing and run go env

ETCD_VERSION=$(curl -s https://api.github.com/repos/etcd-io/etcd/tags | grep name | head -1 | cut -d '"' -f 4)
podman volume rm etcdvolume -f
podman pull registry.k8s.io/etcd:$ETCD_VERSION
podman volume create \
  --driver image \
  --opt image="registry.k8s.io/etcd:$ETCD_VERSION" etcdvolume

podman run -it --rm \
  -v $(pwd):/go/src \
  -v etcdvolume:/etcd \
  -w /go/src \
  --net host \
  docker.io/golang:alpine sh

Build test container

podman build -t etcd-wrapper .

Run test cluster

podman play kube test/outputs/node0.yaml
podman play kube test/outputs/node1.yaml
podman play kube test/outputs/node2.yaml

Check backups

podman exec minio-mc mc ls m/etcd/integ

About

Etcd with automated backup, restore and member replacement wrapper

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors