Update outdated packages and upgrade to Go 1.22 (#8)
- Update outdated packages and upgrade to Go 1.22
Signed-off-by: retornam retornam@users.noreply.github.com
- Update outdated packages and upgrade to Go 1.24
Signed-off-by: retornam retornam@users.noreply.github.com
Signed-off-by: retornam retornam@users.noreply.github.com
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802032778号
discovery.etcd.io
This code powers the public service at https://discovery.etcd.io. The API is documented in the etcd clustering documentation.
Building with Docker
Requirements
Docker, using one of the following configurations:
To build the image with Docker run:
$ cd path/to/discoveryserver$ docker build -t discoveryserver .To create and execute the discoveryserver container run:
docker run discoveryserverBuilding on a local OS/shell environment
Go
Discoveryserver is written in Go. If you don’t have a Go development environment, please set one up.
Go modules
Discovery server uses Go modules, so that we need a Go version greater than or equal to 1.11.
Build the binary:
go build -v -o ./bin/discovery .Test
./test.shConfiguration
The service has three configuration options, and can be configured with either runtime arguments or environment variables.
--addr/DISC_ADDR: the address to run the service on, including port.--host/DISC_HOST: the host url to prepend to/newrequests.--etcd/DISC_ETCD: the url of the etcd endpoint backing the instance.Production Configuration
See https://github.com/etcd-io/discovery.etcd.io for how the service is run on Kubernetes.
History
This package implements a super minimal etcd v2 API built on the currently incomplete [v2v3 package]. We need to do this because the public etcd discovery service has been running on the inefficient v2 storage engine and causing operational burden.
Further, to solve operational issues using the v3 API will enable us to use the backup features of the etcd Operator.
Run Cloudbuild
Cloudbuild is a GCP service that can be used to build and deploy discoveryserver. cloudbuild.dev.yaml builds discoverserver, publishes the docker image, and deploys to the dev environment. Cloudbuild.prod.yaml deploys a built docker image to the production environment.