Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy Dragonfly #1619

Merged
merged 1 commit into from
Feb 2, 2024
Merged

Deploy Dragonfly #1619

merged 1 commit into from
Feb 2, 2024

Conversation

joryirving
Copy link
Owner

No description provided.

@joryirving joryirving self-assigned this Feb 2, 2024
@smurf-bot smurf-bot bot added area/kubernetes Changes made in the kubernetes directory cluster/teyvat labels Feb 2, 2024
@smurf-bot
Copy link
Contributor

smurf-bot bot commented Feb 2, 2024

--- kubernetes/teyvat/flux Kustomization: flux-system/cluster HelmRepository: flux-system/dragonfly

+++ kubernetes/teyvat/flux Kustomization: flux-system/cluster HelmRepository: flux-system/dragonfly

@@ -0,0 +1,14 @@

+---
+apiVersion: source.toolkit.fluxcd.io/v1beta2
+kind: HelmRepository
+metadata:
+  labels:
+    kustomize.toolkit.fluxcd.io/name: cluster
+    kustomize.toolkit.fluxcd.io/namespace: flux-system
+  name: dragonfly
+  namespace: flux-system
+spec:
+  interval: 10m
+  type: oci
+  url: oci://ghcr.io/dragonflydb/dragonfly/helm
+
--- kubernetes/teyvat/apps/database/dragonfly/app Kustomization: flux-system/dragonfly HelmRelease: database/dragonfly

+++ kubernetes/teyvat/apps/database/dragonfly/app Kustomization: flux-system/dragonfly HelmRelease: database/dragonfly

@@ -0,0 +1,75 @@

+---
+apiVersion: helm.toolkit.fluxcd.io/v2beta2
+kind: HelmRelease
+metadata:
+  labels:
+    app.kubernetes.io/name: dragonfly
+    kustomize.toolkit.fluxcd.io/name: dragonfly
+    kustomize.toolkit.fluxcd.io/namespace: flux-system
+  name: dragonfly
+  namespace: database
+spec:
+  chart:
+    spec:
+      chart: dragonfly
+      sourceRef:
+        kind: HelmRepository
+        name: dragonfly
+        namespace: flux-system
+      version: v1.14.1
+  dependsOn:
+  - name: local-path-provisioner
+    namespace: storage
+  install:
+    remediation:
+      retries: 3
+  interval: 35m
+  maxHistory: 3
+  uninstall:
+    keepHistory: false
+  upgrade:
+    cleanupOnFail: true
+    remediation:
+      retries: 3
+  values:
+    extraArgs:
+    - --dbfilename=dump
+    - --snapshot_cron=* * * * *
+    podSecurityContext:
+      fsGroup: 2000
+    prometheusRule:
+      enabled: true
+      spec:
+      - alert: DragonflyMissing
+        annotations:
+          description: Dragonfly is missing
+          summary: Dragonfly is missing
+        expr: absent(dragonfly_uptime_in_seconds) == 1
+        for: 0m
+        labels:
+          severity: critical
+    resources:
+      limits:
+        cpu: 500m
+        memory: 512Mi
+      requests:
+        cpu: 100m
+        memory: 128Mi
+    securityContext:
+      capabilities:
+        drop:
+        - ALL
+      readOnlyRootFilesystem: true
+      runAsNonRoot: true
+      runAsUser: 1000
+    service:
+      annotations:
+        io.cilium/lb-ipam-ips: ${SVC_DRAGONFLY_ADDR}
+      type: LoadBalancer
+    serviceMonitor:
+      enabled: true
+    storage:
+      enabled: true
+      requests: 1Gi
+      storageClass: local-hostpath
+

@smurf-bot
Copy link
Contributor

smurf-bot bot commented Feb 2, 2024

--- HelmRelease: database/dragonfly ServiceAccount: database/dragonfly

+++ HelmRelease: database/dragonfly ServiceAccount: database/dragonfly

@@ -0,0 +1,11 @@

+---
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  name: dragonfly
+  namespace: database
+  labels:
+    app.kubernetes.io/name: dragonfly
+    app.kubernetes.io/instance: dragonfly
+    app.kubernetes.io/managed-by: Helm
+
--- HelmRelease: database/dragonfly Service: database/dragonfly-metrics

+++ HelmRelease: database/dragonfly Service: database/dragonfly-metrics

