Skip to content

Commit

Permalink
Make redis non stateful.
Browse files Browse the repository at this point in the history
Its state is kept in memory.
  • Loading branch information
n-g committed Jul 5, 2024
1 parent aa4829e commit cc6d68c
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions library/oss/redis/templates/server.cue
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,8 @@ package templates

#Server: {
spec: {
image: *"redis:6.2.6-alpine@sha256:132337b9d7744ffee4fae83f51de53c3530935ad3ba528b7110f2d805f55cbf5" | string
dataVolumeSize: *"10GiB" | string
dataVolume: *{
id: "redis-server-data"
size: dataVolumeSize
} | {
id: string
size: string
}
image: *"redis:6.2.6-alpine@sha256:132337b9d7744ffee4fae83f51de53c3530935ad3ba528b7110f2d805f55cbf5" | string
dataVolumeSize: *"10GiB" | string
passwordSecret: *"namespacelabs.dev/foundation/library/oss/redis/server:password" | string
snapshotInterval: *"60" | string
}
Expand All @@ -19,8 +12,6 @@ package templates

image: spec.image

class: "stateful"

services: "redis": {
port: 6379
kind: "tcp"
Expand All @@ -44,6 +35,8 @@ package templates
probe: exec: ["redis-cli", "ping"]

mounts: {
"/data": persistent: spec.dataVolume
"/data": ephemeral: {
size: spec.dataVolumeSize
}
}
}

0 comments on commit cc6d68c

Please sign in to comment.