Skip to content

Commit

Permalink
feat: add dragonfly cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
jnobrega committed May 12, 2024
1 parent 817b4c1 commit c1b41c8
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 0 deletions.
3 changes: 3 additions & 0 deletions k8s/apps/documents/paperless/ks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ metadata:
spec:
targetNamespace: documents
path: ./k8s/apps/documents/paperless/app
dependsOn:
- name: dragonfly-cluster
- name: cloudnative-pg-cluster
prune: true
sourceRef:
kind: GitRepository
Expand Down
27 changes: 27 additions & 0 deletions k8s/apps/storage/dragonfly/cluster/cluster.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
# yaml-language-server: $schema=https://lds-schemas.pages.dev/dragonflydb.io/dragonfly_v1alpha1.json
apiVersion: dragonflydb.io/v1alpha1
kind: Dragonfly
metadata:
name: dragonfly
spec:
labels:
dragonflydb.io/cluster: dragonfly
image: docker.dragonflydb.io/dragonflydb/dragonfly:v1.18.0
replicas: 2
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
memory: 512Mi
env:
- name: MAX_MEMORY
valueFrom:
resourceFieldRef:
resource: limits.memory
divisor: 1Mi
args:
- "--maxmemory=$(MAX_MEMORY)Mi"
- "--proactor_threads=2"
- "--cluster_mode=emulated"
4 changes: 4 additions & 0 deletions k8s/apps/storage/dragonfly/cluster/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- cluster.yaml
18 changes: 18 additions & 0 deletions k8s/apps/storage/dragonfly/ks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,22 @@ spec:
wait: true
interval: 30m
retryInterval: 1m
timeout: 5m
---
# yaml-language-server: $schema=https://kubernetes-schemas.devbu.io/kustomize.toolkit.fluxcd.io/kustomization_v1.json
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: dragonfly-cluster
namespace: flux-system
spec:
targetNamespace: storage
path: ./k8s/apps/storage/dragonfly/cluster
prune: true
sourceRef:
kind: GitRepository
name: home-cluster
wait: true
interval: 30m
retryInterval: 1m
timeout: 5m

0 comments on commit c1b41c8

Please sign in to comment.