diff --git a/charts/redis/.helmignore b/charts/redis/.helmignore new file mode 100644 index 00000000..0e8a0eb3 --- /dev/null +++ b/charts/redis/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/charts/redis/Chart.yaml b/charts/redis/Chart.yaml new file mode 100644 index 00000000..0ad6b90e --- /dev/null +++ b/charts/redis/Chart.yaml @@ -0,0 +1,18 @@ +apiVersion: v2 +name: redis +description: Redis database Helm chart +version: 0.1.0 +appVersion: "7.4" +type: application +keywords: + - redis + - database + - cache +home: https://codefresh.io/ +maintainers: + - name: codefresh + url: https://codefresh-io.github.io/ +dependencies: + - name: cf-common + repository: oci://quay.io/codefresh/charts + version: "0.31.0" diff --git a/charts/redis/templates/configmap.yaml b/charts/redis/templates/configmap.yaml new file mode 100644 index 00000000..e57b7776 --- /dev/null +++ b/charts/redis/templates/configmap.yaml @@ -0,0 +1,2 @@ +{{ $templateName := printf "cf-common-%s.configmaps" (index .Subcharts "cf-common").Chart.Version }} +{{- include $templateName . -}} diff --git a/charts/redis/templates/controller.yaml b/charts/redis/templates/controller.yaml new file mode 100644 index 00000000..1f865229 --- /dev/null +++ b/charts/redis/templates/controller.yaml @@ -0,0 +1,2 @@ +{{ $templateName := printf "cf-common-%s.controller" (index .Subcharts "cf-common").Chart.Version }} +{{- include $templateName . -}} diff --git a/charts/redis/templates/secret.yaml b/charts/redis/templates/secret.yaml new file mode 100644 index 00000000..7f5a94d1 --- /dev/null +++ b/charts/redis/templates/secret.yaml @@ -0,0 +1,2 @@ +{{ $templateName := printf "cf-common-%s.secrets" (index .Subcharts "cf-common").Chart.Version }} +{{- include $templateName . -}} diff --git a/charts/redis/templates/service.yaml b/charts/redis/templates/service.yaml new file mode 100644 index 00000000..58c51731 --- /dev/null +++ b/charts/redis/templates/service.yaml @@ -0,0 +1,2 @@ +{{ $templateName := printf "cf-common-%s.service" (index .Subcharts "cf-common").Chart.Version }} +{{- include $templateName . -}} diff --git a/charts/redis/values.yaml b/charts/redis/values.yaml new file mode 100644 index 00000000..7f97f2f0 --- /dev/null +++ b/charts/redis/values.yaml @@ -0,0 +1,104 @@ +fullnameOverride: redis + +config: + bind: 0.0.0.0 + port: 6379 + dir: /data + appendonly: "yes" + requirepass: password + +global: {} + +controller: + enabled: true + type: statefulset + replicas: 1 + podManagementPolicy: OrderedReady + +container: + image: + registry: docker.io + repository: redis + tag: "7.4" + pullPolicy: IfNotPresent + + args: + - "/etc/redis/redis.conf" + + probes: + liveness: + enabled: true + type: exec + exec: + command: + - redis-cli + - ping + spec: + initialDelaySeconds: 30 + periodSeconds: 20 + timeoutSeconds: 10 + successThreshold: 1 + failureThreshold: 6 + readiness: + enabled: true + type: exec + exec: + command: + - redis-cli + - ping + spec: + initialDelaySeconds: 5 + periodSeconds: 10 + timeoutSeconds: 5 + successThreshold: 1 + failureThreshold: 6 + + resources: + requests: + cpu: 100m + memory: 128Mi + limits: + cpu: 500m + memory: 256Mi + + volumeMounts: + config: + path: + - mountPath: /etc/redis/redis.conf + subPath: redis.conf + +volumeClaimTemplates: + data: + mountPath: /data + accessMode: ReadWriteOnce + size: 10Gi + storageClass: + +configMaps: + config: + enabled: true + data: + redis.conf: | + {{- range $key, $value := .Values.config }} + {{ $key }} {{ $value }} + {{- end }} + +volumes: + config: + enabled: true + type: configMap + +service: + main: + enabled: true + primary: true + type: ClusterIP + ports: + redis: + port: 6379 + protocol: TCP + +podSecurityContext: {} +nodeSelector: {} +tolerations: [] +affinity: {}