Skip to content

Commit

Permalink
[stable/fairwinds-insights] add option for hostname max length (#1364)
Browse files Browse the repository at this point in the history
* Truncate URLs to 17 chars

* Update Chart.yaml

* Update CHANGELOG.md

* Update _helpers.tpl

* Update CHANGELOG.md

* Update values.yaml

* helm-docs

* Update _helpers.tpl

* Update _helpers.tpl
  • Loading branch information
rbren authored Nov 8, 2023
1 parent 87f2863 commit 6e6b3d3
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions stable/fairwinds-insights/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## 0.21.8
* Allow additional chars in the URL prefix

## 0.21.7
* Update application version to 14.7. [See the release notes for more details](https://insights.docs.fairwinds.com/release-notes)

Expand Down
2 changes: 1 addition & 1 deletion stable/fairwinds-insights/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
appVersion: "14.7"
description: A Helm chart to run the Fairwinds Insights server
name: fairwinds-insights
version: 0.21.7
version: 0.21.8
kubeVersion: ">= 1.22.0-0"
maintainers:
- name: rbren
Expand Down
1 change: 1 addition & 0 deletions stable/fairwinds-insights/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ See [insights.docs.fairwinds.com](https://insights.docs.fairwinds.com/technical-
| service.type | string | `"ClusterIP"` | Service type for the API and Dashboard services |
| service.annotations | string | `nil` | Annotations for the services |
| sanitizedBranch | string | `nil` | Prefix to use on hostname. Generally not needed. |
| sanitizedPrefixMaxLength | int | `12` | Maximum length for hostname prefix. |
| ingress.enabled | bool | `false` | Enable Ingress |
| ingress.tls | bool | `true` | Enable TLS |
| ingress.hostedZones | list | `[]` | Hostnames to use for Ingress |
Expand Down
2 changes: 1 addition & 1 deletion stable/fairwinds-insights/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Create chart name and version as used by the chart label.

{{- define "fairwinds-insights.sanitizedPrefix" -}}
{{- if .Values.sanitizedBranch -}}
{{- printf "%s." (.Values.sanitizedBranch | trunc 12 | trimSuffix "-") -}}
{{- printf "%s." (.Values.sanitizedBranch | trunc (int .Values.sanitizedPrefixMaxLength | default 12) | trimSuffix "-") -}}
{{- end -}}
{{- end -}}

Expand Down
3 changes: 3 additions & 0 deletions stable/fairwinds-insights/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,9 @@ service:
# -- Prefix to use on hostname. Generally not needed.
sanitizedBranch:

# -- Maximum length for hostname prefix.
sanitizedPrefixMaxLength: 12

ingress:
# -- Enable Ingress
enabled: false
Expand Down

0 comments on commit 6e6b3d3

Please sign in to comment.