Skip to content

Commit

Permalink
Release Antrea Helm chart archive for each Antrea release (#3935)
Browse files Browse the repository at this point in the history
* Release Antrea Helm chart archive for each Antrea release

For each Antrea release, we generate the correct Helm chart archive and
upload it as a release asset. The appropriate index.yaml file (Helm repo
index) will be updated appropriately (in the antrea-io/website
repository) and will be accessible through charts.antrea.io and / or
antrea.io/charts.

For #2641

We are also moving all CRD resources from the generic templates/
directory to the special crds/ directory, in the Chart definition. This
will cause Helm to treat CRDs as special resources, and in particular
they will never be upgraded / deleted automatically by Helm. In
particular, for upgrade, users will need to apply a separate YAML (which
is being added to release assets) including all the CRD resource
definitions. This represents an extra step, but ensures that users are
aware that CRDs are being upgraded which may require some actions from
them (e.g., migrate to a new version) and needs to be done with caution.

Fixes #3665

Signed-off-by: Antonin Bas <abas@vmware.com>

* Address review comments

Signed-off-by: Antonin Bas <abas@vmware.com>

* Fix build/charts/antrea/README.md

Signed-off-by: Antonin Bas <abas@vmware.com>
  • Loading branch information
antoninbas committed Jun 27, 2022
1 parent f1fe6d0 commit f96c0a3
Show file tree
Hide file tree
Showing 27 changed files with 5,509 additions and 2,857 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/upload_release_assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,15 @@ jobs:
asset_path: ./assets/antrea.yml
asset_name: antrea.yml
asset_content_type: application/octet-stream
- name: Upload antrea-crds.yml
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./assets/antrea-crds.yml
asset_name: antrea-crds.yml
asset_content_type: application/octet-stream
- name: Upload antrea-ipsec.yml
uses: actions/upload-release-asset@v1
env:
Expand Down Expand Up @@ -245,3 +254,12 @@ jobs:
asset_path: ./assets/Start-AntreaAgent.ps1
asset_name: Start-AntreaAgent.ps1
asset_content_type: application/octet-stream
- name: Upload Antrea Helm chart archive
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./assets/antrea-chart.tgz
asset_name: antrea-chart.tgz
asset_content_type: application/octet-stream
4 changes: 4 additions & 0 deletions build/charts/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
USERID := $(shell id -u)
GRPID := $(shell id -g)

VERSION := $(shell head -n 1 ../../VERSION | cut -c 2-)

.PHONY: helm-docs
helm-docs:
docker run --rm --volume "$(CURDIR):/helm-docs" --user=$(USERID):$(GRPID) jnorwood/helm-docs:v1.7.0
sed -i.bak "s/0.0.0/$(VERSION)/g" antrea/README.md # replace version placeholder
sed -i.bak "s/-dev-informational/--dev-informational/g" antrea/README.md # fix img.shields.io badge URLs
6 changes: 4 additions & 2 deletions build/charts/antrea/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: antrea
type: application
displayName: Antrea
home: https://antrea.io/
version: 1.17.0-dev
appVersion: 1.17.0-dev
version: 0.0.0
appVersion: 0.0.0
kubeVersion: ">= 1.16.0-0"
icon: https://raw.githubusercontent.com/antrea-io/antrea/main/docs/assets/logo/antrea_logo.svg
description: Kubernetes networking based on Open vSwitch
Expand All @@ -14,5 +14,7 @@ keywords:
- Networking
- CNI
- Security
- Open vSwitch
- OVS
sources:
- https://github.com/antrea-io/antrea
2 changes: 1 addition & 1 deletion build/charts/antrea/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# antrea

![Version: 1.17.0-dev](https://img.shields.io/badge/Version-1.17.0--dev-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.17.0-dev](https://img.shields.io/badge/AppVersion-1.17.0--dev-informational?style=flat-square)
![Version: 1.7.0-dev](https://img.shields.io/badge/Version-1.7.0--dev-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.7.0-dev](https://img.shields.io/badge/AppVersion-1.7.0--dev-informational?style=flat-square)

Kubernetes networking based on Open vSwitch

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 5 additions & 1 deletion build/charts/antrea/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
The Antrea CNI has been successfully installed.
The Antrea CNI has been successfully installed

You are using version {{ .Chart.Version }}

For the Antrea documentation, please visit https://antrea.io
Loading

0 comments on commit f96c0a3

Please sign in to comment.