switch redis
This commit is contained in:
		@@ -24,10 +24,10 @@ spec:
 | 
			
		||||
apiVersion: external-secrets.io/v1
 | 
			
		||||
kind: ExternalSecret
 | 
			
		||||
metadata:
 | 
			
		||||
  name: postiz-valkey-config
 | 
			
		||||
  name: postiz-redis-config
 | 
			
		||||
  namespace: {{ .Release.Namespace }}
 | 
			
		||||
  labels:
 | 
			
		||||
    app.kubernetes.io/name: postiz-valkey-config
 | 
			
		||||
    app.kubernetes.io/name: postiz-redis-config
 | 
			
		||||
    app.kubernetes.io/instance: {{ .Release.Name }}
 | 
			
		||||
    app.kubernetes.io/part-of: {{ .Release.Name }}
 | 
			
		||||
spec:
 | 
			
		||||
@@ -35,27 +35,27 @@ spec:
 | 
			
		||||
    kind: ClusterSecretStore
 | 
			
		||||
    name: vault
 | 
			
		||||
  data:
 | 
			
		||||
    - secretKey: REDIS_URL
 | 
			
		||||
      remoteRef:
 | 
			
		||||
        conversionStrategy: Default
 | 
			
		||||
        decodingStrategy: None
 | 
			
		||||
        key: /cl01tl/postiz/redis
 | 
			
		||||
        metadataPolicy: None
 | 
			
		||||
        property: REDIS_URL
 | 
			
		||||
    - secretKey: user
 | 
			
		||||
      remoteRef:
 | 
			
		||||
        conversionStrategy: Default
 | 
			
		||||
        decodingStrategy: None
 | 
			
		||||
        key: /cl01tl/postiz/valkey
 | 
			
		||||
        key: /cl01tl/postiz/redis
 | 
			
		||||
        metadataPolicy: None
 | 
			
		||||
        property: user
 | 
			
		||||
    - secretKey: password
 | 
			
		||||
      remoteRef:
 | 
			
		||||
        conversionStrategy: Default
 | 
			
		||||
        decodingStrategy: None
 | 
			
		||||
        key: /cl01tl/postiz/valkey
 | 
			
		||||
        key: /cl01tl/postiz/redis
 | 
			
		||||
        metadataPolicy: None
 | 
			
		||||
        property: password
 | 
			
		||||
    - secretKey: REDIS_URL
 | 
			
		||||
      remoteRef:
 | 
			
		||||
        conversionStrategy: Default
 | 
			
		||||
        decodingStrategy: None
 | 
			
		||||
        key: /cl01tl/postiz/valkey
 | 
			
		||||
        metadataPolicy: None
 | 
			
		||||
        property: REDIS_URL
 | 
			
		||||
 | 
			
		||||
---
 | 
			
		||||
apiVersion: external-secrets.io/v1
 | 
			
		||||
 
 | 
			
		||||
@@ -0,0 +1,35 @@
 | 
			
		||||
apiVersion: redis.redis.opstreelabs.in/v1beta2
 | 
			
		||||
kind: RedisReplication
 | 
			
		||||
metadata:
 | 
			
		||||
  name: redis-replication-postiz
 | 
			
		||||
  namespace: {{ .Release.Namespace }}
 | 
			
		||||
  labels:
 | 
			
		||||
    app.kubernetes.io/name: redis-replication-postiz
 | 
			
		||||
    app.kubernetes.io/instance: {{ .Release.Name }}
 | 
			
		||||
    app.kubernetes.io/part-of: {{ .Release.Name }}
 | 
			
		||||
