Skip to content

Commit

Permalink
Fix annotations in the RedisCluster resource (#58)
Browse files Browse the repository at this point in the history
Moved the annotations from being the pod spec to the pod metadata
  • Loading branch information
voltbit authored Jan 20, 2021
1 parent ff23a6c commit 12b9708
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion controllers/k8sresources.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func (r *RedisClusterReconciler) makeRedisPod(redisCluster *dbv1.RedisCluster, n
Name: fmt.Sprintf("redis-node-%s", nodeNumber),
Namespace: redisCluster.ObjectMeta.Namespace,
Labels: podLabels,
Annotations: redisCluster.Spec.Annotations,
Annotations: redisCluster.Annotations,
},
Spec: *spec,
}
Expand Down
12 changes: 6 additions & 6 deletions helm/templates/rediscluster/rediscluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ kind: RedisCluster
metadata:
name: {{ .Values.redisCluster.name }}
namespace: {{ .Values.redisCluster.namespace }}
{{- if .Values.redisCluster.annotations }}
annotations: {{ toYaml .Values.redisCluster.annotations | nindent 4 }}
{{- end }}
{{- if .Values.redisCluster.labels }}
labels: {{ toYaml .Values.redisCluster.labels | nindent 4 }}
{{- end }}
spec:
{{- if .Values.redisCluster.leaderCount }}
leaderCount: {{ .Values.redisCluster.leaderCount }}
Expand All @@ -14,12 +20,6 @@ spec:
podLabelSelector: {{ toYaml .Values.redisCluster.podLabelSelector | nindent 4 }}
{{- if .Values.redisCluster.enableDefaultAffinity }}
enableDefaultAffinity: {{ .Values.redisCluster.enableDefaultAffinity }}
{{- end }}
{{- if .Values.redisCluster.annotations }}
annotations: {{ toYaml .Values.redisCluster.annotations | nindent 4 }}
{{- end }}
{{- if .Values.redisCluster.labels }}
annotations: {{ toYaml .Values.redisCluster.labels | nindent 4 }}
{{- end }}
redisPodSpec: {{ toYaml .Values.redisCluster.redisPodSpec | nindent 4 }}
{{- end }}

0 comments on commit 12b9708

Please sign in to comment.