Skip to content

Commit

Permalink
build(repo): fix secretName on nats client websocket config
Browse files Browse the repository at this point in the history
  • Loading branch information
pedronauck committed Dec 17, 2024
1 parent 623e80e commit 966b732
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cluster/charts/fuel-streams/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
appVersion: "1.0"
description: A Helm chart for Kubernetes
name: fuel-streams
version: 0.5.5
version: 0.5.6
dependencies:
- name: nats
version: 1.2.6
Expand Down
28 changes: 28 additions & 0 deletions cluster/charts/fuel-streams/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@ Expand the name of the chart.
If nameOverride is provided in Values.config, use that instead of .Chart.Name.
The result is truncated to 63 chars and has any trailing "-" removed to comply with Kubernetes naming rules.
Returns: String - The chart name, truncated and cleaned
Example:
Given:
.Chart.Name = "fuel-streams"
.Values.config.nameOverride = "custom-name"
Result: "custom-name"
Given:
.Chart.Name = "fuel-streams"
.Values.config.nameOverride = null
Result: "fuel-streams"
*/}}
{{- define "fuel-streams.name" -}}
{{- default .Chart.Name .Values.config.nameOverride | trunc 63 | trimSuffix "-" }}
Expand All @@ -17,6 +27,24 @@ This template follows these rules:
- If not, concatenate release name and chart name with a hyphen
The result is truncated to 63 chars and has any trailing "-" removed to comply with Kubernetes naming rules.
Returns: String - The fully qualified app name, truncated and cleaned
Example:
Given:
.Values.config.fullnameOverride = "override-name"
Result: "override-name"
Given:
.Release.Name = "my-release"
.Chart.Name = "fuel-streams"
.Values.config.nameOverride = null
.Values.config.fullnameOverride = null
Result: "my-release-fuel-streams"
Given:
.Release.Name = "fuel-streams-prod"
.Chart.Name = "fuel-streams"
.Values.config.nameOverride = null
.Values.config.fullnameOverride = null
Result: "fuel-streams-prod"
*/}}
{{- define "fuel-streams.fullname" -}}
{{- if .Values.config.fullnameOverride }}
Expand Down
4 changes: 1 addition & 3 deletions cluster/charts/fuel-streams/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -493,9 +493,7 @@ nats-client:
dir: /etc/nats-certs/websocket
cert: tls.crt
key: tls.key
secretName:
$tplYaml: >-
{{- include "fuel-streams.fullname" . }}-nats-tls
secretName: fuel-streams-nats-tls
merge:
no_tls: false
same_origin: false
Expand Down

0 comments on commit 966b732

Please sign in to comment.