From 2dd03859b170810caa28865d1363f0db06b20acb Mon Sep 17 00:00:00 2001 From: Rokibul Hasan Date: Thu, 14 Mar 2024 22:34:58 +0600 Subject: [PATCH] Use different backup page for kubedb-ui Signed-off-by: Rokibul Hasan --- .../v1alpha1/backup-kubedb-ui.yaml | 82 +++++++++++++++++++ .../v1alpha2/kubedb/elasticsearches.yaml | 2 +- .../kubedb.com/v1alpha2/kubedb/mariadbs.yaml | 2 +- .../v1alpha2/kubedb/memcacheds.yaml | 2 +- .../kubedb.com/v1alpha2/kubedb/mongodbs.yaml | 2 +- .../kubedb.com/v1alpha2/kubedb/mysqls.yaml | 2 +- .../v1alpha2/kubedb/postgreses.yaml | 2 +- .../kubedb.com/v1alpha2/kubedb/redises.yaml | 2 +- 8 files changed, 89 insertions(+), 7 deletions(-) create mode 100644 hub/resourceblockdefinitions/core.kubestash.com/v1alpha1/backup-kubedb-ui.yaml diff --git a/hub/resourceblockdefinitions/core.kubestash.com/v1alpha1/backup-kubedb-ui.yaml b/hub/resourceblockdefinitions/core.kubestash.com/v1alpha1/backup-kubedb-ui.yaml new file mode 100644 index 000000000..6756652b4 --- /dev/null +++ b/hub/resourceblockdefinitions/core.kubestash.com/v1alpha1/backup-kubedb-ui.yaml @@ -0,0 +1,82 @@ +apiVersion: meta.k8s.appscode.com/v1alpha1 +kind: ResourceBlockDefinition +metadata: + creationTimestamp: null + name: core.kubestash.com-v1alpha1-kubedb-backup-kubedb-ui +spec: + blocks: + - actions: + create: Never + displayMode: List + kind: Connection + name: Recent Backups + query: + raw: |- + query Find($src: String!, $targetGroup: String!, $targetKind: String!) { + find(oid: $src) { + backup_via(group: "core.kubestash.com", kind: "BackupConfiguration") { + refs: source(group: $targetGroup, kind: $targetKind) { + namespace + name + } + } + } + } + type: GraphQL + ref: + group: core.kubestash.com + kind: BackupSession + - actions: + create: Never + displayMode: List + kind: Connection + name: Recent Restores + query: + byLabel: restore_into + type: GraphQL + ref: + group: core.kubestash.com + kind: RestoreSession + - actions: + create: Never + displayMode: List + kind: Connection + name: Backup Configuration + query: + byLabel: backup_via + type: GraphQL + ref: + group: core.kubestash.com + kind: BackupConfiguration + - actions: + create: Never + displayMode: List + kind: Connection + name: Repository + query: + byLabel: backup_via + type: GraphQL + ref: + group: storage.kubestash.com + kind: Repository + - actions: + create: Never + displayMode: List + kind: Connection + name: CronJobs + query: + raw: |- + query Find($src: String!, $targetGroup: String!, $targetKind: String!) { + find(oid: $src) { + backup_via(group: "core.kubestash.com", kind: "BackupConfiguration") { + refs: offshoot(group: $targetGroup, kind: $targetKind) { + namespace + name + } + } + } + } + type: GraphQL + ref: + group: batch + kind: CronJob diff --git a/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/elasticsearches.yaml b/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/elasticsearches.yaml index bc3c196f7..1bec6a957 100644 --- a/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/elasticsearches.yaml +++ b/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/elasticsearches.yaml @@ -430,7 +430,7 @@ spec: sections: - blocks: - kind: Block - name: core.kubestash.com-v1alpha1-kubedb-backup + name: core.kubestash.com-v1alpha1-kubedb-backup-kubedb-ui - name: Security sections: - blocks: diff --git a/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/mariadbs.yaml b/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/mariadbs.yaml index 8346aa328..292c6f221 100644 --- a/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/mariadbs.yaml +++ b/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/mariadbs.yaml @@ -430,7 +430,7 @@ spec: sections: - blocks: - kind: Block - name: core.kubestash.com-v1alpha1-kubedb-backup + name: core.kubestash.com-v1alpha1-kubedb-backup-kubedb-ui - name: Security sections: - blocks: diff --git a/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/memcacheds.yaml b/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/memcacheds.yaml index 212bffe18..625cdd8bc 100644 --- a/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/memcacheds.yaml +++ b/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/memcacheds.yaml @@ -65,7 +65,7 @@ spec: sections: - blocks: - kind: Block - name: core.kubestash.com-v1alpha1-kubedb-backup + name: core.kubestash.com-v1alpha1-kubedb-backup-kubedb-ui - name: Monitoring sections: - blocks: diff --git a/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/mongodbs.yaml b/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/mongodbs.yaml index cedfb374e..2941114a0 100644 --- a/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/mongodbs.yaml +++ b/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/mongodbs.yaml @@ -436,7 +436,7 @@ spec: sections: - blocks: - kind: Block - name: core.kubestash.com-v1alpha1-kubedb-backup + name: core.kubestash.com-v1alpha1-kubedb-backup-kubedb-ui - name: Security sections: - blocks: diff --git a/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/mysqls.yaml b/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/mysqls.yaml index 571a29a71..1bbf88565 100644 --- a/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/mysqls.yaml +++ b/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/mysqls.yaml @@ -433,7 +433,7 @@ spec: sections: - blocks: - kind: Block - name: core.kubestash.com-v1alpha1-kubedb-backup + name: core.kubestash.com-v1alpha1-kubedb-backup-kubedb-ui - name: Security sections: - blocks: diff --git a/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/postgreses.yaml b/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/postgreses.yaml index b101cce4e..28d9e4e57 100644 --- a/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/postgreses.yaml +++ b/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/postgreses.yaml @@ -469,7 +469,7 @@ spec: sections: - blocks: - kind: Block - name: core.kubestash.com-v1alpha1-kubedb-backup + name: core.kubestash.com-v1alpha1-kubedb-backup-kubedb-ui - name: Security sections: - blocks: diff --git a/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/redises.yaml b/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/redises.yaml index ae6e395a0..9729c23e2 100644 --- a/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/redises.yaml +++ b/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/redises.yaml @@ -433,7 +433,7 @@ spec: sections: - blocks: - kind: Block - name: core.kubestash.com-v1alpha1-kubedb-backup + name: core.kubestash.com-v1alpha1-kubedb-backup-kubedb-ui - name: Security sections: - blocks: