From 9fb17ff2196071653dbca25e6e820dd71ffe29a8 Mon Sep 17 00:00:00 2001 From: Arnob Kumar Saha Date: Fri, 19 Jun 2026 13:05:24 +0600 Subject: [PATCH] Add autoscaler and binding samples for kubedb resources Signed-off-by: Arnob Kumar Saha --- aerospike/sample.yaml | 49 +++++++++++++++++++ db2/sample/db2.yaml | 25 ++++++++++ pgpool/pgpool.yaml | 10 ++++ .../prometheus.io/tls/custom-auth/sample.yaml | 25 ++++++++++ zookeeper/sample.yaml | 12 ++++- 5 files changed, 120 insertions(+), 1 deletion(-) create mode 100644 aerospike/sample.yaml diff --git a/aerospike/sample.yaml b/aerospike/sample.yaml new file mode 100644 index 00000000..72f711f6 --- /dev/null +++ b/aerospike/sample.yaml @@ -0,0 +1,49 @@ +apiVersion: v1 +kind: Secret +metadata: + name: aerospike-auth + namespace: demo +stringData: + password: thisIs1StrongPassword + username: root +type: Opaque +--- +apiVersion: kubedb.com/v1alpha2 +kind: Aerospike +metadata: + name: aerospike + namespace: demo +spec: + version: "7.2.0.7" + mode: Cluster + cluster: + replicas: 3 + replicationFactor: 2 + authSecret: + name: aerospike-auth + deletionPolicy: WipeOut +--- +apiVersion: autoscaling.kubedb.com/v1alpha1 +kind: AerospikeAutoscaler +metadata: + name: aerospike + namespace: demo +spec: + databaseRef: + name: aerospike + opsRequestOptions: + timeout: 10m + apply: IfReady + compute: + aerospike: + trigger: "On" + podLifeTimeThreshold: 10m + resourceDiffPercentage: 20 + minAllowed: + cpu: 400m + memory: 400Mi + maxAllowed: + cpu: 1 + memory: 2Gi + nodeTopology: + name: standard-basv2-family diff --git a/db2/sample/db2.yaml b/db2/sample/db2.yaml index 4fbfb9db..2967954d 100644 --- a/db2/sample/db2.yaml +++ b/db2/sample/db2.yaml @@ -61,3 +61,28 @@ spec: - alias: primary spec: type: LoadBalancer +--- +apiVersion: autoscaling.kubedb.com/v1alpha1 +kind: DB2Autoscaler +metadata: + name: db2 + namespace: default +spec: + databaseRef: + name: db2 + opsRequestOptions: + timeout: 10m + apply: IfReady + compute: + db2: + trigger: "On" + podLifeTimeThreshold: 10m + resourceDiffPercentage: 20 + minAllowed: + cpu: 400m + memory: 400Mi + maxAllowed: + cpu: 1 + memory: 2Gi + nodeTopology: + name: standard-basv2-family diff --git a/pgpool/pgpool.yaml b/pgpool/pgpool.yaml index d2a61587..32e42998 100644 --- a/pgpool/pgpool.yaml +++ b/pgpool/pgpool.yaml @@ -168,3 +168,13 @@ spec: memory: 2Gi nodeTopology: name: standard-basv2-family +--- +apiVersion: catalog.appscode.com/v1alpha1 +kind: PgpoolBinding +metadata: + name: pgpool + namespace: demo +spec: + sourceRef: + name: pgpool + namespace: demo diff --git a/redissentinel/prometheus.io/tls/custom-auth/sample.yaml b/redissentinel/prometheus.io/tls/custom-auth/sample.yaml index c5ed60fb..64c3fe0c 100644 --- a/redissentinel/prometheus.io/tls/custom-auth/sample.yaml +++ b/redissentinel/prometheus.io/tls/custom-auth/sample.yaml @@ -111,3 +111,28 @@ spec: matchLabels: app.kubernetes.io/instance: redis app.kubernetes.io/name: redises.kubedb.com +--- +apiVersion: autoscaling.kubedb.com/v1alpha1 +kind: RedisSentinelAutoscaler +metadata: + name: redissentinel + namespace: demo +spec: + databaseRef: + name: redissentinel + opsRequestOptions: + timeout: 10m + apply: IfReady + compute: + sentinel: + trigger: "On" + podLifeTimeThreshold: 10m + resourceDiffPercentage: 20 + minAllowed: + cpu: 400m + memory: 400Mi + maxAllowed: + cpu: 1 + memory: 2Gi + nodeTopology: + name: standard-basv2-family diff --git a/zookeeper/sample.yaml b/zookeeper/sample.yaml index ad3c8a2f..42f06974 100644 --- a/zookeeper/sample.yaml +++ b/zookeeper/sample.yaml @@ -300,4 +300,14 @@ spec: cpu: 1 memory: 2Gi nodeTopology: - name: standard-basv2-family \ No newline at end of file + name: standard-basv2-family +--- +apiVersion: catalog.appscode.com/v1alpha1 +kind: ZooKeeperBinding +metadata: + name: zookeeper + namespace: demo +spec: + sourceRef: + name: zookeeper + namespace: demo \ No newline at end of file