Skip to content

Commit 0ff76c4

Browse files
authored
Merge pull request #129 from fluxcd/doc/spec-helmchart-example
doc/spec: update HelmChart examples
2 parents ed27b24 + ce1b80e commit 0ff76c4

File tree

1 file changed

+25
-7
lines changed

1 file changed

+25
-7
lines changed

docs/spec/v1alpha1/helmcharts.md

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The `HelmChart` API defines a source for Helm chart artifacts coming
44
from [`HelmRepository` sources](helmrepositories.md). The resource
5-
exposes the latest pulled chart for the defined version as an artifact.
5+
exposes the latest pulled or packaged chart as an artifact.
66

77
## Specification
88

@@ -101,25 +101,43 @@ kind: HelmChart
101101
metadata:
102102
name: redis
103103
spec:
104-
name: redis
104+
chart: redis
105105
version: 10.5.7
106-
helmRepositoryRef:
106+
sourceRef:
107107
name: stable
108+
kind: HelmRepository
108109
interval: 5m
109110
```
110111
111-
Pull the latest chart version that matches the sermver range every ten minutes:
112+
Pull the latest chart version that matches the semver range every ten minutes:
112113
113114
```yaml
114115
apiVersion: source.toolkit.fluxcd.io/v1alpha1
115116
kind: HelmChart
116117
metadata:
117118
name: redis
118119
spec:
119-
name: redis
120-
version: ^10.0.0
121-
helmRepositoryRef:
120+
chart: redis
121+
version: 10.5.x
122+
sourceRef:
122123
name: stable
124+
kind: HelmRepository
125+
interval: 10m
126+
```
127+
128+
Check a Git repository every ten minutes for a new `version` in the
129+
`Chart.yaml`, and package a new chart if the revision differs:
130+
131+
```yaml
132+
apiVersion: source.toolkit.fluxcd.io/v1alpha1
133+
kind: HelmChart
134+
metadata:
135+
name: podinfo
136+
spec:
137+
chart: ./charts/podinfo
138+
sourceRef:
139+
name: podinfo
140+
kind: GitRepository
123141
interval: 10m
124142
```
125143

0 commit comments

Comments
 (0)