Skip to content
Snippets Groups Projects
Unverified Commit b8224731 authored by groundhog2k's avatar groundhog2k Committed by GitHub
Browse files

Removed default node selector and improved chart configuration (#128)

parent bbf31e28
No related branches found
No related tags found
No related merge requests found
...@@ -8,7 +8,7 @@ maintainers: ...@@ -8,7 +8,7 @@ maintainers:
- name: groundhog2k - name: groundhog2k
# This is the chart version # This is the chart version
version: 0.2.0 version: 0.2.1
# This is the version number of the application being deployed. # This is the version number of the application being deployed.
appVersion: "6.0.9" appVersion: "6.0.9"
# Redis # Redis
![Version: 0.2.0](https://img.shields.io/badge/Version-0.2.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 6.0.9](https://img.shields.io/badge/AppVersion-6.0.9-informational?style=flat-square) ![Version: 0.2.1](https://img.shields.io/badge/Version-0.2.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 6.0.9](https://img.shields.io/badge/AppVersion-6.0.9-informational?style=flat-square)
A Helm chart for Redis on Kubernetes A Helm chart for Redis on Kubernetes
...@@ -15,7 +15,7 @@ $ helm install my-release groundhog2k/redis ...@@ -15,7 +15,7 @@ $ helm install my-release groundhog2k/redis
This chart uses the original [Redis image from Docker Hub](https://hub.docker.com/_/redis/) to deploy a stateful Redis instance in a Kubernetes cluster. This chart uses the original [Redis image from Docker Hub](https://hub.docker.com/_/redis/) to deploy a stateful Redis instance in a Kubernetes cluster.
It fully supports deployment of arm64v8 and amd64 multi-architecture docker image. Just set the `nodeSelector` value to `kubernetes.io/arch: "arm64"` (default is `"amd64"`) It fully supports deployment of the multi-architecture docker image.
## Prerequisites ## Prerequisites
...@@ -57,11 +57,12 @@ $ helm uninstall my-release ...@@ -57,11 +57,12 @@ $ helm uninstall my-release
| livenessProbe | object | `see values.yaml` | Liveness probe configurationm | | livenessProbe | object | `see values.yaml` | Liveness probe configurationm |
| readinessProbe | object | `see values.yaml` | Readiness probe configuration | | readinessProbe | object | `see values.yaml` | Readiness probe configuration |
| resources | object | `{}` | Resource limits and requests | | resources | object | `{}` | Resource limits and requests |
| nodeSelector."kubernetes.io/arch" | string | `"amd64"` | Deployment node selector | | nodeSelector | object | `{}` | Deployment node selector |
| podAnnotations | object | `{}` | Additional pod annotations | | podAnnotations | object | `{}` | Additional pod annotations |
| podSecurityContext | object | `{}` | Pod security context | | podSecurityContext | object | `{}` | Pod security context |
| securityContext | object | `see values.yaml` | Container security context | | securityContext | object | `see values.yaml` | Container security context |
| env | object | `[]` | Additional container environmment variables | | env | object | `[]` | Additional container environmment variables |
| args | object | `[]` | Additional container command arguments |
| serviceAccount.annotations | object | `{}` | Additional service account annotations | | serviceAccount.annotations | object | `{}` | Additional service account annotations |
| serviceAccount.create | bool | `false` | Enable service account creation | | serviceAccount.create | bool | `false` | Enable service account creation |
| serviceAccount.name | string | `""` | Name of the service account | | serviceAccount.name | string | `""` | Name of the service account |
...@@ -79,13 +80,13 @@ $ helm uninstall my-release ...@@ -79,13 +80,13 @@ $ helm uninstall my-release
| Key | Type | Default | Description | | Key | Type | Default | Description |
|-----|------|---------|-------------| |-----|------|---------|-------------|
| storage.accessModes[0] | string | `"ReadWriteOnce"` | Storage access mode | | storage.accessModes[0] | string | `"ReadWriteOnce"` | Storage access mode |
| storage.persistentVolumeClaimName | string | `""` | PVC name when existing storage volume should be used | | storage.persistentVolumeClaimName | string | `nil` | PVC name when existing storage volume should be used |
| storage.requestedSize | string | `""` | Size for new PVC, when no existing PVC is used | | storage.requestedSize | string | `nil` | Size for new PVC, when no existing PVC is used |
| storage.className | string | `""` | Storage class name | | storage.className | string | `nil` | Storage class name |
## Redis parameters ## Redis parameters
| Key | Type | Default | Description | | Key | Type | Default | Description |
|-----|------|---------|-------------| |-----|------|---------|-------------|
| arguments | string | `nil` | Arguments for the container entrypoint process | | arguments | string | `nil` | Arguments for the container entrypoint process |
| redisConfig | string | `""` | Custom redis.conf | | redisConfig | string | `nil` | Custom redis.conf |
...@@ -7,5 +7,5 @@ metadata: ...@@ -7,5 +7,5 @@ metadata:
{{- include "redis.labels" . | nindent 4 }} {{- include "redis.labels" . | nindent 4 }}
data: data:
redis.conf: | redis.conf: |
{{ .Values.redisConfig | nindent 4 }} {{- .Values.redisConfig | nindent 4 }}
{{- end }} {{- end }}
...@@ -5,11 +5,17 @@ metadata: ...@@ -5,11 +5,17 @@ metadata:
labels: labels:
{{- include "redis.labels" . | nindent 4 }} {{- include "redis.labels" . | nindent 4 }}
spec: spec:
clusterIP: None type: {{ .Values.service.type }}
ports: ports:
- port: {{ .Values.service.port }} - port: {{ .Values.service.port }}
targetPort: redis targetPort: redis
protocol: TCP protocol: TCP
name: redis name: redis
{{- if and (eq .Values.service.type "NodePort") (.Values.service.nodePort) }}
nodePort: {{ .Values.service.nodePort }}
{{- end }}
{{- if and (eq .Values.service.type "LoadBalancer") (.Values.service.clusterIP) }}
clusterIP: {{ .Values.service.clusterIP }}
{{- end }}
selector: selector:
{{- include "redis.selectorLabels" . | nindent 4 }} {{- include "redis.selectorLabels" . | nindent 4 }}
...@@ -24,12 +24,16 @@ spec: ...@@ -24,12 +24,16 @@ spec:
{{- toYaml . | nindent 8 }} {{- toYaml . | nindent 8 }}
{{- end }} {{- end }}
serviceAccountName: {{ include "redis.serviceAccountName" . }} serviceAccountName: {{ include "redis.serviceAccountName" . }}
{{- with .Values.podSecurityContext }}
securityContext: securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }} {{- toYaml . | nindent 8 }}
{{- end }}
containers: containers:
- name: {{ .Chart.Name }} - name: {{ .Chart.Name }}
{{- with .Values.securityContext }}
securityContext: securityContext:
{{- toYaml .Values.securityContext | nindent 12 }} {{- toYaml . | nindent 12 }}
{{- end }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }} imagePullPolicy: {{ .Values.image.pullPolicy }}
ports: ports:
...@@ -66,11 +70,13 @@ spec: ...@@ -66,11 +70,13 @@ spec:
periodSeconds: {{ .periodSeconds }} periodSeconds: {{ .periodSeconds }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- with .Values.resources }}
resources: resources:
{{- toYaml .Values.resources | nindent 12 }} {{- toYaml . | nindent 12 }}
{{- if .Values.arguments }} {{- end }}
{{- if .Values.args }}
args: args:
{{- range .Values.arguments }} {{- range .Values.args }}
- {{ . }} - {{ . }}
{{- end }} {{- end }}
{{- end }} {{- end }}
......
...@@ -22,10 +22,8 @@ serviceAccount: ...@@ -22,10 +22,8 @@ serviceAccount:
# If not set and create is true, a name is generated using the fullname template # If not set and create is true, a name is generated using the fullname template
name: "" name: ""
## Default node type for the image ## Additional node selector
## use arm64 for the arm64v8/redis image nodeSelector: {}
nodeSelector:
kubernetes.io/arch: amd64
## Additional pod annotations ## Additional pod annotations
podAnnotations: {} podAnnotations: {}
...@@ -44,7 +42,12 @@ securityContext: ...@@ -44,7 +42,12 @@ securityContext:
## Default redis service port (default Redis port 6379) ## Default redis service port (default Redis port 6379)
service: service:
type: ClusterIP
port: 6379 port: 6379
## The node port (only relevant for type NodePort)
nodePort: {}
## The cluster ip address (only relevant for type LoadBalancer)
clusterIP: {}
## Resource limits and requests ## Resource limits and requests
resources: {} resources: {}
...@@ -81,7 +84,7 @@ readinessProbe: ...@@ -81,7 +84,7 @@ readinessProbe:
env: [] env: []
## Arguments for the container entrypoint process ## Arguments for the container entrypoint process
arguments: args: []
# Custom redis.conf # Custom redis.conf
redisConfig: | redisConfig: |
...@@ -89,13 +92,13 @@ redisConfig: | ...@@ -89,13 +92,13 @@ redisConfig: |
## Storage parameters ## Storage parameters
storage: storage:
## Set persistentVolumenClaimName to reference an existing PVC ## Set persistentVolumenClaimName to reference an existing PVC
# persistentVolumeClaimName: <own-pvc-name> persistentVolumeClaimName: {}
## Alternative set requestedSize to define a size for a dynmaically created PVC ## Alternative set requestedSize to define a size for a dynmaically created PVC
# requestedSize: <volume-size> requestedSize: {}
## the storage class name ## the storage class name
# className: className: {}
## Default access mode (ReadWriteOnce) ## Default access mode (ReadWriteOnce)
accessModes: accessModes:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment