diff --git a/charts/plumber/Chart.lock b/charts/plumber/Chart.lock deleted file mode 100644 index 965c32a..0000000 --- a/charts/plumber/Chart.lock +++ /dev/null @@ -1,6 +0,0 @@ -dependencies: -- name: redis - repository: https://charts.bitnami.com/bitnami - version: 25.3.9 -digest: sha256:b73bce4f620c0eb4c95400630198c7fbb2dcd542c682a924f0b52c7e611ae000 -generated: "2026-04-02T14:27:22.689377+02:00" diff --git a/charts/plumber/Chart.yaml b/charts/plumber/Chart.yaml index 41a5f7a..397f16e 100644 --- a/charts/plumber/Chart.yaml +++ b/charts/plumber/Chart.yaml @@ -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 @@ -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 diff --git a/charts/plumber/templates/_helpers.tpl b/charts/plumber/templates/_helpers.tpl index e69de29..38ad974 100644 --- a/charts/plumber/templates/_helpers.tpl +++ b/charts/plumber/templates/_helpers.tpl @@ -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 }} diff --git a/charts/plumber/templates/redis-deployment.yaml b/charts/plumber/templates/redis-deployment.yaml new file mode 100644 index 0000000..2515e42 --- /dev/null +++ b/charts/plumber/templates/redis-deployment.yaml @@ -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 }} diff --git a/charts/plumber/templates/redis-service.yaml b/charts/plumber/templates/redis-service.yaml new file mode 100644 index 0000000..a0d5818 --- /dev/null +++ b/charts/plumber/templates/redis-service.yaml @@ -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 }} diff --git a/charts/plumber/values.yaml b/charts/plumber/values.yaml index 7b766a8..80d04ad 100644 --- a/charts/plumber/values.yaml +++ b/charts/plumber/values.yaml @@ -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 /:. + # 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 (-redis-master). + # When deploy is true and custom.host is empty, the host defaults to -redis-master. custom: host: "" user: "default"