Skip to content

Commit

Permalink
Merge pull request #525 from j18e/add-arbitrary-labels-in-chart
Browse files Browse the repository at this point in the history
allow for arbitrary labels in chart
  • Loading branch information
ese authored Nov 23, 2022
2 parents 243ff47 + 7ea8002 commit a07b4c1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion charts/redisoperator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ appVersion: 1.2.2
apiVersion: v1
description: A Helm chart for the Spotahome Redis Operator
name: redis-operator
version: 3.2.4
version: 3.2.5
home: https://github.com/spotahome/redis-operator
keywords:
- "golang"
Expand Down
5 changes: 4 additions & 1 deletion charts/redisoperator/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/part-of: {{ include "chart.name" . }}
{{- range $k, $v := .Values.labels }}
{{ $k }}: {{ $v }}
{{- end }}
{{- end -}}

{{/*
Expand Down Expand Up @@ -72,4 +75,4 @@ Create the name of the service account to use
{{- with .Values.imageCredentials }}
{{- printf "{\"auths\":{\"%s\":{\"username\":\"%s\",\"password\":\"%s\",\"email\":\"%s\",\"auth\":\"%s\"}}}" .registry .username .password .email (printf "%s:%s" .username .password | b64enc) | b64enc }}
{{- end }}
{{- end }}
{{- end }}
8 changes: 2 additions & 6 deletions operator/redisfailover/service/generator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1488,7 +1488,6 @@ func TestSentinelImagePullPolicy(t *testing.T) {
}

func TestRedisExtraVolumeMounts(t *testing.T) {

mode := int32(755)
tests := []struct {
name string
Expand Down Expand Up @@ -1564,7 +1563,6 @@ func TestRedisExtraVolumeMounts(t *testing.T) {
}

func TestSentinelExtraVolumeMounts(t *testing.T) {

mode := int32(755)
tests := []struct {
name string
Expand Down Expand Up @@ -1640,7 +1638,6 @@ func TestSentinelExtraVolumeMounts(t *testing.T) {
}

func TestCustomPort(t *testing.T) {

default_port := int32(6379)
custom_port := int32(12345)
tests := []struct {
Expand Down Expand Up @@ -1696,7 +1693,6 @@ func TestCustomPort(t *testing.T) {
}

func TestRedisEnv(t *testing.T) {

default_port := int32(6379)
tests := []struct {
name string
Expand All @@ -1709,7 +1705,7 @@ func TestRedisEnv(t *testing.T) {
expectedRedisEnv: []corev1.EnvVar{
{
Name: "REDIS_ADDR",
Value: fmt.Sprintf("redis://localhost:%[1]v", default_port),
Value: fmt.Sprintf("redis://127.0.0.1:%[1]v", default_port),
},
{
Name: "REDIS_PORT",
Expand All @@ -1727,7 +1723,7 @@ func TestRedisEnv(t *testing.T) {
expectedRedisEnv: []corev1.EnvVar{
{
Name: "REDIS_ADDR",
Value: fmt.Sprintf("redis://localhost:%[1]v", default_port),
Value: fmt.Sprintf("redis://127.0.0.1:%[1]v", default_port),
},
{
Name: "REDIS_PORT",
Expand Down

0 comments on commit a07b4c1

Please sign in to comment.