diff --git a/kubernetes/apps/database/kustomization.yaml b/kubernetes/apps/database/kustomization.yaml index 5b2caf20..e7e6e489 100644 --- a/kubernetes/apps/database/kustomization.yaml +++ b/kubernetes/apps/database/kustomization.yaml @@ -8,3 +8,4 @@ resources: # Flux-Kustomizations - ./crunchy-postgres-operator/ks.yaml - ./dragonfly/ks.yaml + - ./redis/ks.yaml diff --git a/kubernetes/apps/database/redis/app/helmrelease.yaml b/kubernetes/apps/database/redis/app/helmrelease.yaml new file mode 100644 index 00000000..69de4d0f --- /dev/null +++ b/kubernetes/apps/database/redis/app/helmrelease.yaml @@ -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 \ No newline at end of file diff --git a/kubernetes/apps/database/redis/app/kustomization.yaml b/kubernetes/apps/database/redis/app/kustomization.yaml new file mode 100644 index 00000000..2d7deaca --- /dev/null +++ b/kubernetes/apps/database/redis/app/kustomization.yaml @@ -0,0 +1,6 @@ +--- +# yaml-language-server: $schema=https://json.schemastore.org/kustomization +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - ./helmrelease.yaml \ No newline at end of file diff --git a/kubernetes/apps/database/redis/ks.yaml b/kubernetes/apps/database/redis/ks.yaml new file mode 100644 index 00000000..b8915c82 --- /dev/null +++ b/kubernetes/apps/database/redis/ks.yaml @@ -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 \ No newline at end of file diff --git a/kubernetes/apps/observability/thanos/app/helmrelease.yaml b/kubernetes/apps/observability/thanos/app/helmrelease.yaml index ea909667..2c768612 100644 --- a/kubernetes/apps/observability/thanos/app/helmrelease.yaml +++ b/kubernetes/apps/observability/thanos/app/helmrelease.yaml @@ -52,9 +52,11 @@ spec: type: REDIS config: 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 - master_name: master + master_name: redis-master ingress: enabled: true ingressClassName: internal-nginx