Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release Antrea Helm chart archive for each Antrea release #3935

Merged
merged 3 commits into from
Jun 27, 2022

Conversation

antoninbas
Copy link
Contributor

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

@antoninbas antoninbas requested review from hangyan, jianjuns and tnqn June 23, 2022 23:57
@antoninbas antoninbas added area/build-release Issues or PRs related to building and releasing action/release-note Indicates a PR that should be included in release notes. labels Jun 23, 2022
@antoninbas antoninbas added this to the Antrea v1.8 release milestone Jun 23, 2022
@codecov-commenter
Copy link

codecov-commenter commented Jun 24, 2022

Codecov Report

Merging #3935 (10cda94) into main (a07959e) will increase coverage by 14.92%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #3935       +/-   ##
===========================================
+ Coverage   49.03%   63.96%   +14.92%     
===========================================
  Files         261      293       +32     
  Lines       39245    43300     +4055     
===========================================
+ Hits        19245    27698     +8453     
+ Misses      18128    13360     -4768     
- Partials     1872     2242      +370     
Flag Coverage Δ
kind-e2e-tests 50.40% <ø> (+1.36%) ⬆️
unit-tests 44.50% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/agent/openflow/service.go 72.82% <0.00%> (-10.87%) ⬇️
pkg/agent/controller/networkpolicy/reject.go 77.40% <0.00%> (-8.48%) ⬇️
pkg/agent/apiserver/apiserver.go 67.02% <0.00%> (-4.26%) ⬇️
...ntrollers/multicluster/serviceexport_controller.go 66.47% <0.00%> (ø)
pkg/antctl/command_definition.go 43.54% <0.00%> (ø)
pkg/antctl/raw/traceflow/command.go 23.58% <0.00%> (ø)
...uster/controllers/multicluster/stale_controller.go 51.72% <0.00%> (ø)
...trollers/multicluster/resourceexport_controller.go 68.30% <0.00%> (ø)
multicluster/controllers/multicluster/test_data.go 100.00% <0.00%> (ø)
...icluster/cmd/multicluster-controller/controller.go 6.45% <0.00%> (ø)
... and 154 more

hack/generate-helm-release.sh Outdated Show resolved Hide resolved
hack/release/prepare-assets.sh Show resolved Hide resolved
hack/generate-standard-manifests.sh Show resolved Hide resolved
# We also generate a manifest which only includes CRD resources (all of them).
# This is useful for Antrea upgrades when using Helm.
CRD_FILES=$(cd $ANTREA_CHART/crds && find * -type f -name "*.yaml" )
CRD_OUTPUT_FILE="$OUTPUT_DIR/antrea-crds.yml"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this file is not checked in and is not in .gitignore, is it intentional?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's checked in already?
Github is collapsing it, but I can see it in the diff

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I thought it was not checked in because I saw it in the diff.

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 antrea-io#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 antrea-io#3665

Signed-off-by: Antonin Bas <abas@vmware.com>
@antoninbas antoninbas force-pushed the release-helm-chart branch from 52c48fd to ca73949 Compare June 24, 2022 15:18
@antoninbas antoninbas requested a review from tnqn June 24, 2022 15:18
# We also generate a manifest which only includes CRD resources (all of them).
# This is useful for Antrea upgrades when using Helm.
CRD_FILES=$(cd $ANTREA_CHART/crds && find * -type f -name "*.yaml" )
CRD_OUTPUT_FILE="$OUTPUT_DIR/antrea-crds.yml"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I thought it was not checked in because I saw it in the diff.

>&2 echo "$@"
}

_usage="Usage: $0 [--mode (dev|release)] --out <DIR>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should it use --out <PATH> as this could be a directory or a file?

_usage="Usage: $0 [--mode (dev|release)] --out <DIR>
Package the Antrea chart into a chart archive.
Environment variable VERSION must be set.
--out <DIR> Output path for chart archive
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Signed-off-by: Antonin Bas <abas@vmware.com>
@antoninbas antoninbas force-pushed the release-helm-chart branch from ca73949 to 3c3d527 Compare June 24, 2022 15:35
tnqn
tnqn previously approved these changes Jun 24, 2022
Copy link
Member

@tnqn tnqn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@antoninbas
Copy link
Contributor Author

@tnqn I had to regenerate the chart README

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

@jianjuns jianjuns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@antoninbas
Copy link
Contributor Author

@jianjuns @tnqn could I get another approval for this?

@antoninbas
Copy link
Contributor Author

/skip-all

@antoninbas antoninbas merged commit f96c0a3 into antrea-io:main Jun 27, 2022
@antoninbas antoninbas deleted the release-helm-chart branch June 27, 2022 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action/release-note Indicates a PR that should be included in release notes. area/build-release Issues or PRs related to building and releasing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Helm chart] Should CRDs be placed in the special crds/ directory?
4 participants