Skip to content

Commit

Permalink
Add functions for verifier
Browse files Browse the repository at this point in the history
Signed-off-by: Md. Ishtiaq Islam <[email protected]>
  • Loading branch information
ishtiaqhimel committed Nov 22, 2024
1 parent 88c22f6 commit 6c7dc46
Show file tree
Hide file tree
Showing 8 changed files with 65 additions and 0 deletions.
5 changes: 5 additions & 0 deletions apis/installer/v1alpha1/kubedb_kubestash_catalog_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ type KubedbKubestashCatalogSpec struct {
Postgres StashPostgresSpec `json:"postgres"`
Singlestore StashSinglestoreSpec `json:"singlestore"`
ZooKeeper StashZooKeeperSpec `json:"zookeeper"`
Kubedbverifier StashVerifierSpec `json:"kubedbverifier"`
}

// StashDruidSpec is the schema for Stash Druid values file
Expand Down Expand Up @@ -237,6 +238,10 @@ type ZooKeeperRestore struct {
Args string `json:"args"`
}

type StashVerifierSpec struct {
Enabled bool `json:"enabled"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// KubedbKubestashCatalogList is a list of KubedbKubestashCatalogs
Expand Down
17 changes: 17 additions & 0 deletions apis/installer/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions catalog/kubestash/raw/kubedbverifier/kubedbverifier-function.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: addons.kubestash.com/v1alpha1
kind: Function
metadata:
name: kubedbverifier
spec:
args:
- verify
- --namespace=${namespace:=default}
- --backupverificationsession=${backupVerificationSession:=}
image: ghcr.io/kubedb/kubedb-verifier:v0.1.0
1 change: 1 addition & 0 deletions charts/kubedb-kubestash-catalog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ The following table lists the configurable parameters of the `kubedb-kubestash-c
| singlestore.restore.args | Arguments to pass to `singlestore` command during restore process | <code>""</code> |
| zookeeper.backup.args | Arguments to pass to `zk-dump` command during bakcup process | <code>""</code> |
| zookeeper.restore.args | Arguments to pass to `zookeeper` command during restore process | <code>""</code> |
| kubedbverifier.enabled | | <code>true</code> |


Specify each parameter using the `--set key=value[,key=value]` argument to `helm upgrade -i`. For example:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{{ if .Values.kubedbverifier.enabled }}
apiVersion: addons.kubestash.com/v1alpha1
kind: Function
metadata:
name: 'kubedbverifier'
labels:
{{- include "kubedb-kubestash-catalog.labels" . | nindent 4 }}
spec:
args:
- verify
- --namespace=${namespace:=default}
- --backupverificationsession=${backupVerificationSession:=}
image: '{{ include "image.ghcr" (merge (dict "_repo" "kubedb/kubedb-verifier") $) }}:v0.1.0'
{{ end }}
8 changes: 8 additions & 0 deletions charts/kubedb-kubestash-catalog/values.openapiv3_schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ properties:
required:
- enabled
type: object
kubedbverifier:
properties:
enabled:
type: boolean
required:
- enabled
type: object
mariadb:
properties:
backup:
Expand Down Expand Up @@ -237,6 +244,7 @@ required:
- elasticsearch
- featureGates
- kubedbmanifest
- kubedbverifier
- mariadb
- mongodb
- mssqlserver
Expand Down
2 changes: 2 additions & 0 deletions charts/kubedb-kubestash-catalog/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,3 +136,5 @@ zookeeper:
restore:
# Arguments to pass to `zookeeper` command during restore process
args: ""
kubedbverifier:
enabled: true
8 changes: 8 additions & 0 deletions charts/kubedb/values.openapiv3_schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4286,6 +4286,13 @@ properties:
required:
- enabled
type: object
kubedbverifier:
properties:
enabled:
type: boolean
required:
- enabled
type: object
mariadb:
properties:
backup:
Expand Down Expand Up @@ -4480,6 +4487,7 @@ properties:
- enabled
- featureGates
- kubedbmanifest
- kubedbverifier
- mariadb
- mongodb
- mssqlserver
Expand Down

0 comments on commit 6c7dc46

Please sign in to comment.