valkey cluster example that does not currently work as sidekiq does not support redis-cluster:
---
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: valkey-cluster-appset
namespace: argocd
spec:
# enable go templating
goTemplate: true
generators:
- plugin:
configMapRef:
name: secret-var-plugin-generator
input:
parameters:
secret_vars:
- global_time_zone
- global_pvc_storage_class
# - mastodon_valkey_access_mode
- mastodon_valkey_storage
- mastodon_valkey_storage_class
template:
metadata:
name: valkey-cluster-app
annotations:
argocd.argoproj.io/sync-wave: "1"
spec:
project: mastodon
destination:
server: https://kubernetes.default.svc
namespace: mastodon
syncPolicy:
syncOptions:
- CreateNamespace=true
- ApplyOutOfSyncOnly=true
automated:
prune: true
selfHeal: true
source:
repoURL: 'registry-1.docker.io'
chart: bitnamicharts/valkey-cluster
targetRevision: 1.0.2
helm:
valuesObject:
global:
storageClass: "local-path"
fullnameOverride: "valkey"
usePassword: true
existingSecret: "mastodon-valkey-credentials"
existingSecretPasswordKey: "valkey-password"
tls:
enabled: false
authClients: true
autoGenerated: false
persistence:
enabled: true
path: /bitnami/valkey/data
storageClass: "{{ .mastodon_valkey_storage_class }}"
annotations:
k8up.io/backup: 'true'
accessModes:
- ReadWriteOnce
size: '{{ .mastodon_valkey_storage }}'
persistentVolumeClaimRetentionPolicy:
enabled: true
whenScaled: Retain
whenDeleted: Retain
valkey:
command: []
args: []
updateStrategy:
type: RollingUpdate
rollingUpdate:
partition: 0
podManagementPolicy: Parallel
automountServiceAccountToken: false
hostNetwork: false
useAOFPersistence: "yes"
containerPorts:
valkey: 6379
bus: 16379
resourcesPreset: "nano"
resources: {}
cluster:
init: true
nodes: 6
replicas: 1
externalAccess:
enabled: false
hostMode: false
service:
disableLoadBalancerIP: false
type: LoadBalancer
port: 6379
loadBalancerIP: []
loadBalancerSourceRanges: []
# metrics on valkey cluster
metrics:
# we use a grafana exporter that logs into valkey directly
enabled: false