Skip to content

Commit 53c1021

Browse files
committed
feat: etcd quota and auto-compaction
Implemented what requested in issue apache/openserverless#105. Furthermore, added a parameter to increase etcd quota backend bytes
1 parent 113d5e7 commit 53c1021

File tree

5 files changed

+20
-0
lines changed

5 files changed

+20
-0
lines changed

deploy/nuvolaris-permissions/whisk-crd.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -702,6 +702,12 @@ spec:
702702
replicas:
703703
description: number of total postgres replicas (1 primary, N-1 replicas). Defaulted to 1
704704
type: integer
705+
auto-compaction-retention:
706+
description: defines how long to retain historical versions of keys before automatically compacting them
707+
type: string
708+
quota-backend-bytes:
709+
description: the etcd backend database has a default size limit of 2 GiB. This can be increased explicitly
710+
type: integer
705711
root:
706712
description: ETCD root user credentials
707713
type: object

nuvolaris/templates/etcd-sts.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ spec:
4040
env:
4141
- name: ETCD_INITIAL_CLUSTER
4242
value: {{etc_initial_cluster}}
43+
- name: ETCD_AUTO_COMPACTION_RETENTION
44+
value: "{{etcd_auto_compaction_retention}}"
45+
- name: ETCD_QUOTA_BACKEND_BYTES
46+
value: "{{etcd_quota_backend_bytes}}"
4347
image: docker.io/bitnami/etcd:3.5.17-debian-12-r0
4448
imagePullPolicy: IfNotPresent
4549
volumeClaimTemplates:

nuvolaris/util.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -684,6 +684,8 @@ def get_etcd_config_data():
684684
"storageClass": cfg.get("nuvolaris.storageclass"),
685685
"root_password":cfg.get("etcd.root.password") or "s0meP@ass3wd",
686686
"etcd_replicas":get_etcd_replica(),
687+
"etcd_auto_compaction_retention": cfg.get("etcd.auto_compaction_retention") or "1",
688+
"etcd_quota_backend_bytes": cfg.get("etcd.quota-backend-bytes") or "2147483648",
687689
"namespace":"nuvolaris",
688690
"container_cpu_req": cfg.get('etcd.resources.cpu-req') or "250m",
689691
"container_cpu_lim": cfg.get('etcd.resources.cpu-lim') or "375m",

tests/kind/milvus_standalone_test.ipy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ assert(cfg.detect_storage()["nuvolaris.storageclass"])
3636
# for this test minioClient and Milvus should see this env variable
3737
os.environ['MINIO_API_HOST']='localhost'
3838
os.environ['MILVUS_API_HOST']='localhost'
39+
os.environ['MILVUS_ROOT_PASSWORD']='An0therPa55'
3940

4041
assert(etcd.create())
4142
assert(minio.create())

tests/kind/whisk-full.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,13 @@ spec:
7373
invoker:
7474
user: controller_admin
7575
password: s0meP@ass2
76+
etcd:
77+
volume-size: 5
78+
replicas: 3
79+
root:
80+
password: 0therPa55
81+
auto-compaction-retention: 1
82+
quota-backend-bytes: 8589934592
7683
kafka:
7784
host: kafka
7885
volume-size: 5

0 commit comments

Comments
 (0)