generated from kubernetes/kubernetes-template-project
-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #87 from alexander-demicev/releasedocs
📖 Add doc describing release process
- Loading branch information
Showing
3 changed files
with
96 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Releasing new versions | ||
|
||
This documents describes release process for the Cluster API Operator. | ||
|
||
1. Cut the release branch. | ||
|
||
```bash | ||
export RELEASE_TAG=v0.1.1 | ||
|
||
git tag -s -a ${RELEASE_TAG} -m ${RELEASE_TAG} | ||
|
||
git push upstream ${RELEASE_TAG} | ||
``` | ||
|
||
This will trigger [release github action](https://github.com/kubernetes-sigs/cluster-api-operator/blob/main/.github/workflows/release.yaml) that will | ||
create a draft release with operator components and helm chart, also a Prow job to publish operator image to the staging registry will start. | ||
|
||
2. Wait for image to appear in the [staging registry](https://console.cloud.google.com/gcr/images/k8s-staging-capi-operator/global/cluster-api-operator). | ||
|
||
3. Create a GitHub [Personal access tokens](https://github.com/settings/tokens) if you don't have one already. We're going to use for opening a PR | ||
to promote image from staging to production. | ||
|
||
```bash | ||
export GITHUB_TOKEN=<your GH token> | ||
make promote-images | ||
``` | ||
|
||
Merge the PR after it was created and verify that image is present in the production registry. | ||
|
||
```bash | ||
docker pull registry.k8s.io/capi-operator:${RELEASE_TAG} | ||
``` | ||
|
||
4. Publish the release on Github. | ||
|
||
5. After release was published, switch back to main branch and update index.yaml. It's the source for operator helm chart repository. | ||
|
||
```bash | ||
git checkout main | ||
make update-helm-repo | ||
``` | ||
|
||
6. Create a PR with the changes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Copyright 2022 The Kubernetes Authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
set -o errexit | ||
set -o nounset | ||
set -o pipefail | ||
|
||
if [[ "${TRACE-0}" == "1" ]]; then | ||
set -o xtrace | ||
fi | ||
|
||
REPO_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. | ||
|
||
YQ_BIN=yq | ||
YQ_PATH=hack/tools/bin/${YQ_BIN} | ||
|
||
cd "${REPO_ROOT}" && make ${YQ_BIN} >/dev/null | ||
|
||
KEYS=() | ||
while IFS='' read -r line; do KEYS+=("$line"); done < <(${YQ_PATH} e '.aliases["cluster-api-operator-admins"][]' OWNERS_ALIASES) | ||
echo "${KEYS[@]/#/@}" |