Skip to content

Commit 7f28507

Browse files
committed
Create Helm Chart from Static Manifests
**What type of PR is this?** /kind feature **What this PR does / why we need it**: This PR convert our static deployment manifests from `deploy/kubernetes/*` into Helm Charts under `charts/*`, by running a convert script under `deploy/util/chart-releaser.sh`. Moreover, it handle the chart release with branch `gh-pages`, by integrate with https://github.com/helm/chart-releaser-action. The sample helm repo could find from https://alvistack.github.io/kubernetes-csi-external-snapshotter/index.yaml, by: helm repo add external-snapshotter https://alvistack.github.io/kubernetes-csi-external-snapshotter helm repo update helm search repo external-snapshotter Before each stable tag release, maintainers only required to: 1. Run the `./deploy/util/chart-releaser.sh` and update templates under `charts/*/templates/*` 2. Double confirm `charts/*/values.yml` with correct values, e.g. image tags 3. `git add --all --force charts/* && git commit` **Which issue(s) this PR fixes**: Fixes kubernetes-csi#551 Fixes kubernetes-csi#622 Fixes kubernetes-csi#751 Signed-off-by: Wong Hoi Sing Edison <[email protected]>
1 parent 59d7297 commit 7f28507

25 files changed

+3875
-0
lines changed

.github/workflows/release.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Release Charts
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
release:
10+
permissions:
11+
contents: write
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Configure Git
20+
run: |
21+
git config user.name "$GITHUB_ACTOR"
22+
git config user.email "[email protected]"
23+
24+
- name: Run chart-releaser
25+
uses: helm/[email protected]
26+
env:
27+
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

charts/csi-snapshotter/.helmignore

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*.orig
18+
*~
19+
# Various IDEs
20+
.project
21+
.idea/
22+
*.tmproj
23+
.vscode/

charts/csi-snapshotter/Chart.yaml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
apiVersion: v2
2+
name: csi-snapshotter
3+
description: A Helm chart for deploy the CSI snapshotter together with the hostpath CSI driver
4+
5+
# A chart can be either an 'application' or a 'library' chart.
6+
#
7+
# Application charts are a collection of templates that can be packaged into versioned archives
8+
# to be deployed.
9+
#
10+
# Library charts provide useful utilities or functions for the chart developer. They're included as
11+
# a dependency of application charts to inject those utilities and functions into the rendering
12+
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
13+
type: application
14+
15+
# This is the chart version. This version number should be incremented each time you make changes
16+
# to the chart and its templates, including the app version.
17+
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18+
version: v8.2.0
19+
20+
# This is the version number of the application being deployed. This version number should be
21+
# incremented each time you make changes to the application. Versions are not expected to
22+
# follow Semantic Versioning. They should reflect the version the application is using.
23+
# It is recommended to use it with quotes.
24+
appVersion: v8.2.0
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
apiVersion: apiextensions.k8s.io/v1
2+
kind: CustomResourceDefinition
3+
metadata:
4+
annotations:
5+
api-approved.kubernetes.io: https://github.com/kubernetes-csi/external-snapshotter/pull/1150
6+
controller-gen.kubebuilder.io/version: v0.15.0
7+
name: volumegroupsnapshotclasses.groupsnapshot.storage.k8s.io
8+
spec:
9+
group: groupsnapshot.storage.k8s.io
10+
names:
11+
kind: VolumeGroupSnapshotClass
12+
listKind: VolumeGroupSnapshotClassList
13+
plural: volumegroupsnapshotclasses
14+
shortNames:
15+
- vgsclass
16+
- vgsclasses
17+
singular: volumegroupsnapshotclass
18+
scope: Cluster
19+
versions:
20+
- additionalPrinterColumns:
21+
- jsonPath: .driver
22+
name: Driver
23+
type: string
24+
- description: Determines whether a VolumeGroupSnapshotContent created through the VolumeGroupSnapshotClass should be deleted when its bound VolumeGroupSnapshot is deleted.
25+
jsonPath: .deletionPolicy
26+
name: DeletionPolicy
27+
type: string
28+
- jsonPath: .metadata.creationTimestamp
29+
name: Age
30+
type: date
31+
name: v1beta1
32+
schema:
33+
openAPIV3Schema:
34+
description: |-
35+
VolumeGroupSnapshotClass specifies parameters that a underlying storage system
36+
uses when creating a volume group snapshot. A specific VolumeGroupSnapshotClass
37+
is used by specifying its name in a VolumeGroupSnapshot object.
38+
VolumeGroupSnapshotClasses are non-namespaced.
39+
properties:
40+
apiVersion:
41+
description: |-
42+
APIVersion defines the versioned schema of this representation of an object.
43+
Servers should convert recognized schemas to the latest internal value, and
44+
may reject unrecognized values.
45+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
46+
type: string
47+
deletionPolicy:
48+
description: |-
49+
DeletionPolicy determines whether a VolumeGroupSnapshotContent created
50+
through the VolumeGroupSnapshotClass should be deleted when its bound
51+
VolumeGroupSnapshot is deleted.
52+
Supported values are "Retain" and "Delete".
53+
"Retain" means that the VolumeGroupSnapshotContent and its physical group
54+
snapshot on underlying storage system are kept.
55+
"Delete" means that the VolumeGroupSnapshotContent and its physical group
56+
snapshot on underlying storage system are deleted.
57+
Required.
58+
enum:
59+
- Delete
60+
- Retain
61+
type: string
62+
driver:
63+
description: |-
64+
Driver is the name of the storage driver expected to handle this VolumeGroupSnapshotClass.
65+
Required.
66+
type: string
67+
kind:
68+
description: |-
69+
Kind is a string value representing the REST resource this object represents.
70+
Servers may infer this from the endpoint the client submits requests to.
71+
Cannot be updated.
72+
In CamelCase.
73+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
74+
type: string
75+
metadata:
76+
type: object
77+
parameters:
78+
additionalProperties:
79+
type: string
80+
description: |-
81+
Parameters is a key-value map with storage driver specific parameters for
82+
creating group snapshots.
83+
These values are opaque to Kubernetes and are passed directly to the driver.
84+
type: object
85+
required:
86+
- deletionPolicy
87+
- driver
88+
type: object
89+
served: true
90+
storage: true
91+
subresources: {}

0 commit comments

Comments
 (0)