From 6554bdf8d961f6500cb444135b0c639182c8120d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20J=C3=B6rg?= Date: Tue, 11 Nov 2025 12:15:59 +0100 Subject: [PATCH] fix(atlantis): Switch to dragonfly --- .envrc | 9 +---- charts/atlantis/templates/redis.yaml | 55 +++++++++++++--------------- charts/atlantis/values.yaml | 1 - shell.nix | 2 +- 4 files changed, 29 insertions(+), 38 deletions(-) diff --git a/.envrc b/.envrc index fc056953..3e095197 100644 --- a/.envrc +++ b/.envrc @@ -1,14 +1,9 @@ #!/usr/bin/env bash # the shebang is ignored, but nice for editors -watch_file lon.lock +watch_file nix/sources.json # Load .env file if it exists dotenv_if_exists # Activate development shell -if type -P lorri &>/dev/null; then - eval "$(lorri direnv)" -else - echo 'while direnv evaluated .envrc, could not find the command "lorri" [https://github.com/nix-community/lorri]' - use nix -fi +use nix diff --git a/charts/atlantis/templates/redis.yaml b/charts/atlantis/templates/redis.yaml index 4b3e83fa..aaed6a24 100644 --- a/charts/atlantis/templates/redis.yaml +++ b/charts/atlantis/templates/redis.yaml @@ -1,45 +1,42 @@ {{- if .Values.redis.enabled -}} -apiVersion: redis.redis.opstreelabs.in/v1beta2 -kind: Redis +apiVersion: dragonflydb.io/v1alpha1 +kind: Dragonfly metadata: name: {{ include "Atlantis.fullname" . }}-redis namespace: {{ .Release.Namespace }} annotations: linkerd.io/inject: disabled labels: + app.kubernetes.io/created-by: dragonfly-operator + app.kubernetes.io/instance: dragonfly {{- include "Atlantis.labels" . | nindent 4 }} spec: - kubernetesConfig: - image: quay.io/opstree/redis:v7.2.6 - imagePullPolicy: IfNotPresent - resources: - requests: - cpu: 101m - memory: 128Mi - limits: - memory: 256Mi - redisSecret: + replicas: {{ .Values.redis.replicas| default "1" }} + resources: + requests: + cpu: 150m + memory: 128Mi + limits: + memory: 256Mi + authentication: + passwordFromSecret: name: {{ .Values.redis.secret.name | quote }} key: {{ .Values.redis.secret.key | quote }} - serviceMonitor: + metrics: enabled: {{ .Values.redis.metrics.enabled | default false }} - redisExporter: - enabled: {{ .Values.redis.exporterEnabled | default false }} - image: quay.io/opstree/redis-exporter:v1.44.0 - imagePullPolicy: Always - resources: - requests: - cpu: 100m - memory: 128Mi - limits: - memory: 256Mi + port: 6379 storage: - volumeClaimTemplate: - spec: - accessModes: ["ReadWriteOnce"] - resources: - requests: - storage: {{ .Values.cluster.size | default "1Gi" }} + requests: + storage: {{ .Values.cluster.size | default "1Gi" }} + snapshot: + # cron: "0 3 * * *" # Default: every day at 03:00 + # enableOnMasterOnly: false + persistentVolumeClaimSpec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: {{ .Values.cluster.size | default "1Gi" }} podSecurityContext: runAsUser: 1000 fsGroup: 1000 diff --git a/charts/atlantis/values.yaml b/charts/atlantis/values.yaml index 9665a0ed..7ca06457 100644 --- a/charts/atlantis/values.yaml +++ b/charts/atlantis/values.yaml @@ -79,7 +79,6 @@ redis: metrics: enabled: false size: 1Gi - exporterEnabled: false cluster: enabled: true instances: 1 diff --git a/shell.nix b/shell.nix index 31ab8cc1..3997e065 100644 --- a/shell.nix +++ b/shell.nix @@ -36,6 +36,6 @@ pkgs.mkShellNoCC { dapr-cli ]; - ARGOCD_ENV_CLUSTER_NAME = "oceanbox"; + ARGOCD_ENV_CLUSTER_NAME = "ekman"; HELM_GIT_ACCESS_TOKEN = "glpat-xxx"; }