Skip to content

Commit

Permalink
*: bump Go dependencies (prometheus-operator#3956)
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
  • Loading branch information
simonpasquier authored Apr 7, 2021
1 parent cec7f2c commit 5c574a7
Show file tree
Hide file tree
Showing 4 changed files with 181 additions and 24 deletions.
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,12 @@ image: .hack-operator-image .hack-prometheus-config-reloader-image
docker build --build-arg ARCH=$(ARCH) --build-arg OS=$(GOOS) -t $(REPO_PROMETHEUS_CONFIG_RELOADER):$(TAG) -f cmd/prometheus-config-reloader/Dockerfile .
touch $@

.PHONY: update-go-deps
update-go-deps:
for m in $$(go list -mod=readonly -m -f '{{ if and (not .Indirect) (not .Main)}}{{.Path}}{{end}}' all); do \
go get $$m; \
done
@echo "Don't forget to run 'make tidy'"

##############
# Generating #
Expand Down
20 changes: 12 additions & 8 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ Maintaining the release branches for older minor releases happens on a best effo

A couple of days before the release, consider submitting a PR against the `master` branch to update the Go dependencies.

```bash
make update-go-deps
```

## Update operand versions

A couple of days before the release, update the [default versions](https://github.com/prometheus-operator/prometheus-operator/blob/f6ce472ecd6064fb6769e306b55b149dfb6af903/pkg/operator/defaults.go#L20-L31) of Prometheus, Alertmanager and Thanos if newer versions are available.
Expand All @@ -51,14 +55,14 @@ Bump the version in the `VERSION` file in the root of the repository.
A number of files have to be re-generated, this is automated with the following make target:

```bash
$ make clean generate
make clean generate
```

Bump the version of the `pkg/apis/monitoring` and `pkg/client` packages in `go.mod`:

```bash
$ go mod edit -require "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring@v$(< VERSION)"
$ go mod edit -require "github.com/prometheus-operator/prometheus-operator/pkg/client@v$(< VERSION)"
go mod edit -require "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring@v$(< VERSION)"
go mod edit -require "github.com/prometheus-operator/prometheus-operator/pkg/client@v$(< VERSION)"
```

Now that all version information has been updated, an entry for the new version can be added to the `CHANGELOG.md` file.
Expand All @@ -81,11 +85,11 @@ From now on, all work happens on the `release-<major>.<minor>` branch.
Tag the new release with a tag named `v<major>.<minor>.<patch>`, e.g. `v2.1.3`. Note the `v` prefix. Tag also the `github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring` module with `pkg/apis/monitoring/v<major>.<minor>.<patch>` and the `github.com/prometheus-operator/prometheus-operator/pkg/client` module with `pkg/client/v<major>.<minor>.<patch>`. You can do the tagging on the commandline:

```bash
$ tag="v$(< VERSION)"
$ git tag -s "${tag}" -m "${tag}"
$ git tag -s "pkg/apis/monitoring/${tag}" -m "pkg/apis/monitoring/${tag}"
$ git tag -s "pkg/client/${tag}" -m "pkg/client/${tag}"
$ git push origin "${tag}" "pkg/apis/monitoring/${tag}" "pkg/client/${tag}"
tag="v$(< VERSION)"
git tag -s "${tag}" -m "${tag}"
git tag -s "pkg/apis/monitoring/${tag}" -m "pkg/apis/monitoring/${tag}"
git tag -s "pkg/client/${tag}" -m "pkg/client/${tag}"
git push origin "${tag}" "pkg/apis/monitoring/${tag}" "pkg/client/${tag}"
```

Signed tag with a GPG key is appreciated, but in case you can't add a GPG key to your Github account using the following [procedure](https://help.github.com/articles/generating-a-gpg-key/), you can replace the `-s` flag by `-a` flag of the `git tag` command to only annotate the tag without signing.
Expand Down
32 changes: 16 additions & 16 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,38 @@ require (
github.com/blang/semver/v4 v4.0.0
github.com/brancz/kube-rbac-proxy v0.8.0
github.com/docker/distribution v2.7.1+incompatible
github.com/evanphx/json-patch/v5 v5.1.0
github.com/evanphx/json-patch/v5 v5.2.0
github.com/ghodss/yaml v1.0.0
github.com/go-kit/kit v0.10.0
github.com/go-openapi/swag v0.19.12
github.com/go-openapi/swag v0.19.15
github.com/gogo/protobuf v1.3.2
github.com/google/go-cmp v0.5.5
github.com/hashicorp/go-version v1.2.1
github.com/hashicorp/go-version v1.3.0
github.com/kylelemons/godebug v1.1.0
github.com/mitchellh/hashstructure v1.0.1-0.20200508175121-8fdbea448aa6
github.com/mitchellh/hashstructure v1.1.0
github.com/oklog/run v1.1.0
github.com/pkg/errors v0.9.1
github.com/prometheus-community/prom-label-proxy v0.2.0
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.46.0
github.com/prometheus-operator/prometheus-operator/pkg/client v0.46.0
github.com/prometheus/alertmanager v0.21.1-0.20200911160112-1fdff6b3f939
github.com/prometheus/client_golang v1.9.0
github.com/prometheus/common v0.15.0
github.com/prometheus/prometheus v1.8.2-0.20210106134434-02e92236a8ba
github.com/stretchr/testify v1.6.1
github.com/thanos-io/thanos v0.17.2
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a
github.com/prometheus/alertmanager v0.21.1-0.20201106142418-c39b78780054
github.com/prometheus/client_golang v1.10.0
github.com/prometheus/common v0.20.0
github.com/prometheus/prometheus v1.8.2-0.20210215121130-6f488061dfb4
github.com/stretchr/testify v1.7.0
github.com/thanos-io/thanos v0.19.0
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
google.golang.org/protobuf v1.26.0
gopkg.in/alecthomas/kingpin.v2 v2.2.6
gopkg.in/yaml.v2 v2.4.0
k8s.io/api v0.20.1
k8s.io/api v0.20.2
k8s.io/apiextensions-apiserver v0.20.1
k8s.io/apimachinery v0.20.1
k8s.io/apimachinery v0.20.5
k8s.io/client-go v12.0.0+incompatible
k8s.io/component-base v0.20.1
k8s.io/component-base v0.20.5
k8s.io/klog v1.0.0
k8s.io/klog/v2 v2.4.0
k8s.io/utils v0.0.0-20201110183641-67b214c5f920
k8s.io/klog/v2 v2.8.0
k8s.io/utils v0.0.0-20210305010621-2afb4311ab10
)

replace (
Expand Down
Loading

0 comments on commit 5c574a7

Please sign in to comment.