|
| 1 | +# Versioning |
| 2 | + |
| 3 | +The following is a concise explanation of how Operator SDK versions are determined. The Operator SDK versioning follows [semantic versioning][link-semver] standards. |
| 4 | + |
| 5 | +## Milestones |
| 6 | + |
| 7 | +Operator SDK [milestones][link-github-milestones] represent changes to the SDK spanning multiple issues, such as a design change. Milestones help SDK developers determine how close we are to new releases, either major or minor; a milestone must be completed before a new version is released. Milestones and their involved issues are determined by maintainers. |
| 8 | + |
| 9 | +Milestone labels have the form: `milestone-x.y.0`, where `x` and `y` are major and minor SDK versions, respectively. This particular milestone demarcates the SDK `x.y.0` release; once issues within this milestone are addressed, the release process can begin. |
| 10 | + |
| 11 | +## Major versions |
| 12 | + |
| 13 | +Major version changes can break compatibility between the previous major versions; they are not necessarily backwards or forwards compatible. SDK change targets include but are not limited to: |
| 14 | +- `operator-sdk` command and sub-commands |
| 15 | +- Golang API |
| 16 | +- Formats of various yaml manifest files |
| 17 | + |
| 18 | +## Minor versions |
| 19 | + |
| 20 | +Minor version changes will not break compatibility between the previous minor versions; to do so is a bug. SDK changes will involve addition of optional features, non-breaking enhancements, and *minor* bug fixes identified from previous versions. |
| 21 | + |
| 22 | +### Creating a minor version branch |
| 23 | + |
| 24 | +We expect to release patches for minor releases, so we create a patch trunk to branch from. The naming convention follows "v2.1.x", where the major version is 2, minor is 1, and "x" is a patch version placeholder. |
| 25 | + |
| 26 | +```bash |
| 27 | +$ MAV_MIN_VER="v${MAJOR_VERSION}.${NEW_MINOR_VERSION}" |
| 28 | +$ git checkout -b "${MAJ_MIN_VER}.x" tags/"v${MAJ_MIN_VER}.0" |
| 29 | +$ git push [email protected]:operator-framework/operator-sdk.git "v${MAJ_MIN_VER}.x" |
| 30 | +``` |
| 31 | + |
| 32 | +## Patch versions |
| 33 | + |
| 34 | +Patch versions changes are meant only for bug fixes, and will not break compatibility of the current minor version. A patch release will contain a collection of minor bug fixes, or individual major and security bug fixes, depending on severity. |
| 35 | + |
| 36 | +### Creating a patch version branch |
| 37 | + |
| 38 | +As more than one patch may be created per minor release, patch branch names of the form "${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}" will be created after a bug fix has been pushed, and the bug fix branch merged into the patch branch only after testing. |
| 39 | + |
| 40 | +```bash |
| 41 | +$ git checkout "v${MAJOR_VERSION}.${MINOR_VERSION}.x" |
| 42 | +$ git checkout -b "cherry-picked-change" |
| 43 | +$ git cherry-pick "$GIT_COMMIT_HASH" |
| 44 | +$ git push origin "cherry-picked-change" |
| 45 | +``` |
| 46 | + |
| 47 | +# Releases |
| 48 | + |
| 49 | +Making an Operator SDK release involves: |
| 50 | +- Tagging and signing a git commit and pushing the tag to GitHub. |
| 51 | +- Building a release binary and uploading the binary to GitHub. |
| 52 | + |
| 53 | +Releases can only be performed by [maintainers][doc-maintainers]. |
| 54 | + |
| 55 | +## Dependency and platform support |
| 56 | + |
| 57 | +### Kubernetes versions |
| 58 | + |
| 59 | +As the Operator SDK interacts directly with the Kubernetes API, certain API features are assumed to exist in the target cluster. The currently supported Kubernetes version will always be listed in the SDK [prerequisites section][doc-kube-version]. |
| 60 | + |
| 61 | +### Operating systems and architectures |
| 62 | + |
| 63 | +Release binaries will be built for the `x86_64` architecture for both GNU Linux and MacOS Darwin platforms. |
| 64 | + |
| 65 | +Support for the Windows platform or any architecture other than `x86_64` is not on the roadmap at this time. |
| 66 | + |
| 67 | +## Binaries |
| 68 | + |
| 69 | +Creating release binaries: |
| 70 | +```bash |
| 71 | +$ ./release.sh "v${VERSION}" |
| 72 | +``` |
| 73 | + |
| 74 | +## Release tags |
| 75 | + |
| 76 | +Every release will have a corresponding git tag. |
| 77 | + |
| 78 | +Make sure you've [uploaded your GPG key][link-github-gpg-key-upload] and configured git to [use that signing key][link-git-config-gpg-key] either globally or for the Operator SDK repository. Note: the email the key is issued for must be the email you use for git. |
| 79 | + |
| 80 | +```bash |
| 81 | +$ git config [--global] user.signingkey "$GPG_KEY_ID" |
| 82 | +$ git config [--global] user.email "$GPG_EMAIL" |
| 83 | +``` |
| 84 | + |
| 85 | +Tagging will be handled by `release.sh`. |
| 86 | + |
| 87 | +## Release Notes |
| 88 | + |
| 89 | +Release notes should be a thorough description of changes made to code, documentation, and design. Individual changes, such as bug fixes, should be given their own bullet point with a short description of what was changed. Issue links and handle of the developer who worked on the change should be included whenever possible. |
| 90 | + |
| 91 | +The following is the format for major and minor releases: |
| 92 | + |
| 93 | +```Markdown |
| 94 | +[Short description of release (ex. reason, theme)] |
| 95 | + |
| 96 | +### Features |
| 97 | +- [Short description of feature] (#issue1, #issue2, ..., @maintainer_handle) |
| 98 | +... |
| 99 | + |
| 100 | +### Bug fixes |
| 101 | +- [Short description of fix] (#issue1, #issue2, ..., @maintainer_handle) |
| 102 | +... |
| 103 | + |
| 104 | +### Miscellaneous |
| 105 | +- [Short description of change] (#issue1, #issue2, ..., @maintainer_handle) |
| 106 | +... |
| 107 | +``` |
| 108 | + |
| 109 | +Patch releases should have the following format: |
| 110 | + |
| 111 | +```Markdown |
| 112 | +[Medium-length description of release (if not complex, short is fine); explanation required] |
| 113 | + |
| 114 | +### Bug fixes |
| 115 | +- [Short description of fix] (#issue1, #issue2, ..., @maintainer_handle) |
| 116 | +... |
| 117 | +``` |
| 118 | + |
| 119 | +[link-semver]:https://semver.org/ |
| 120 | +[link-github-milestones]: https://help.github.com/articles/about-milestones/ |
| 121 | +[doc-maintainers]:../MAINTAINERS |
| 122 | +[link-github-gpg-key-upload]:https://github.com/settings/keys |
| 123 | +[link-git-config-gpg-key]:https://git-scm.com/book/en/v2/Git-Tools-Signing-Your-Work |
| 124 | +[doc-kube-version]:https://github.com/operator-framework/operator-sdk#prerequisites |
0 commit comments