Release Process
Overview
A release for the bpfd project is comprised of the following major components:
- bpfd + bpfctl binaries
- Core GRPC API protobuf definitions
- Kubernetes Custom Resource Definitions (CRDs)
- Corresponding go pkg in the form of
github.com/bpfd-dev/bpfd
which includes the following: github.com/bpfd-dev/bpfd/clients/gobpfd/v1
: The go client for the bpfd GRPC APIgithub.com/bpfd-dev/bpfd/bpfd-operator/apis
: The go bindings for the bpfd CRD APIgithub.com/bpfd-dev/bpfd/bpfd-operator/pkg/client
: The autogenerated clientset for the bpfd CRD APIgithub.com/bpfd-dev/bpfd/bpfd-operator/pkg/helpers
: The provided bpfd CRD API helpers.- Corresponding
bpfd-api
,bpfd
, andbpfctl
rust crates which house the rust client for the bpfd GRPC API - The following core component container images with tag
: quay.io/bpfd/bpfd
quay.io/bpfd/bpfctl
quay.io/bpfd/bpfd-operator
quay.io/bpfd/bpfd-agent
quay.io/bpfd/bpfd-operator-bundle
quay.io/bpfd/xdp-dispatcher
quay.io/bpfd/tc-dispatcher
- The relevant example bytecode container images with tag
from source code located in the bpfd project: quay.io/bpfd-bytecode/go_xdp_counter
quay.io/bpfd-bytecode/go_tc_counter
quay.io/bpfd-bytecode/go_tracepoint_counter
quay.io/bpfd-bytecode/xdp_pass
quay.io/bpfd-bytecode/tc_pass
quay.io/bpfd-bytecode/tracepoint
quay.io/bpfd-bytecode/xdp_pass_private
quay.io/bpfd-bytecode/uprobe
quay.io/bpfd-bytecode/kprobe
quay.io/bpfd-bytecode/uretprobe
quay.io/bpfd-bytecode/kretprobe
- The relevant example userspace container images with tag
from source code located in the bpfd project: quay.io/bpfd-userspace/go_xdp_counter
quay.io/bpfd-userspace/go_tc_counter
quay.io/bpfd-userspace/go_tracepoint_counter
- The OLM (Operator Lifecycle Manager) for the Kubernetes Operator.
- This includes a
bundle
directory on disk as well as thequay.io/bpfd/bpfd-operator-bundle
with the tag.
Versioning strategy
Overview
Each new release of bpfd is defined with a "bundle version" that
represents the Git tag of a release, such as v0.4.0
. This contains the
components described above
Kubernetes API Versions (e.g. v1alpha2, v1beta1)
Within the bpfd-operator, API versions are primarily used to indicate the stability of a resource. For example, if a resource has not yet graduated to beta, it is still possible that it could either be removed from the API or changed in backwards incompatible ways. For more information on API versions, refer to the full Kubernetes API versioning documentation.
Releasing a new version
Writing a Changelog
To simplify release notes generation, we recommend using the Kubernetes release notes generator:
go install k8s.io/release/cmd/release-notes@latest
export GITHUB_TOKEN=your_token_here
release-notes --start-sha EXAMPLE_COMMIT --end-sha EXAMPLE_COMMIT --branch main --repo bpfd --org bpfd-dev
This output will likely need to be reorganized and cleaned up a bit, but it
provides a good starting point. Once you're satisfied with the changelog, create
a PR. This must go through the regular PR review process and get merged into the
main
branch. Approval of the PR indicates community consensus for a new
release.
Release Steps
The following steps must be done by one of the bpfd maintainers:
For a PATCH release:
- Create a new branch in your fork named something like
<githubuser>/release-x.x.x
. Use the new branch in the upcoming steps. - Use
git
to cherry-pick all relevant PRs into your branch. - Create a branch from the major-minor tag of interest i.e:
git checkout -b release-x.x.x <major.minor.patch>
- Create a pull request of the
<githubuser>/release-x.x.x
branch into therelease-x.x
branch upstream. Add a hold on this PR waiting for at least one maintainer/codeowner to provide algtm
. This PR should: - Add a new changelog for the release
- Update the cargo.toml versions for the bpfd-api, bpfd, and bpfctl crates
- Update the bpfd-operator version in it's MAKEFILE and run
make bundle
to update the bundle version. This will generate a new/bpfd-operator/bundle
directory which will ONLY be tracked in therelease-x.x
branch notmain
. - Verify the CI tests pass and merge the PR into
release-x.x
. - Create a tag using the
HEAD
of therelease-x.x.x
branch. This can be done using thegit
CLI or Github's release page. - The Release will be automatically created, after that is complete do the following:
- run
make build-release-yamls
and attach the yamls for the version to the release. These will include:bpfd-crds-install-vx.x.x.yaml
bpfd-operator-install-vx.x.x.yaml
go-xdp-counter-install-vx.x.x.yaml
go-tc-counter-install-vx.x.x.yaml
go-tracepoint-counter-install-vx.x.x.yaml
- Update the community-operator and
community-operators-prod repositories with
the latest bundle manifests. See the following PRs as examples:
- https://github.com/redhat-openshift-ecosystem/community-operators-prod/pull/2696
- https://github.com/k8s-operatorhub/community-operators/pull/2790
For a MAJOR or MINOR release:
- Open an update PR that:
- Adds a new changelog for the release
- Updates the cargo.toml versions for the bpfd-api, bpfd, and bpfctl crates
- Updates the bpfd-operator version in it's MAKEFILE and run
make bundle
to update the bundle version - Add's a new
examples
config directory for the release version - Make sure CI is green and merge the update PR.
- Create a tag using the
HEAD
of themain
branch. This can be done using thegit
CLI or Github's release page. - Tag the release using the commit on
main
where the changelog update merged. This can be done using thegit
CLI or Github's release page. - The Release will be automatically created, after that is complete do the following:
- run
make build-release-yamls
and attach the yamls for the version to the release. These will include:bpfd-crds-install-vx.x.x.yaml
bpfd-operator-install-vx.x.x.yaml
go-xdp-counter-install-vx.x.x.yaml
go-tc-counter-install-vx.x.x.yaml
go-tracepoint-counter-install-vx.x.x.yaml