@@ -0,0 +1,22 @@

+---
+apiVersion: v1
+kind: Service
+metadata:
+  name: dragonfly-metrics
+  namespace: database
+  labels:
+    app.kubernetes.io/name: dragonfly
+    app.kubernetes.io/instance: dragonfly
+    app.kubernetes.io/managed-by: Helm
+    type: metrics
+spec:
+  type: ClusterIP
+  ports:
+  - name: metrics
+    port: 6379
+    targetPort: 6379
+    protocol: TCP
+  selector:
+    app.kubernetes.io/name: dragonfly
+    app.kubernetes.io/instance: dragonfly
+
--- HelmRelease: database/dragonfly Service: database/dragonfly

+++ HelmRelease: database/dragonfly Service: database/dragonfly

@@ -0,0 +1,23 @@

+---
+apiVersion: v1
+kind: Service
+metadata:
+  name: dragonfly
+  namespace: database
+  annotations:
+    io.cilium/lb-ipam-ips: ${SVC_DRAGONFLY_ADDR}
+  labels:
+    app.kubernetes.io/name: dragonfly
+    app.kubernetes.io/instance: dragonfly
+    app.kubernetes.io/managed-by: Helm
+spec:
+  type: LoadBalancer
+  ports:
+  - port: 6379
+    targetPort: dragonfly
+    protocol: TCP
+    name: dragonfly
+  selector:
+    app.kubernetes.io/name: dragonfly
+    app.kubernetes.io/instance: dragonfly
+
--- HelmRelease: database/dragonfly StatefulSet: database/dragonfly

+++ HelmRelease: database/dragonfly StatefulSet: database/dragonfly

@@ -0,0 +1,87 @@

+---
+apiVersion: apps/v1
+kind: StatefulSet
+metadata:
+  name: dragonfly
+  namespace: database
+  labels:
+    app.kubernetes.io/name: dragonfly
+    app.kubernetes.io/instance: dragonfly
+    app.kubernetes.io/managed-by: Helm
+spec:
+  serviceName: dragonfly
+  replicas: 1
+  selector:
+    matchLabels:
+      app.kubernetes.io/name: dragonfly
+      app.kubernetes.io/instance: dragonfly
+  template:
+    metadata:
+      annotations: null
+      labels:
+        app.kubernetes.io/name: dragonfly
+        app.kubernetes.io/instance: dragonfly
+    spec:
+      serviceAccountName: dragonfly
+      securityContext:
+        fsGroup: 2000
+      containers:
+      - name: dragonfly
+        securityContext:
+          capabilities:
+            drop:
+            - ALL
+          readOnlyRootFilesystem: true
+          runAsNonRoot: true
+          runAsUser: 1000
+        image: docker.dragonflydb.io/dragonflydb/dragonfly:v1.14.1
+        imagePullPolicy: IfNotPresent
+        ports:
+        - name: dragonfly
+          containerPort: 6379
+          protocol: TCP
+        livenessProbe:
+          exec:
+            command:
+            - /bin/sh
+            - /usr/local/bin/healthcheck.sh
+          failureThreshold: 3
+          initialDelaySeconds: 10
+          periodSeconds: 10
+          successThreshold: 1
+          timeoutSeconds: 5
+        readinessProbe:
+          exec:
+            command:
+            - /bin/sh
+            - /usr/local/bin/healthcheck.sh
+          failureThreshold: 3
+          initialDelaySeconds: 10
+          periodSeconds: 10
+          successThreshold: 1
+          timeoutSeconds: 5
+        args:
+        - --alsologtostderr
+        - --dbfilename=dump
+        - --snapshot_cron=* * * * *
+        resources:
+          limits:
+            cpu: 500m
+            memory: 512Mi
+          requests:
+            cpu: 100m
+            memory: 128Mi
+        volumeMounts:
+        - mountPath: /data
+          name: dragonfly-data
+  volumeClaimTemplates:
+  - metadata:
+      name: dragonfly-data
+    spec:
+      accessModes:
+      - ReadWriteOnce
+      storageClassName: null
+      resources:
+        requests:
+          storage: 1Gi
+

@joryirving joryirving merged commit 9e6b51d into main Feb 2, 2024
9 of 10 checks passed
@joryirving joryirving deleted the feat/dragonfly-db branch February 2, 2024 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kubernetes Changes made in the kubernetes directory
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant