mirror of
https://github.com/auricom/home-cluster.git
synced 2025-09-17 18:24:14 +02:00
🔥 redis
This commit is contained in:
@@ -9,4 +9,3 @@ resources:
|
||||
- ./cloudnative-pg/ks.yaml
|
||||
- ./dragonfly/ks.yaml
|
||||
- ./influx/ks.yaml
|
||||
- ./redis/ks.yaml
|
||||
|
@@ -1,37 +0,0 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.26.1-standalone-strict/configmap-v1.json
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: redis-healthcheck
|
||||
labels:
|
||||
app.kubernetes.io/name: redis
|
||||
data:
|
||||
ping_readiness.sh: |-
|
||||
#!/bin/sh
|
||||
export REDISCLI_AUTH="$REDIS_PASSWORD"
|
||||
response=$(
|
||||
timeout -s 3 $1 \
|
||||
redis-cli \
|
||||
-h localhost \
|
||||
-p $REDIS_PORT \
|
||||
ping
|
||||
)
|
||||
if [ "$response" != "PONG" ]; then
|
||||
echo "$response"
|
||||
exit 1
|
||||
fi
|
||||
ping_liveness.sh: |-
|
||||
#!/bin/sh
|
||||
export REDISCLI_AUTH="$REDIS_PASSWORD"
|
||||
response=$(
|
||||
timeout -s 3 $1 \
|
||||
redis-cli \
|
||||
-h localhost \
|
||||
-p $REDIS_PORT \
|
||||
ping
|
||||
)
|
||||
if [ "$response" != "PONG" ] && [ "$response" != "LOADING Redis is loading the dataset in memory" ]; then
|
||||
echo "$response"
|
||||
exit 1
|
||||
fi
|
@@ -1,96 +0,0 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://raw.githubusercontent.com/bjw-s/helm-charts/main/charts/other/app-template/schemas/helmrelease-helm-v2beta2.schema.json
|
||||
apiVersion: helm.toolkit.fluxcd.io/v2beta2
|
||||
kind: HelmRelease
|
||||
metadata:
|
||||
name: &app redis
|
||||
spec:
|
||||
interval: 15m
|
||||
chart:
|
||||
spec:
|
||||
chart: app-template
|
||||
version: 3.0.4
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: bjw-s
|
||||
namespace: flux-system
|
||||
interval: 15m
|
||||
install:
|
||||
createNamespace: true
|
||||
remediation:
|
||||
retries: 5
|
||||
upgrade:
|
||||
remediation:
|
||||
strategy: rollback
|
||||
retries: 5
|
||||
values:
|
||||
controllers:
|
||||
redis:
|
||||
type: statefulset
|
||||
containers:
|
||||
app:
|
||||
image:
|
||||
repository: redis
|
||||
tag: 7.2.4-alpine
|
||||
command:
|
||||
- sh
|
||||
args:
|
||||
- -c
|
||||
- >-
|
||||
redis-server
|
||||
probes:
|
||||
liveness:
|
||||
enabled: true
|
||||
custom: true
|
||||
spec:
|
||||
exec:
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- /health/ping_liveness.sh 5
|
||||
initialDelaySeconds: 5
|
||||
timeoutSeconds: 6
|
||||
periodSeconds: 5
|
||||
successThreshold: 1
|
||||
failureThreshold: 5
|
||||
readiness:
|
||||
enabled: true
|
||||
custom: true
|
||||
spec:
|
||||
exec:
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- /health/ping_readiness.sh 1
|
||||
initialDelaySeconds: 5
|
||||
timeoutSeconds: 2
|
||||
periodSeconds: 5
|
||||
successThreshold: 1
|
||||
failureThreshold: 5
|
||||
resources:
|
||||
requests:
|
||||
cpu: 34m
|
||||
memory: 204Mi
|
||||
limits:
|
||||
memory: 241Mi
|
||||
env:
|
||||
REDIS_PORT: "6379"
|
||||
service:
|
||||
app:
|
||||
controller: *app
|
||||
ports:
|
||||
http:
|
||||
port: 6379
|
||||
persistence:
|
||||
data:
|
||||
enabled: true
|
||||
existingClaim: redis
|
||||
globalMounts:
|
||||
- path: /data
|
||||
healthcheck:
|
||||
enabled: true
|
||||
type: configMap
|
||||
name: redis-healthcheck
|
||||
defaultMode: 0755
|
||||
globalMounts:
|
||||
- path: /health
|
@@ -1,8 +0,0 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- ./configmap.yaml
|
||||
- ./helmrelease.yaml
|
||||
- ../../../../templates/volsync
|
@@ -1,25 +0,0 @@
|
||||
---
|
||||
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/kustomize.toolkit.fluxcd.io/kustomization_v1.json
|
||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||
kind: Kustomization
|
||||
metadata:
|
||||
name: &app redis
|
||||
namespace: flux-system
|
||||
spec:
|
||||
targetNamespace: database
|
||||
commonMetadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: *app
|
||||
path: ./kubernetes/apps/database/redis/app
|
||||
prune: true
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: home-ops-kubernetes
|
||||
wait: false
|
||||
interval: 30m
|
||||
retryInterval: 1m
|
||||
timeout: 15m
|
||||
postBuild:
|
||||
substitute:
|
||||
APP: *app
|
||||
VOLSYNC_CAPACITY: 2Gi
|
Reference in New Issue
Block a user