diff --git a/chart/redis-cluster/redis.conf b/chart/redis-cluster/redis.conf new file mode 100644 index 00000000..4a0ff87f --- /dev/null +++ b/chart/redis-cluster/redis.conf @@ -0,0 +1,3 @@ +protected-mode no +bind 0.0.0.0 +port 6379 diff --git a/chart/redis-cluster/templates/RedisCluster.yml b/chart/redis-cluster/templates/RedisCluster.yml index b3cd8f26..63aabc5c 100644 --- a/chart/redis-cluster/templates/RedisCluster.yml +++ b/chart/redis-cluster/templates/RedisCluster.yml @@ -35,7 +35,6 @@ spec: "--t=10s", "--d=10s", "--ns=$(POD_NAMESPACE)", - "--ip=$(POD_IP)", {{- if .Values.resources }} "--max-memory=$(MEMORY_REQUEST)", {{- end }} @@ -66,10 +65,6 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace - - name: POD_IP - valueFrom: - fieldRef: - fieldPath: status.podIP {{- if .Values.resources }} - name: MEMORY_REQUEST valueFrom: diff --git a/chart/redis-cluster/templates/configmap.yaml b/chart/redis-cluster/templates/configmap.yaml index 2db713dc..80606bbc 100644 --- a/chart/redis-cluster/templates/configmap.yaml +++ b/chart/redis-cluster/templates/configmap.yaml @@ -2,11 +2,11 @@ apiVersion: v1 kind: ConfigMap metadata: - name: {{ template "cluster-name" . }} + name: {{ template "clustername" . }} labels: app: {{ template "name" . }} data: redis.conf: |- {{ (.Files.Get .Values.redis.configuration.file) | indent 4 }} -{{- end }} \ No newline at end of file +{{- end }} diff --git a/chart/redis-cluster/templates/rbac.yaml b/chart/redis-cluster/templates/rbac.yaml index e26aa940..ef74edbc 100644 --- a/chart/redis-cluster/templates/rbac.yaml +++ b/chart/redis-cluster/templates/rbac.yaml @@ -1,4 +1,4 @@ -{{- if .Capabilities.APIVersions.Has "rbac.authorization.k8s.io/v1beta1" }} +{{- if .Values.rbac }} apiVersion: v1 kind: List items: @@ -26,4 +26,4 @@ items: - kind: ServiceAccount name: {{ template "serviceaccount" . }} namespace: {{ .Release.Namespace }} -{{ end }} \ No newline at end of file +{{- end }} diff --git a/chart/redis-cluster/values.yaml b/chart/redis-cluster/values.yaml index 10da033d..9716dad5 100644 --- a/chart/redis-cluster/values.yaml +++ b/chart/redis-cluster/values.yaml @@ -35,4 +35,5 @@ redis: # you can provide the path of a redis configuration file that will be added in a configMap and included # in the redis-server configuration in each redis-cluster node. # the file must be local of the helm chart (in the chart folder). - file: "" + file: "redis.conf" +rbac: true