Skip to content

Commit ec6a360

Browse files
committed
Bump chart to 0.2.2 and add secret checks
Updated Chart.yaml and README to version 0.2.2 Added conditional rendering for accessToken and tokenCache Secrets only included when corresponding values are set
1 parent ad4dcd5 commit ec6a360

3 files changed

Lines changed: 10 additions & 2 deletions

File tree

charts/snds-exporter/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: snds-exporter
33
description: A Helm chart for running the snds-exporter with OAuth token files in Kubernetes.
44
type: application
5-
version: 0.2.1
5+
version: 0.2.2
66
appVersion: "0.2.2"
77
keywords:
88
- snds

charts/snds-exporter/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# snds-exporter
22

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

55
A Helm chart for running the snds-exporter with OAuth token files in Kubernetes.
66

charts/snds-exporter/templates/secrets.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,15 @@ metadata:
1010
{{- toYaml . | nindent 4 }}
1111
{{- end }}
1212
type: Opaque
13+
{{- $hasAccessToken := not (empty .Values.auth.secret.accessToken) }}
14+
{{- $hasTokenCache := not (empty .Values.auth.secret.tokenCache) }}
15+
{{- if or $hasAccessToken $hasTokenCache }}
1316
stringData:
17+
{{- if $hasAccessToken }}
1418
{{ .Values.auth.secret.accessTokenKey }}: {{ .Values.auth.secret.accessToken | quote }}
19+
{{- end }}
20+
{{- if $hasTokenCache }}
1521
{{ .Values.auth.secret.tokenCacheKey }}: {{ .Values.auth.secret.tokenCache | quote }}
22+
{{- end }}
23+
{{- end }}
1624
{{- end }}

0 commit comments

Comments
 (0)