Adding Redis.

This commit is contained in:
Joseph Hanson 2024-02-27 15:20:08 -06:00
parent c2bc284cc6
commit df0dd40c67
5 changed files with 83 additions and 2 deletions

View file

@ -8,3 +8,4 @@ resources:
# Flux-Kustomizations # Flux-Kustomizations
- ./crunchy-postgres-operator/ks.yaml - ./crunchy-postgres-operator/ks.yaml
- ./dragonfly/ks.yaml - ./dragonfly/ks.yaml
- ./redis/ks.yaml

View file

@ -0,0 +1,51 @@
---
# yaml-language-server: $schema=https://ks.hsn.dev/helm.toolkit.fluxcd.io/helmrelease_v2beta2.json
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: redis
spec:
interval: 30m
timeout: 15m
chart:
spec:
chart: redis
version: 18.17.0
sourceRef:
kind: HelmRepository
name: bitnami
namespace: flux-system
install:
remediation:
retries: 3
upgrade:
cleanupOnFail: true
remediation:
retries: 3
uninstall:
keepHistory: false
values:
auth:
enabled: false
sentinel: false
master:
persistence:
enabled: false
replica:
persistence:
enabled: false
sentinel:
enabled: true
masterSet: redis-master
getMasterTimeout: 10
startupProbe:
failureThreshold: 2
persistence:
enabled: false
networkPolicy:
enabled: false
metrics:
enabled: true
serviceMonitor:
enabled: true
interval: 1m

View file

@ -0,0 +1,6 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./helmrelease.yaml

View file

@ -0,0 +1,21 @@
---
# yaml-language-server: $schema=https://ks.hsn.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: homelab
wait: false
interval: 30m
retryInterval: 1m
timeout: 15m

View file

@ -52,9 +52,11 @@ spec:
type: REDIS type: REDIS
config: config:
addr: >- addr: >-
dragonfly-0.dragonfly.database.svc.cluster.local:6379 redis-node-0.redis-headless.database.svc.cluster.local:26379,
redis-node-1.redis-headless.database.svc.cluster.local:26379,
redis-node-2.redis-headless.database.svc.cluster.local:26379
db: 13 db: 13
master_name: master master_name: redis-master
ingress: ingress:
enabled: true enabled: true
ingressClassName: internal-nginx ingressClassName: internal-nginx