diff --git a/CHANGELOG.md b/CHANGELOG.md index 723881c4..f5b51559 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,15 @@ This project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] +## [1.1.5] - 2019-08-23 + +### Added +- "--version" flags to some commands (#66). + +### Changed +- Update k8s.io/client-go to v12.0.0 (#65). +- Update etcd/clientv3 to 3.3.15 (#66). + ## [1.1.4] - 2019-07-11 Just bump version because v1.1.3 is accidentally unreleased. @@ -94,7 +103,8 @@ This is the first release - Implement CNI plugin, coild, coilctl and coil-controller -[Unreleased]: https://github.com/cybozu-go/coil/compare/v1.1.4...HEAD +[Unreleased]: https://github.com/cybozu-go/coil/compare/v1.1.5...HEAD +[1.1.5]: https://github.com/cybozu-go/coil/compare/v1.1.4...v1.1.5 [1.1.4]: https://github.com/cybozu-go/coil/compare/v1.1.3...v1.1.4 [1.1.3]: https://github.com/cybozu-go/coil/compare/v1.1.2...v1.1.3 [1.1.2]: https://github.com/cybozu-go/coil/compare/v1.1.1...v1.1.2 diff --git a/RELEASE.md b/RELEASE.md index aea95bca..08ea500a 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -37,15 +37,16 @@ Bump version 2. Checkout `master` branch. 3. Make a branch to release, for example by `git neco dev "$VERSION"` 4. Edit `CHANGELOG.md` for the new version ([example][]). -5. Commit the change and push it. +5. Edit `version.go` for the new version. +6. Commit the changes and push it. ```console $ git commit -a -m "Bump version to $VERSION" $ git neco review ``` -6. Merge this branch. -7. Checkout `master` branch. -8. Add a git tag, then push it. +7. Merge this branch. +8. Checkout `master` branch. +9. Add a git tag, then push it. ```console $ git tag "v$VERSION" diff --git a/go.mod b/go.mod index df59f348..26617995 100644 --- a/go.mod +++ b/go.mod @@ -3,14 +3,15 @@ module github.com/cybozu-go/coil require ( github.com/containernetworking/cni v0.6.0 github.com/containernetworking/plugins v0.7.4 - github.com/coreos/etcd v0.0.0-20190816232144-5cf5d88a18ae + github.com/coreos/etcd v3.3.15+incompatible github.com/coreos/go-iptables v0.4.0 // indirect - github.com/cybozu-go/etcdutil v1.3.2 + github.com/cybozu-go/etcdutil v1.3.3 github.com/cybozu-go/log v1.5.0 github.com/cybozu-go/netutil v1.2.0 github.com/cybozu-go/well v1.8.1 github.com/google/go-cmp v0.3.0 github.com/googleapis/gnostic v0.2.0 // indirect + github.com/inconshreveable/mousetrap v1.0.0 // indirect github.com/mitchellh/go-homedir v1.0.0 github.com/mitchellh/mapstructure v1.0.0 github.com/onsi/ginkgo v1.8.0 diff --git a/mtest/Makefile b/mtest/Makefile index 648d1932..e6b90e1a 100644 --- a/mtest/Makefile +++ b/mtest/Makefile @@ -14,13 +14,13 @@ endif PLACEMAT = /usr/bin/placemat GINKGO = env GOFLAGS=-mod=vendor $(GOPATH)/bin/ginkgo CURL = curl -fsL -MANAGEMENT_ETCD_VERSION = 3.3.14 -VAULT_VERSION = 1.0.2 -K8S_VERSION = 1.14.1 +MANAGEMENT_ETCD_VERSION = 3.3.15 +VAULT_VERSION = 1.2.2 +K8S_VERSION = 1.15.3 PLACEMAT_DATADIR = /var/scratch/placemat VM_SHARED_DIR = /mnt/placemat CONTAINERD_VERSION = 1.2.7 -CRITOOLS_VERSION = 1.14.0 +CRITOOLS_VERSION = 1.15.0 CT_VERSION = 0.9.0 CT = /usr/local/bin/ct SUDO = sudo diff --git a/mtest/pod.go b/mtest/pod.go index a56edfe3..215a157a 100644 --- a/mtest/pod.go +++ b/mtest/pod.go @@ -220,7 +220,7 @@ func TestPod() { coilctlSafe("pool", "show", "--json", "default", addressPool) By("creating 4 pods to node1") - overrides := fmt.Sprintf(`{ "apiVersion": "apps/v1beta1", "spec": { "template": { "spec": { "nodeSelector": { "kubernetes.io/hostname": "%s" } } } } }`, node1) + overrides := fmt.Sprintf(`{ "apiVersion": "apps/v1", "spec": { "template": { "spec": { "nodeSelector": { "kubernetes.io/hostname": "%s" } } } } }`, node1) overrideFile := remoteTempFile(overrides) _, stderr, err := kubectl("run", "nginx", "--image=nginx", "--replicas=4", "--overrides=\"$(cat "+overrideFile+")\"") Expect(err).NotTo(HaveOccurred(), "stderr: %s", stderr) diff --git a/mtest/setup-cke.sh b/mtest/setup-cke.sh index 17e05d1f..0887c049 100755 --- a/mtest/setup-cke.sh +++ b/mtest/setup-cke.sh @@ -2,7 +2,7 @@ VAULT=/data/vault CKECLI=/opt/bin/ckecli -CKE_VERSION=1.14.0-rc1 +CKE_VERSION=1.15.0-rc.1 if [ ! -f /usr/bin/jq ]; then echo "please wait; cloud-init will install jq." diff --git a/pkg/coil-controller/cmd/root.go b/pkg/coil-controller/cmd/root.go index 92f41128..20e55b18 100644 --- a/pkg/coil-controller/cmd/root.go +++ b/pkg/coil-controller/cmd/root.go @@ -29,8 +29,9 @@ var etcdConfig *etcdutil.Config // rootCmd represents the base command when called without any subcommands var rootCmd = &cobra.Command{ - Use: "coil-controller", - Short: "A kubernetes controller for coil", + Use: "coil-controller", + Version: coil.Version, + Short: "A kubernetes controller for coil", Long: `coil-controller is a Kubernetes controller to maintain coil resources. It should be deployed as a Deployment pod in Kunernetes. diff --git a/pkg/coilctl/cmd/root.go b/pkg/coilctl/cmd/root.go index 226a39e8..76c10432 100644 --- a/pkg/coilctl/cmd/root.go +++ b/pkg/coilctl/cmd/root.go @@ -40,8 +40,9 @@ var etcdConfig *etcdutil.Config // rootCmd represents the base command when called without any subcommands var rootCmd = &cobra.Command{ - Use: "coilctl", - Short: "control and show coil settings", + Use: "coilctl", + Version: coil.Version, + Short: "control and show coil settings", Long: `coilctl is a command-line tool to control and show coil settings. It directly communicates with etcd. You need to prepare a diff --git a/pkg/coild/cmd/root.go b/pkg/coild/cmd/root.go index ef8f9997..f4a7a39c 100644 --- a/pkg/coild/cmd/root.go +++ b/pkg/coild/cmd/root.go @@ -54,8 +54,9 @@ var etcdConfig *etcdutil.Config // rootCmd represents the base command when called without any subcommands var rootCmd = &cobra.Command{ - Use: "coild", - Short: "Backend service to allocate IP address", + Use: "coild", + Version: coil.Version, + Short: "Backend service to allocate IP address", Long: `coild is a backend service to allocate IP address. It normally run as a DaemonSet container in Kubernetes. diff --git a/vendor/github.com/cybozu-go/etcdutil/CHANGELOG.md b/vendor/github.com/cybozu-go/etcdutil/CHANGELOG.md index e633345c..82e73c49 100644 --- a/vendor/github.com/cybozu-go/etcdutil/CHANGELOG.md +++ b/vendor/github.com/cybozu-go/etcdutil/CHANGELOG.md @@ -5,6 +5,10 @@ This project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] +## [1.3.3] - 2019-08-20 +### Changed +- Update etcd client library as of [etcd-3.3.15](https://github.com/etcd-io/etcd/releases/tag/v3.3.15). + ## [1.3.2] - 2019-08-19 ### Changed - Update etcd client library as of [etcd-3.3.14](https://github.com/etcd-io/etcd/releases/tag/v3.3.14). @@ -38,7 +42,8 @@ This project adheres to [Semantic Versioning](http://semver.org/). This is the first release. -[Unreleased]: https://github.com/cybozu-go/etcdutil/compare/v1.3.2...HEAD +[Unreleased]: https://github.com/cybozu-go/etcdutil/compare/v1.3.3...HEAD +[1.3.3]: https://github.com/cybozu-go/etcdutil/compare/v1.3.2...v1.3.3 [1.3.2]: https://github.com/cybozu-go/etcdutil/compare/v1.3.1...v1.3.2 [1.3.1]: https://github.com/cybozu-go/etcdutil/compare/v1.3.0...v1.3.1 [1.3.0]: https://github.com/cybozu-go/etcdutil/compare/v1.2.2...v1.3.0 diff --git a/vendor/github.com/cybozu-go/etcdutil/flags.go b/vendor/github.com/cybozu-go/etcdutil/flags.go index c3c44631..60567f7f 100644 --- a/vendor/github.com/cybozu-go/etcdutil/flags.go +++ b/vendor/github.com/cybozu-go/etcdutil/flags.go @@ -21,16 +21,16 @@ func (v endpointsVal) String() string { func (v endpointsVal) Set(s string) error { endpoints := strings.Split(s, ",") - filterd := endpoints[:0] + filtered := endpoints[:0] for _, e := range endpoints { if len(e) != 0 { - filterd = append(filterd, e) + filtered = append(filtered, e) } } - if len(filterd) == 0 { + if len(filtered) == 0 { return errors.New("no endpoints") } - v.Config.Endpoints = filterd + v.Config.Endpoints = filtered return nil } diff --git a/vendor/github.com/cybozu-go/etcdutil/go.mod b/vendor/github.com/cybozu-go/etcdutil/go.mod index ef271064..9221a20f 100644 --- a/vendor/github.com/cybozu-go/etcdutil/go.mod +++ b/vendor/github.com/cybozu-go/etcdutil/go.mod @@ -2,29 +2,48 @@ module github.com/cybozu-go/etcdutil require ( github.com/BurntSushi/toml v0.3.1 + github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 // indirect github.com/coreos/bbolt v1.3.3 // indirect - github.com/coreos/etcd v0.0.0-20190816232144-5cf5d88a18ae + github.com/coreos/etcd v3.3.15+incompatible + github.com/coreos/go-semver v0.2.0 // indirect github.com/coreos/go-systemd v0.0.0-20181004131557-b14d3eb023cc // indirect github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f // indirect github.com/dgrijalva/jwt-go v3.2.0+incompatible // indirect + github.com/gogo/protobuf v1.2.1 // indirect github.com/golang/groupcache v0.0.0-20180924190550-6f2cf27854a4 // indirect + github.com/golang/protobuf v1.3.2 // indirect + github.com/google/btree v1.0.0 // indirect + github.com/google/uuid v1.0.0 // indirect github.com/gorilla/websocket v1.4.0 // indirect + github.com/grpc-ecosystem/go-grpc-middleware v1.0.0 // indirect github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect github.com/grpc-ecosystem/grpc-gateway v1.5.1 // indirect + github.com/jonboulle/clockwork v0.1.0 // indirect + github.com/json-iterator/go v1.1.7 // indirect github.com/konsorten/go-windows-terminal-sequences v1.0.1 // indirect github.com/kr/pretty v0.1.0 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect + github.com/modern-go/reflect2 v1.0.1 // indirect + github.com/pkg/errors v0.8.1 // indirect github.com/prometheus/client_golang v0.8.0 // indirect github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910 // indirect github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e // indirect github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d // indirect github.com/sirupsen/logrus v1.1.1 // indirect + github.com/soheilhy/cmux v0.1.4 // indirect github.com/spf13/pflag v1.0.3 github.com/tmc/grpc-websocket-proxy v0.0.0-20171017195756-830351dc03c6 // indirect + github.com/xiang90/probing v0.0.0-20160813154853-07dd2e8dfe18 // indirect go.etcd.io/bbolt v1.3.3 // indirect go.uber.org/atomic v1.4.0 // indirect + go.uber.org/multierr v1.1.0 // indirect + go.uber.org/zap v1.10.0 // indirect + golang.org/x/net v0.0.0-20190813000000-74dc4d7220e7 // indirect + golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223 // indirect golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2 // indirect google.golang.org/genproto v0.0.0-20181004005441-af9cb2a35e7f // indirect google.golang.org/grpc v1.23.0 gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect + gopkg.in/yaml.v2 v2.2.2 // indirect sigs.k8s.io/yaml v1.1.0 ) diff --git a/vendor/modules.txt b/vendor/modules.txt index e1e92f5f..5a0f0fab 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -11,7 +11,7 @@ github.com/containernetworking/plugins/pkg/ipam github.com/containernetworking/plugins/pkg/ns github.com/containernetworking/plugins/pkg/utils/hwaddr github.com/containernetworking/plugins/pkg/utils/sysctl -# github.com/coreos/etcd v0.0.0-20190816232144-5cf5d88a18ae +# github.com/coreos/etcd v3.3.15+incompatible github.com/coreos/etcd/clientv3 github.com/coreos/etcd/clientv3/clientv3util github.com/coreos/etcd/clientv3/namespace @@ -35,7 +35,7 @@ github.com/coreos/go-iptables/iptables github.com/coreos/go-systemd/journal # github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f github.com/coreos/pkg/capnslog -# github.com/cybozu-go/etcdutil v1.3.2 +# github.com/cybozu-go/etcdutil v1.3.3 github.com/cybozu-go/etcdutil # github.com/cybozu-go/log v1.5.0 github.com/cybozu-go/log diff --git a/version.go b/version.go new file mode 100644 index 00000000..9dda30f9 --- /dev/null +++ b/version.go @@ -0,0 +1,4 @@ +package coil + +// Version represents the version of coil +const Version = "1.1.5"