Skip to content

Commit a07b4c1

Browse files
authored
Merge pull request #525 from j18e/add-arbitrary-labels-in-chart
allow for arbitrary labels in chart
2 parents 243ff47 + 7ea8002 commit a07b4c1

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

charts/redisoperator/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ appVersion: 1.2.2
44
apiVersion: v1
55
description: A Helm chart for the Spotahome Redis Operator
66
name: redis-operator
7-
version: 3.2.4
7+
version: 3.2.5
88
home: https://github.com/spotahome/redis-operator
99
keywords:
1010
- "golang"

charts/redisoperator/templates/_helpers.tpl

+4-1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
4545
{{- end }}
4646
app.kubernetes.io/managed-by: {{ .Release.Service }}
4747
app.kubernetes.io/part-of: {{ include "chart.name" . }}
48+
{{- range $k, $v := .Values.labels }}
49+
{{ $k }}: {{ $v }}
50+
{{- end }}
4851
{{- end -}}
4952

5053
{{/*
@@ -72,4 +75,4 @@ Create the name of the service account to use
7275
{{- with .Values.imageCredentials }}
7376
{{- printf "{\"auths\":{\"%s\":{\"username\":\"%s\",\"password\":\"%s\",\"email\":\"%s\",\"auth\":\"%s\"}}}" .registry .username .password .email (printf "%s:%s" .username .password | b64enc) | b64enc }}
7477
{{- end }}
75-
{{- end }}
78+
{{- end }}

operator/redisfailover/service/generator_test.go

+2-6
Original file line numberDiff line numberDiff line change
@@ -1488,7 +1488,6 @@ func TestSentinelImagePullPolicy(t *testing.T) {
14881488
}
14891489

14901490
func TestRedisExtraVolumeMounts(t *testing.T) {
1491-
14921491
mode := int32(755)
14931492
tests := []struct {
14941493
name string
@@ -1564,7 +1563,6 @@ func TestRedisExtraVolumeMounts(t *testing.T) {
15641563
}
15651564

15661565
func TestSentinelExtraVolumeMounts(t *testing.T) {
1567-
15681566
mode := int32(755)
15691567
tests := []struct {
15701568
name string
@@ -1640,7 +1638,6 @@ func TestSentinelExtraVolumeMounts(t *testing.T) {
16401638
}
16411639

16421640
func TestCustomPort(t *testing.T) {
1643-
16441641
default_port := int32(6379)
16451642
custom_port := int32(12345)
16461643
tests := []struct {
@@ -1696,7 +1693,6 @@ func TestCustomPort(t *testing.T) {
16961693
}
16971694

16981695
func TestRedisEnv(t *testing.T) {
1699-
17001696
default_port := int32(6379)
17011697
tests := []struct {
17021698
name string
@@ -1709,7 +1705,7 @@ func TestRedisEnv(t *testing.T) {
17091705
expectedRedisEnv: []corev1.EnvVar{
17101706
{
17111707
Name: "REDIS_ADDR",
1712-
Value: fmt.Sprintf("redis://localhost:%[1]v", default_port),
1708+
Value: fmt.Sprintf("redis://127.0.0.1:%[1]v", default_port),
17131709
},
17141710
{
17151711
Name: "REDIS_PORT",
@@ -1727,7 +1723,7 @@ func TestRedisEnv(t *testing.T) {
17271723
expectedRedisEnv: []corev1.EnvVar{
17281724
{
17291725
Name: "REDIS_ADDR",
1730-
Value: fmt.Sprintf("redis://localhost:%[1]v", default_port),
1726+
Value: fmt.Sprintf("redis://127.0.0.1:%[1]v", default_port),
17311727
},
17321728
{
17331729
Name: "REDIS_PORT",

0 commit comments

Comments
 (0)