spec:
 | 
			
		||||
  clusterSize: 3
 | 
			
		||||
  podSecurityContext:
 | 
			
		||||
    runAsUser: 1000
 | 
			
		||||
    fsGroup: 1000
 | 
			
		||||
  kubernetesConfig:
 | 
			
		||||
    image: quay.io/opstree/redis:v8.0.3
 | 
			
		||||
    imagePullPolicy: IfNotPresent
 | 
			
		||||
    redisSecret:
 | 
			
		||||
      name: postiz-redis-config
 | 
			
		||||
      key: password
 | 
			
		||||
    resources:
 | 
			
		||||
      requests:
 | 
			
		||||
        cpu: 50m
 | 
			
		||||
        memory: 128Mi
 | 
			
		||||
  storage:
 | 
			
		||||
    volumeClaimTemplate:
 | 
			
		||||
      spec:
 | 
			
		||||
        storageClassName: ceph-block
 | 
			
		||||
        accessModes: ["ReadWriteOnce"]
 | 
			
		||||
        resources:
 | 
			
		||||
          requests:
 | 
			
		||||
            storage: 1Gi
 | 
			
		||||
  redisExporter:
 | 
			
		||||
    enabled: true
 | 
			
		||||
    image: quay.io/opstree/redis-exporter:v1.48.0
 | 
			
		||||
@@ -0,0 +1,19 @@
 | 
			
		||||
apiVersion: monitoring.coreos.com/v1
 | 
			
		||||
kind: ServiceMonitor
 | 
			
		||||
metadata:
 | 
			
		||||
  name: redis-replication-postiz
 | 
			
		||||
  namespace: {{ .Release.Namespace }}
 | 
			
		||||
  labels:
 | 
			
		||||
    app.kubernetes.io/name: redis-replication-postiz
 | 
			
		||||
    app.kubernetes.io/instance: {{ .Release.Name }}
 | 
			
		||||
    app.kubernetes.io/part-of: {{ .Release.Name }}
 | 
			
		||||
    redis-operator: "true"
 | 
			
		||||
    env: production
 | 
			
		||||
spec:
 | 
			
		||||
  selector:
 | 
			
		||||
    matchLabels:
 | 
			
		||||
      redis_setup_type: replication
 | 
			
		||||
  endpoints:
 | 
			
		||||
    - port: redis-exporter
 | 
			
		||||
      interval: 30s
 | 
			
		||||
      scrapeTimeout: 10s
 | 
			
		||||
@@ -31,7 +31,7 @@ postiz:
 | 
			
		||||
            - name: REDIS_URL
 | 
			
		||||
              valueFrom:
 | 
			
		||||
                secretKeyRef:
 | 
			
		||||
                  name: postiz-valkey-config
 | 
			
		||||
                  name: postiz-redis-config
 | 
			
		||||
                  key: REDIS_URL
 | 
			
		||||
            - name: BACKEND_INTERNAL_URL
 | 
			
		||||
              value: http://localhost:3000
 | 
			
		||||
@@ -102,30 +102,6 @@ postiz:
 | 
			
		||||
          main:
 | 
			
		||||
            - path: /uploads
 | 
			
		||||
              readOnly: false
 | 
			
		||||
valkey:
 | 
			
		||||
  architecture: replication
 | 
			
		||||
  auth:
 | 
			
		||||
    enabled: true
 | 
			
		||||
    existingSecret: postiz-valkey-config
 | 
			
		||||
    existingSecretPasswordKey: password
 | 
			
		||||
    usePasswordFiles: false
 | 
			
		||||
  primary:
 | 
			
		||||
    resources:
 | 
			
		||||
      requests:
 | 
			
		||||
        cpu: 100m
 | 
			
		||||
        memory: 64Mi
 | 
			
		||||
    persistence:
 | 
			
		||||
      enabled: true
 | 
			
		||||
      size: 1Gi
 | 
			
		||||
  replica:
 | 
			
		||||
    replicaCount: 1
 | 
			
		||||
    resources:
 | 
			
		||||
      requests:
 | 
			
		||||
        cpu: 100m
 | 
			
		||||
        memory: 64Mi
 | 
			
		||||
    persistence:
 | 
			
		||||
      enabled: true
 | 
			
		||||
      size: 1Gi
 | 
			
		||||
cloudflared:
 | 
			
		||||
  name: cloudflared-postiz
 | 
			
		||||
  existingSecretName: postiz-cloudflared-secret
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user