Skip to content

Commit d78dd14

Browse files
authored
feat(helm): add commonLabels support (spegel-org#678)
2 parents bc4b11a + c5ed3c7 commit d78dd14

File tree

4 files changed

+37
-24
lines changed

4 files changed

+37
-24
lines changed

CHANGELOG.md

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## Unreleased
99

10-
### Added
10+
### Added
11+
12+
- [#678](https://github.com/spegel-org/spegel/pull/678) Add support for setting common labels in Helm chart.
1113

1214
### Changed
1315

@@ -21,7 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2123

2224
## v0.0.28
2325

24-
### Added
26+
### Added
2527

2628
- [#576](https://github.com/spegel-org/spegel/pull/576) Add support for range requests for blobs.
2729
- [#621](https://github.com/spegel-org/spegel/pull/621) Added Mermaid diagrams documentation to help explain Spegel's inner workings.
@@ -56,7 +58,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
5658

5759
## v0.0.25
5860

59-
### Added
61+
### Added
6062

6163
- [#578](https://github.com/spegel-org/spegel/pull/578) Add possibility to override environment variable NODE_IP.
6264

@@ -70,7 +72,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7072

7173
## v0.0.24
7274

73-
### Added
75+
### Added
7476

7577
- [#538](https://github.com/spegel-org/spegel/pull/538) Replace mock OCI client with in memory client.
7678
- [#552](https://github.com/spegel-org/spegel/pull/552) Add support for VerticalPodAutoscaler in the Helm chart.
@@ -131,7 +133,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
131133

132134
## v0.0.22
133135

134-
### Added
136+
### Added
135137

136138
- [#435](https://github.com/spegel-org/spegel/pull/435) Add pprof endpoints to enable profiling.
137139
- [#434](https://github.com/spegel-org/spegel/pull/434) Add optional Containerd local content store to increase serve performance.
@@ -152,7 +154,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
152154

153155
## v0.0.21
154156

155-
### Added
157+
### Added
156158

157159
- [#421](https://github.com/spegel-org/spegel/pull/421) Add conformance tests to e2e test.
158160
- [#424](https://github.com/spegel-org/spegel/pull/424) Add option to append mirror configuration instead of overwriting.
@@ -168,8 +170,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
168170
- [#431](https://github.com/spegel-org/spegel/pull/431) Fix import error caused by invalid file name.
169171

170172
## v0.0.20
171-
172-
### Added
173+
174+
### Added
173175

174176
- [#416](https://github.com/spegel-org/spegel/pull/416) Add image and Helm chart signing with Cosign.
175177

@@ -188,11 +190,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
188190

189191
## v0.0.19
190192

191-
> [!IMPORTANT]
193+
> [!IMPORTANT]
192194
> The Spegel repository has been moved from XenitAB to a new GitHub organization.
193195
> Make sure to update the organization in the image and chart references.
194196
195-
### Added
197+
### Added
196198

197199
- [#335](https://github.com/spegel-org/spegel/pull/335) Add k3s to compatibility guide.
198200
- [#359](https://github.com/spegel-org/spegel/pull/359) Extend OCI client tests.
@@ -230,7 +232,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
230232

231233
## v0.0.18
232234

233-
### Added
235+
### Added
234236

235237
- [#331](https://github.com/spegel-org/spegel/pull/331) Document possible modifications required for k8s-digester.
236238
- [#337](https://github.com/spegel-org/spegel/pull/337) Add HTTP bootstrapper.
@@ -257,7 +259,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
257259

258260
## v0.0.17
259261

260-
### Added
262+
### Added
261263

262264
- [#299](https://github.com/spegel-org/spegel/pull/299) Add update strategy configuration to Helm chart.
263265

@@ -280,7 +282,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
280282

281283
## v0.0.15
282284

283-
### Added
285+
### Added
284286

285287
- [#270](https://github.com/spegel-org/spegel/pull/270) Add tests for local and external service port.
286288
- [#262](https://github.com/spegel-org/spegel/pull/262) Enable misspell linter and fix spelling mistakes.
@@ -297,7 +299,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
297299

298300
## v0.0.14
299301

300-
### Added
302+
### Added
301303

302304
- [#237](https://github.com/spegel-org/spegel/pull/237) Verify discard unpacked layers setting.
303305

@@ -312,7 +314,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
312314

313315
## v0.0.13
314316

315-
### Added
317+
### Added
316318

317319
- [#195](https://github.com/spegel-org/spegel/pull/195) Fix daemonset argument namespace to use helper-defined namespace value.
318320

@@ -333,7 +335,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
333335

334336
## v0.0.12
335337

336-
### Added
338+
### Added
337339

338340
- [#182](https://github.com/spegel-org/spegel/pull/182) Add lscr.io as default registry.
339341

@@ -348,7 +350,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
348350

349351
## v0.0.11
350352

351-
### Added
353+
### Added
352354

353355
- [#170](https://github.com/spegel-org/spegel/pull/170) Backup existing Containerd mirror configuration.
354356
- [#171](https://github.com/spegel-org/spegel/pull/171) Add option to disable resolve.
@@ -359,7 +361,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
359361

360362
## v0.0.10
361363

362-
### Added
364+
### Added
363365

364366
- [#145](https://github.com/spegel-org/spegel/pull/145) Add new field to override Helm chart namespace.
365367
- [#153](https://github.com/spegel-org/spegel/pull/153) Add option to disable resolving latest tags.
@@ -393,7 +395,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
393395

394396
## v0.0.8
395397

396-
### Added
398+
### Added
397399

398400
- [#125](https://github.com/spegel-org/spegel/pull/125) Add retry mirroring to new peer if current peer fails.
399401
- [#127](https://github.com/spegel-org/spegel/pull/127) Add configuration for resolve retry and timeout.
@@ -425,21 +427,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
425427

426428
- [#42](https://github.com/spegel-org/spegel/pull/42) Only use bootstrap function for initial peer discovery.
427429
- [#66](https://github.com/spegel-org/spegel/pull/66) Move mirror configuration logic to run as an init container.
428-
430+
429431
### Fixed
430432

431433
- [#71](https://github.com/spegel-org/spegel/pull/71) Fix priority class name.
432434

433435
## v0.0.5
434436

435-
### Added
437+
### Added
436438

437439
- [#29](https://github.com/spegel-org/spegel/pull/29) Make priority class name configurable and set a default value.
438440
- [#49](https://github.com/spegel-org/spegel/pull/49) Add registry.k8s.io to registry mirror list.
439441
- [#56](https://github.com/spegel-org/spegel/pull/56) Add gcr.io and k8s.gcr.io registries to default list.
440442

441443
### Changed
442-
444+
443445
- [#32](https://github.com/spegel-org/spegel/pull/32) Update Go to 1.20.
444446
- [#33](https://github.com/spegel-org/spegel/pull/33) Remove containerd info call when handling manifest request.
445447
- [#48](https://github.com/spegel-org/spegel/pull/48) Replace multierr with stdlib errors join.
@@ -460,7 +462,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
460462

461463
## v0.0.3
462464

463-
### Added
465+
### Added
464466

465467
- [#18](https://github.com/spegel-org/spegel/pull/18) Add support to use Spegel instance on another node.
466468

charts/spegel/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Read the [getting started](https://spegel.dev/docs/getting-started/) guide to de
99
| Key | Type | Default | Description |
1010
|-----|------|---------|-------------|
1111
| affinity | object | `{}` | Affinity settings for pod assignment. |
12+
| commonLabels | object | `{}` | Common labels to apply to all rendered resources. |
1213
| fullnameOverride | string | `""` | Overrides the full name of the chart. |
1314
| grafanaDashboard.annotations | object | `{}` | Annotations that ConfigMaps can have to get configured in Grafana, See: sidecar.dashboards.folderAnnotation for specifying the dashboard folder. https://github.com/grafana/helm-charts/tree/main/charts/grafana |
1415
| grafanaDashboard.enabled | bool | `false` | If true creates a Grafana dashboard. |

charts/spegel/templates/_helpers.tpl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ If release name contains chart name it will be used as a full name.
2424
{{- end }}
2525

2626
{{/*
27-
Creates the namespace for the chart.
27+
Creates the namespace for the chart.
2828
Defaults to the Release namespace unless the namespaceOverride is defined.
2929
*/}}
3030
{{- define "spegel.namespace" -}}
@@ -53,6 +53,13 @@ helm.sh/chart: {{ include "spegel.chart" . }}
5353
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
5454
{{- end }}
5555
app.kubernetes.io/managed-by: {{ .Release.Service }}
56+
{{- with .Values.commonLabels }}
57+
{{ toYaml . }}
58+
{{- end }}
59+
{{- end }}
60+
61+
{{/*
62+
{{- end }}
5663
{{- end }}
5764
5865
{{/*

charts/spegel/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ tolerations:
9999
# -- Affinity settings for pod assignment.
100100
affinity: {}
101101

102+
# -- Common labels to apply to all rendered resources.
103+
commonLabels: {}
104+
102105
serviceMonitor:
103106
# -- If true creates a Prometheus Service Monitor.
104107
enabled: false

0 commit comments

Comments
 (0)