Skip to content

Commit

Permalink
added valkey cluster with metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
Loki-Afro committed Jul 30, 2024
1 parent c80ada2 commit bc13813
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 0 deletions.
1 change: 1 addition & 0 deletions ansible/roles/tldraw-valkey/defaults/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
TLDRAW_VALKEY_CHART_VERSION: 0.3.12
9 changes: 9 additions & 0 deletions ansible/roles/tldraw-valkey/meta/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
galaxy_info:
role_name: tldraw-valkey
author: Schul-Cloud Verbund
description: role for the tldraw s valkey
company: Schul-Cloud Verbund
license: license (AGPLv3)
min_ansible_version: "2.8"
galaxy_tags: []
dependencies: []
47 changes: 47 additions & 0 deletions ansible/roles/tldraw-valkey/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
- name: Secret for tldraw valkey
kubernetes.core.k8s:
kubeconfig: ~/.kube/config
namespace: "{{ NAMESPACE }}"
template: onepassword.yml.j2
when: ONEPASSWORD_OPERATOR is defined and ONEPASSWORD_OPERATOR|bool

- name: Install valkey sentinel
kubernetes.core.helm:
chart_ref: oci://docker.io/bitnamicharts/valkey
chart_version: "{{ TLDRAW_VALKEY_CHART_VERSION }}"
release_name: valkey
release_namespace: "{{ NAMESPACE }}"
release_state: present
create_namespace: yes
kubeconfig: ~/.kube/config
update_repo_cache: no
values:
master:
readinessProbe:
timeoutSeconds: 5
sentinel:
enabled: true
readinessProbe:
timeoutSeconds: 5
metrics:
enabled: true
podMonitor:
enabled: true
serviceMonitor:
enabled: true
extraArgs:
redis.password: $VALKEY_PASSWORD
# OPS-6762 still up to debate if we will enable this
networkPolicy:
enabled: false
serviceAccount:
create: false
resources:
limits:
cpu: "{{ TLDRAW_VALKEY_CPU_LIMITS|default('1000m', true) }}"
memory: "{{ TLDRAW_VALKEY_MEMORY_LIMITS|default('4Gi', true) }}"
requests:
cpu: "{{ TLDRAW_VALKEY_CPU_REQUESTS|default('100m', true) }}"
memory: "{{ TLDRAW_VALKEY_MEMORY_REQUESTS|default('1Gi', true) }}"


9 changes: 9 additions & 0 deletions ansible/roles/tldraw-valkey/templates/onepassword.yml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: onepassword.com/v1
kind: OnePasswordItem
metadata:
name: tldraw-valkey
namespace: {{ NAMESPACE }}
labels:
app: mongodb-query-exporter
spec:
itemPath: "vaults/{{ ONEPASSWORD_OPERATOR_VAULT }}/items/tldraw-valkey"

0 comments on commit bc13813

Please sign in to comment.