Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions charts/plumber/Chart.lock

This file was deleted.

9 changes: 2 additions & 7 deletions charts/plumber/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: v2
name: plumber
description: Helm chart for Plumber
type: application
version: "1.2.0"
appVersion: "1.2.0"
version: "1.3.0"
appVersion: "1.3.0"
home: https://github.com/getplumber/platform/
maintainers:
- name: devpro
Expand All @@ -16,8 +16,3 @@ maintainers:
email: thibaud@getplumber.io
- name: Joseph94m
email: joseph.moukarzel@jmclarity.com
dependencies:
- name: redis
version: "~25"
repository: https://charts.bitnami.com/bitnami
condition: redis.deploy
12 changes: 12 additions & 0 deletions charts/plumber/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{{/*
Build the Redis image reference from values.
Produces: [registry/]repository:tag[@digest]
*/}}
{{- define "plumber.redisImage" -}}
{{- $reg := .Values.redis.image.registry -}}
{{- $repo := .Values.redis.image.repository -}}
{{- $tag := .Values.redis.image.tag -}}
{{- $dig := .Values.redis.image.digest -}}
{{- $base := ternary (printf "%s/%s" $reg $repo) $repo (ne $reg "") -}}
{{- ternary (printf "%s:%s@%s" $base $tag $dig) (printf "%s:%s" $base $tag) (ne $dig "") -}}
{{- end }}
69 changes: 69 additions & 0 deletions charts/plumber/templates/redis-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{{- if .Values.redis.deploy }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ printf "%s-redis-master" .Release.Name }}
labels:
app: {{ printf "%s-redis-master" .Release.Name }}
app.kubernetes.io/name: {{ printf "%s-redis-master" .Release.Name }}
{{- range $key, $val := .Values.additionalLabels }}
{{ $key }}: {{ $val | quote }}
{{- end }}
{{- with .Values.additionalAnnotations }}
annotations:
{{- range $key, $val := . }}
{{ $key }}: {{ $val | quote }}
{{- end }}
{{- end }}
spec:
replicas: 1
selector:
matchLabels:
app: {{ printf "%s-redis-master" .Release.Name }}
app.kubernetes.io/name: {{ printf "%s-redis-master" .Release.Name }}
template:
metadata:
labels:
app: {{ printf "%s-redis-master" .Release.Name }}
app.kubernetes.io/name: {{ printf "%s-redis-master" .Release.Name }}
{{- range $key, $val := .Values.additionalLabels }}
{{ $key }}: {{ $val | quote }}
{{- end }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: redis
image: {{ include "plumber.redisImage" . }}
imagePullPolicy: {{ .Values.redis.image.pullPolicy | default "IfNotPresent" }}
ports:
- name: redis
containerPort: 6379
protocol: TCP
{{- if or .Values.redis.auth.existingSecret .Values.redis.auth.password }}
command: ["redis-server", "--requirepass", "$(REDIS_PASSWORD)"]
env:
- name: REDIS_PASSWORD
{{- if .Values.redis.auth.existingSecret }}
valueFrom:
secretKeyRef:
name: {{ .Values.redis.auth.existingSecret | quote }}
key: {{ .Values.redis.auth.existingSecretPasswordKey | quote }}
{{- else }}
value: {{ .Values.redis.auth.password | quote }}
{{- end }}
{{- end }}
livenessProbe:
tcpSocket:
port: redis
initialDelaySeconds: 10
periodSeconds: 30
readinessProbe:
tcpSocket:
port: redis
initialDelaySeconds: 5
periodSeconds: 10
resources: {}
{{- end }}
28 changes: 28 additions & 0 deletions charts/plumber/templates/redis-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{{- if .Values.redis.deploy }}
apiVersion: v1
kind: Service
metadata:
name: {{ printf "%s-redis-master" .Release.Name }}
labels:
app: {{ printf "%s-redis-master" .Release.Name }}
app.kubernetes.io/name: {{ printf "%s-redis-master" .Release.Name }}
{{- range $key, $val := .Values.additionalLabels }}
{{ $key }}: {{ $val | quote }}
{{- end }}
{{- with .Values.additionalAnnotations }}
annotations:
{{- range $key, $val := . }}
{{ $key }}: {{ $val | quote }}
{{- end }}
{{- end }}
spec:
type: ClusterIP
selector:
app: {{ printf "%s-redis-master" .Release.Name }}
app.kubernetes.io/name: {{ printf "%s-redis-master" .Release.Name }}
ports:
- name: redis
port: 6379
targetPort: redis
protocol: TCP
{{- end }}
40 changes: 17 additions & 23 deletions charts/plumber/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -262,34 +262,28 @@ postgresql:

# Redis
redis:
# -- Set to true to deploy a Redis instance as part of this chart (via bitnami/redis sub-chart).
# When false (default), Redis is treated as an external dependency and you must provide connection details below.
# -- Set to true to deploy a Redis instance as part of this chart.
# When false, Redis is treated as an external dependency provide connection details in custom below.
deploy: false

# -- Redis architecture when deployed by this chart. Options: "standalone" or "replication".
# Keep Standalone for now because we do not support replication yet.
architecture: standalone

# Image configuration (only used when deploy is true).
# Override these to pull from a private registry or mirror.
# When using a non-bitnami registry, you must also set global.security.allowInsecureImages to true.
# Image configuration for the bundled Redis instance (only used when deploy is true).
image:
# registry: my-private-registry.example.com
# repository: bitnami/redis
# tag: "latest"
digest: "sha256:98cf67395e80506c7bc21b889107980365558ef30d59059ac6d76aab2678bf7e"
# pullPolicy: IfNotPresent
# pullSecrets:
# - my-registry-secret

# Persistence for deployed Redis (only used when deploy is true).
# Disabled by default — Redis is used as a cache/queue, data loss on restart is acceptable.
master:
persistence:
enabled: false
# -- Optional registry prefix (e.g. my-private-registry.example.com).
# When set, the image is pulled as <registry>/<repository>:<tag>.
# Leave empty to use repository as-is.
registry: ""
# -- Image repository. Override to pull from a mirror or private registry.
repository: redis
# -- Image tag.
tag: "8.4"
# -- Optional content-addressable digest (sha256:...).
# When set, pins the exact image version regardless of tag.
digest: ""
# -- Pull policy for the Redis image.
pullPolicy: IfNotPresent

# Connection details for the Redis instance (used whether deployed by this chart or external).
# When deploy is true and custom.host is empty, the host defaults to the sub-chart's service (<release>-redis-master).
# When deploy is true and custom.host is empty, the host defaults to <release>-redis-master.
custom:
host: ""
user: "default"
Expand Down
Loading