Skip to content

Commit

Permalink
fix(fluentd-aggregator): Fixed legacy service mode (#844)
Browse files Browse the repository at this point in the history
Signed-off-by: Steve Hipwell <[email protected]>
  • Loading branch information
stevehipwell authored Dec 11, 2023
1 parent c3afc8a commit be22fc6
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 18 deletions.
7 changes: 7 additions & 0 deletions charts/fluentd-aggregator/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [UNRELEASED]

## [v4.1.2] - 2023-12-11### Fixed

- Fixed legacy migration by fixing the changes when the `service.legacy` value is set.

## [v4.1.1] - 2023-12-07

> [!WARNING]
> Do not use this version with `service.legacy` as the implementation was incorrect.
### Changed

- 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)).
Expand Down
8 changes: 2 additions & 6 deletions charts/fluentd-aggregator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: fluentd-aggregator
description: Helm chart for Fluentd running as an aggregation StatefulSet and using the fluent-plugin-route router.
type: application
version: 4.1.1
version: 4.1.2
appVersion: 2.10.1
keywords:
- fluent
Expand All @@ -21,9 +21,5 @@ maintainers:
annotations:
artifacthub.io/alternativeName: fluentd
artifacthub.io/changes: |
- kind: changed
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))."
- kind: fixed
description: "Fixed legacy migration by adding `service.legacy` value to support keeping the legacy headless service name."
- kind: fixed
description: "Fixed incorrect truncation of names when full name is longer than `53` characters."
description: "Fixed legacy migration by fixing the changes when the `service.legacy` value is set."
6 changes: 3 additions & 3 deletions charts/fluentd-aggregator/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# fluentd-aggregator

![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)
![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)

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

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

```shell
helm upgrade --install fluentd-aggregator oci://ghcr.io/stevehipwell/helm-charts/fluentd-aggregator --version 4.1.1
helm upgrade --install fluentd-aggregator oci://ghcr.io/stevehipwell/helm-charts/fluentd-aggregator --version 4.1.2
```

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

```shell
helm repo add stevehipwell https://stevehipwell.github.io/helm-charts/
helm upgrade --install fluentd-aggregator stevehipwell/fluentd-aggregator --version 4.1.1
helm upgrade --install fluentd-aggregator stevehipwell/fluentd-aggregator --version 4.1.2
```

## Values
Expand Down
8 changes: 0 additions & 8 deletions charts/fluentd-aggregator/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -68,23 +68,15 @@ Create the name of the service account to use
Define the service name
*/}}
{{- define "fluentd-aggregator.serviceName" -}}
{{- if .Values.service.legacy }}
{{- (printf "%s-default" (include "fluentd-aggregator.fullname" .) | trunc 55 | trimSuffix "-") }}
{{- else }}
{{- include "fluentd-aggregator.fullname" . }}
{{- end }}
{{- end }}

{{/*
Define the headless service name
*/}}
{{- define "fluentd-aggregator.headlessServiceName" -}}
{{- if .Values.service.legacy }}
{{- include "fluentd-aggregator.fullname" . }}
{{- else }}
{{- (printf "%s-headless" (include "fluentd-aggregator.serviceName" .) | trunc 54 | trimSuffix "-") }}
{{- end }}
{{- end }}

{{/*
Define the config configmap name
Expand Down
2 changes: 1 addition & 1 deletion charts/fluentd-aggregator/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
labels:
{{- include "fluentd-aggregator.labels" . | nindent 4 }}
spec:
serviceName: {{ include "fluentd-aggregator.headlessServiceName" . }}
serviceName: {{ ternary (include "fluentd-aggregator.serviceName" .) (include "fluentd-aggregator.headlessServiceName" .) .Values.service.legacy }}
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicas }}
{{- end }}
Expand Down

0 comments on commit be22fc6

Please sign in to comment.