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/bpfdwhich 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, andbpfctlrust crates which house the rust client for the bpfd GRPC API - The following core component container images with tag
: quay.io/bpfd/bpfdquay.io/bpfd/bpfctlquay.io/bpfd/bpfd-operatorquay.io/bpfd/bpfd-agentquay.io/bpfd/bpfd-operator-bundlequay.io/bpfd/xdp-dispatcher- The relevant example bytecode container images with tag
from source code located in the bpfd project: quay.io/bpfd-bytecode/go_xdp_counterquay.io/bpfd-bytecode/go_tc_counterquay.io/bpfd-bytecode/go_tracepoint_counterquay.io/bpfd-bytecode/xdp_passquay.io/bpfd-bytecode/tc_passquay.io/bpfd-bytecode/tracepointquay.io/bpfd-bytecode/xdp_pass_privatequay.io/bpfd-bytecode/uprobequay.io/bpfd-bytecode/kprobequay.io/bpfd-bytecode/uretprobequay.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_counterquay.io/bpfd-userspace/go_tc_counterquay.io/bpfd-userspace/go_tracepoint_counter- The OLM (Operator Lifecycle Manager) for the Kubernetes Operator.
- This includes a
bundledirectory on disk as well as thequay.io/bpfd/bpfd-operator-bundlewith 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
gitto 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.xbranch into therelease-x.xbranch 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 bundleto update the bundle version. This will generate a new/bpfd-operator/bundledirectory which will ONLY be tracked in therelease-x.xbranch notmain. - Verify the CI tests pass and merge the PR into
release-x.x. - Create a tag using the
HEADof therelease-x.x.xbranch. This can be done using thegitCLI or Github's release page. - The Release will be automatically created, after that is complete do the following:
- run
make build-crd-install-yamland attach the crd install yaml for the version to the release. - manually build and attach a
bpfd-operator-install-vx.x.x.yamlto provide an easy to use install yaml for the bpfd-operator. - manually build and attach the following files:
go-xdp-counter-install-vx.x.x.yamlgo-tc-counter-install-vx.x.x.yamlgo-tracepoint-counter-install-vx.x.x.yamlso that the examples for a given release can be easily deployed.
- 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 bundleto update the bundle version - Add's a new
examplesconfig directory for the release version - Make sure CI is green and merge the update PR.
- Create a tag using the
HEADof themainbranch. This can be done using thegitCLI or Github's release page. - Tag the release using the commit on
mainwhere the changelog update merged. This can be done using thegitCLI or Github's release page. - The Release will be automatically created, after that is complete do the following:
- run
make build-crd-install-yamland attach the crd install yaml for the version to the release. - manually build and attach a
bpfd-operator-install-vx.x.x.yamlto provide an easy to use install yaml for the bpfd-operator. - manually build and attach the following files:
go-xdp-counter-install-vx.x.x.yamlgo-tc-counter-install-vx.x.x.yamlgo-tracepoint-counter-install-vx.x.x.yamlso that the examples for a given release can be easily deployed.