Skip to content

Commit 96a9ab0

Browse files
authored
doc: improve
1 parent 5f73440 commit 96a9ab0

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,25 @@ Helm Chart containing our common functions
77

88
## Usage
99

10+
### How to install
11+
12+
Add this chart to your chart dependencies.
13+
14+
```
15+
apiVersion: v2
16+
name: my-chart
17+
description: Your Helm chart description
18+
icon: https://huggingface.co/front/assets/huggingface_logo-noborder.svg
19+
type: application
20+
version: 1.0.0
21+
appVersion: "latest"
22+
23+
dependencies:
24+
- name: common
25+
version: x.x.x
26+
repository: https://registry.internal.huggingface.tech/chartrepo/charts
27+
```
28+
1029
### Docker images management
1130

1231
#### Use a public docker image
@@ -213,6 +232,25 @@ spec:
213232
...
214233
```
215234

235+
### Labels management
236+
237+
Use the common function to generate your resource labels.
238+
239+
**`_helpers.yaml`**
240+
```yaml
241+
{{- define "yourComp.selectorLabels" -}}
242+
{{ include "hf.labels.commons" . }}
243+
app.kubernetes.io/component: your-component-name
244+
{{- end }}
245+
```
246+
247+
**`deployment.yaml`**
248+
```yaml
249+
apiVersion: apps/v1
250+
kind: Deployment
251+
metadata:
252+
labels: {{- include "yourComp.selectorLabels" . | nindent 4 }}
253+
```
216254

217255
## Credits
218256

0 commit comments

Comments
 (0)