Skip to content

Commit be22fc6

Browse files
authored
fix(fluentd-aggregator): Fixed legacy service mode (#844)
Signed-off-by: Steve Hipwell <[email protected]>
1 parent c3afc8a commit be22fc6

File tree

5 files changed

+13
-18
lines changed

5 files changed

+13
-18
lines changed

charts/fluentd-aggregator/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2020

2121
## [UNRELEASED]
2222

23+
## [v4.1.2] - 2023-12-11### Fixed
24+
25+
- Fixed legacy migration by fixing the changes when the `service.legacy` value is set.
26+
2327
## [v4.1.1] - 2023-12-07
2428

29+
> [!WARNING]
30+
> Do not use this version with `service.legacy` as the implementation was incorrect.
31+
2532
### Changed
2633

2734
- Updated _Fluentd Aggregator_ OCI image to [v2.10.1](https://github.com/stevehipwell/fluentd-aggregator/releases/tag/v2.10.1) (_Fluentd_ [v1.16.3](https://github.com/fluent/fluentd/releases/tag/v1.16.3)).

charts/fluentd-aggregator/Chart.yaml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: fluentd-aggregator
33
description: Helm chart for Fluentd running as an aggregation StatefulSet and using the fluent-plugin-route router.
44
type: application
5-
version: 4.1.1
5+
version: 4.1.2
66
appVersion: 2.10.1
77
keywords:
88
- fluent
@@ -21,9 +21,5 @@ maintainers:
2121
annotations:
2222
artifacthub.io/alternativeName: fluentd
2323
artifacthub.io/changes: |
24-
- kind: changed
25-
description: "Updated _Fluentd Aggregator_ OCI image to [v2.10.1](https://github.com/stevehipwell/fluentd-aggregator/releases/tag/v2.10.1) (_Fluentd_ [v1.16.3](https://github.com/fluent/fluentd/releases/tag/v1.16.3))."
2624
- kind: fixed
27-
description: "Fixed legacy migration by adding `service.legacy` value to support keeping the legacy headless service name."
28-
- kind: fixed
29-
description: "Fixed incorrect truncation of names when full name is longer than `53` characters."
25+
description: "Fixed legacy migration by fixing the changes when the `service.legacy` value is set."

charts/fluentd-aggregator/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# fluentd-aggregator
22

3-
![Version: 4.1.1](https://img.shields.io/badge/Version-4.1.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.10.1](https://img.shields.io/badge/AppVersion-2.10.1-informational?style=flat-square)
3+
![Version: 4.1.2](https://img.shields.io/badge/Version-4.1.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.10.1](https://img.shields.io/badge/AppVersion-2.10.1-informational?style=flat-square)
44

55
Helm chart for Fluentd running as an aggregation StatefulSet and using the fluent-plugin-route router.
66

@@ -23,14 +23,14 @@ Helm chart for Fluentd running as an aggregation StatefulSet and using the fluen
2323
To install the chart using the recommended OCI method you can use the following command.
2424

2525
```shell
26-
helm upgrade --install fluentd-aggregator oci://ghcr.io/stevehipwell/helm-charts/fluentd-aggregator --version 4.1.1
26+
helm upgrade --install fluentd-aggregator oci://ghcr.io/stevehipwell/helm-charts/fluentd-aggregator --version 4.1.2
2727
```
2828

2929
Alternativly you can use the legacy non-OCI method via the following commands.
3030

3131
```shell
3232
helm repo add stevehipwell https://stevehipwell.github.io/helm-charts/
33-
helm upgrade --install fluentd-aggregator stevehipwell/fluentd-aggregator --version 4.1.1
33+
helm upgrade --install fluentd-aggregator stevehipwell/fluentd-aggregator --version 4.1.2
3434
```
3535

3636
## Values

charts/fluentd-aggregator/templates/_helpers.tpl

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,23 +68,15 @@ Create the name of the service account to use
6868
Define the service name
6969
*/}}
7070
{{- define "fluentd-aggregator.serviceName" -}}
71-
{{- if .Values.service.legacy }}
72-
{{- (printf "%s-default" (include "fluentd-aggregator.fullname" .) | trunc 55 | trimSuffix "-") }}
73-
{{- else }}
7471
{{- include "fluentd-aggregator.fullname" . }}
7572
{{- end }}
76-
{{- end }}
7773

7874
{{/*
7975
Define the headless service name
8076
*/}}
8177
{{- define "fluentd-aggregator.headlessServiceName" -}}
82-
{{- if .Values.service.legacy }}
83-
{{- include "fluentd-aggregator.fullname" . }}
84-
{{- else }}
8578
{{- (printf "%s-headless" (include "fluentd-aggregator.serviceName" .) | trunc 54 | trimSuffix "-") }}
8679
{{- end }}
87-
{{- end }}
8880

8981
{{/*
9082
Define the config configmap name

charts/fluentd-aggregator/templates/statefulset.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ metadata:
66
labels:
77
{{- include "fluentd-aggregator.labels" . | nindent 4 }}
88
spec:
9-
serviceName: {{ include "fluentd-aggregator.headlessServiceName" . }}
9+
serviceName: {{ ternary (include "fluentd-aggregator.serviceName" .) (include "fluentd-aggregator.headlessServiceName" .) .Values.service.legacy }}
1010
{{- if not .Values.autoscaling.enabled }}
1111
replicas: {{ .Values.replicas }}
1212
{{- end }}

0 commit comments

Comments
 (0)