From b38b6a2c5fba1958667b6a91ea9a606f3808dc1a Mon Sep 17 00:00:00 2001 From: Muhammed Hussein Karimi Date: Fri, 24 Jan 2025 21:30:26 +0330 Subject: [PATCH] :bug: Fix templating for port value type Signed-off-by: Muhammed Hussein Karimi --- charts/haproxy-redis-sentinel/Chart.yaml | 2 +- charts/haproxy-redis-sentinel/README.md | 4 ++-- charts/haproxy-redis-sentinel/templates/deployment.yaml | 6 +++++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/charts/haproxy-redis-sentinel/Chart.yaml b/charts/haproxy-redis-sentinel/Chart.yaml index e084352..762d87b 100644 --- a/charts/haproxy-redis-sentinel/Chart.yaml +++ b/charts/haproxy-redis-sentinel/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: haproxy-redis-sentinel description: A Helm chart for HAProxy with Redis Sentinel -version: 0.1.1 +version: 0.1.2 appVersion: "0.0.11" icon: https://raw.githubusercontent.com/ParminCloud/haproxy-redis-sentinel/master/docs/icon.png sources: diff --git a/charts/haproxy-redis-sentinel/README.md b/charts/haproxy-redis-sentinel/README.md index 37bcf64..c348e57 100644 --- a/charts/haproxy-redis-sentinel/README.md +++ b/charts/haproxy-redis-sentinel/README.md @@ -4,7 +4,7 @@

-![Version: 0.0.21](https://img.shields.io/badge/Version-0.0.21-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.0](https://img.shields.io/badge/AppVersion-0.1.0-informational?style=flat-square) +![Version: 0.1.2](https://img.shields.io/badge/Version-0.1.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.0.11](https://img.shields.io/badge/AppVersion-0.0.11-informational?style=flat-square) A Helm chart for HAProxy with Redis Sentinel @@ -47,7 +47,7 @@ This chart can be used alongside every chart that provides access to Redis Senti | haproxyRedisSentinel.image.repository | string | `"ghcr.io/parmincloud/haproxy-redis-sentinel"` | haproxy-redis-sentinel image repository | | haproxyRedisSentinel.image.tag | string | `""` | haproxy-redis-sentinel image tag (defaults to appVersion of chart) | | haproxyRedisSentinel.resources | object | `{}` | haproxy-redis-sentinel resources | -| haproxyRedisSentinel.sentinel | object | `{"host":"","masterName":"mymaster","password":"","port":""}` | Redis Sentinel information | +| haproxyRedisSentinel.sentinel | object | `{"host":"","masterName":"mymaster","password":"","port":""}` | Redis Sentinel information (Supports templating) | | nameOverride | string | `""` | overrides name of the suffix used for resources (defaults to `haproxy`) | | replicaCount | int | `1` | number of replicas for deployment | diff --git a/charts/haproxy-redis-sentinel/templates/deployment.yaml b/charts/haproxy-redis-sentinel/templates/deployment.yaml index aece660..626c49b 100644 --- a/charts/haproxy-redis-sentinel/templates/deployment.yaml +++ b/charts/haproxy-redis-sentinel/templates/deployment.yaml @@ -63,11 +63,15 @@ spec: imagePullPolicy: {{ .Values.haproxyRedisSentinel.image.pullPolicy }} env: - name: SENTINEL_PASSWORD - value: {{ tpl (.Values.haproxyRedisSentinel.sentinel.password | quote) . }} + value: {{ tpl (.Values.haproxyRedisSentinel.sentinel.password) . }} - name: SENTINEL_HOST value: {{ tpl .Values.haproxyRedisSentinel.sentinel.host . }} - name: SENTINEL_PORT + {{- if .Values.haproxyRedisSentinel.sentinel.port | kindIs "int" }} value: {{ tpl (.Values.haproxyRedisSentinel.sentinel.port | quote) . }} + {{- else }} + value: {{ tpl (.Values.haproxyRedisSentinel.sentinel.port) . }} + {{- end }} - name: MASTER_NAME value: {{ tpl .Values.haproxyRedisSentinel.sentinel.masterName . }} - name: HAPROXY_BACKEND