Skip to content

Commit

Permalink
Deploy Dragonfly (#1619)
Browse files Browse the repository at this point in the history
  • Loading branch information
joryirving authored Feb 2, 2024
1 parent f9bd75a commit 9e6b51d
Show file tree
Hide file tree
Showing 6 changed files with 112 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: cloudnative-pg
name: &app cloudnative-pg
spec:
interval: 30m
chart:
Expand Down
70 changes: 70 additions & 0 deletions kubernetes/teyvat/apps/database/dragonfly/app/helmrelease.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/helm.toolkit.fluxcd.io/helmrelease_v2beta2.json
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: &app dragonfly
spec:
interval: 35m
chart:
spec:
chart: dragonfly
version: v1.14.1
sourceRef:
kind: HelmRepository
name: dragonfly
namespace: flux-system
maxHistory: 3
install:
remediation:
retries: 3
upgrade:
cleanupOnFail: true
remediation:
retries: 3
uninstall:
keepHistory: false
dependsOn:
- name: local-path-provisioner
namespace: storage
values:
storage:
enabled: true
requests: 1Gi
storageClass: local-hostpath
extraArgs:
- --dbfilename=dump
- --snapshot_cron=* * * * * # cron format
service:
annotations:
io.cilium/lb-ipam-ips: ${SVC_DRAGONFLY_ADDR}
type: LoadBalancer
podSecurityContext:
fsGroup: 2000
securityContext:
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 1000
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 500m
memory: 512Mi
serviceMonitor:
enabled: true
prometheusRule:
enabled: true
spec:
- alert: DragonflyMissing
expr: absent(dragonfly_uptime_in_seconds) == 1
for: 0m
labels:
severity: critical
annotations:
summary: Dragonfly is missing
description: "Dragonfly is missing"
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./helmrelease.yaml
23 changes: 23 additions & 0 deletions kubernetes/teyvat/apps/database/dragonfly/ks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
# 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 dragonfly
namespace: flux-system
spec:
targetNamespace: database
commonMetadata:
labels:
app.kubernetes.io/name: *app
dependsOn:
- name: external-secrets-bitwarden
path: ./kubernetes/teyvat/apps/database/dragonfly/app
prune: true
sourceRef:
kind: GitRepository
name: home-kubernetes
wait: true
interval: 30m
retryInterval: 1m
timeout: 5m
11 changes: 11 additions & 0 deletions kubernetes/teyvat/flux/repositories/helm/dragonfly.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/source.toolkit.fluxcd.io/helmrepository_v1beta2.json
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: HelmRepository
metadata:
name: dragonfly
namespace: flux-system
spec:
type: oci
interval: 10m
url: oci://ghcr.io/dragonflydb/dragonfly/helm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ resources:
- ./coredns.yaml
- ./democratic-csi.yaml
- ./descheduler.yaml
- ./dragonfly.yaml
- ./external-dns.yaml
- ./external-secrets.yaml
- ./fairwinds.yaml
Expand Down

0 comments on commit 9e6b51d

Please sign in to comment.