Skip to content

Commit

Permalink
Update resource metadata
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha committed Mar 13, 2024
1 parent 90839ad commit 58332da
Show file tree
Hide file tree
Showing 9 changed files with 369 additions and 19 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ require (
kmodules.xyz/custom-resources v0.29.1
kmodules.xyz/go-containerregistry v0.0.12
kmodules.xyz/monitoring-agent-api v0.29.0
kmodules.xyz/resource-metadata v0.18.2-0.20240312232132-611a62574ba5
kmodules.xyz/resource-metadata v0.18.2-0.20240313052239-425c691548da
kmodules.xyz/resource-metrics v0.29.1
kmodules.xyz/sets v0.29.0
kubeops.dev/falco-ui-server v0.0.3
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -3490,8 +3490,8 @@ kmodules.xyz/monitoring-agent-api v0.29.0 h1:gpFl6OZrlMLb/ySMHdREI9EwGtnJ91oZBn9
kmodules.xyz/monitoring-agent-api v0.29.0/go.mod h1:iNbvaMTgVFOI5q2LJtGK91j4Dmjv4ZRiRdasGmWLKQI=
kmodules.xyz/offshoot-api v0.29.0 h1:GHLhxxT9jU1N8+FvOCCeJNyU5g0duYS46UGrs6AHNLY=
kmodules.xyz/offshoot-api v0.29.0/go.mod h1:5NxhBblXoDHWStx9HCDJR2KFTwYjEZ7i1Id3jelIunw=
kmodules.xyz/resource-metadata v0.18.2-0.20240312232132-611a62574ba5 h1:xkrxDwltmcvoQMeIgjsb0dlIDeXw1JCHfWAlHGijyW0=
kmodules.xyz/resource-metadata v0.18.2-0.20240312232132-611a62574ba5/go.mod h1:Vb2bFCOX4uz2TsRRMzTkUqFWWOjJ261lY8Hs2HWgzh4=
kmodules.xyz/resource-metadata v0.18.2-0.20240313052239-425c691548da h1:DvWnRuaYJvMMAHweMRU5sISAOwmzItgqrpqkpGa2fIM=
kmodules.xyz/resource-metadata v0.18.2-0.20240313052239-425c691548da/go.mod h1:Vb2bFCOX4uz2TsRRMzTkUqFWWOjJ261lY8Hs2HWgzh4=
kmodules.xyz/resource-metrics v0.29.1 h1:gP4SNosdDGFImpne52mnQtHacmnllYkTMcYL//p/ltM=
kmodules.xyz/resource-metrics v0.29.1/go.mod h1:OuG/QobZ7o8GFHl/u3lqaUR0fDZDegxtV8Vdh+MNBD4=
kmodules.xyz/sets v0.29.0 h1:ZX/qOECzUob95JhhRtngJElHSlJ1UNNdwK4hTEy+nl0=
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
apiVersion: meta.k8s.appscode.com/v1alpha1
kind: ResourceBlockDefinition
metadata:
creationTimestamp: null
name: core.kubestash.com-v1alpha1-apps-backup
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
apiVersion: meta.k8s.appscode.com/v1alpha1
kind: ResourceBlockDefinition
metadata:
creationTimestamp: null
name: monitoring.coreos.com-v1-apps-monitoring-kubedb
spec:
blocks:
- actions:
create: Never
displayMode: List
kind: Connection
name: Service Monitors
query:
raw: |-
query Find($src: String!, $targetGroup: String!, $targetKind: String!) {
find(oid: $src) {
exposed_by(group: "", kind: "Service") {
refs: monitored_by(group: $targetGroup, kind: $targetKind) {
namespace
name
}
}
}
}
type: GraphQL
ref:
group: monitoring.coreos.com
kind: ServiceMonitor
- actions:
create: Never
displayMode: List
kind: Connection
name: Pod Monitors
query:
raw: |-
query Find($src: String!, $targetGroup: String!, $targetKind: String!) {
find(oid: $src) {
exposed_by(group: "", kind: "Service") {
refs: monitored_by(group: $targetGroup, kind: $targetKind) {
namespace
name
}
}
}
}
type: GraphQL
ref:
group: monitoring.coreos.com
kind: PodMonitor
- actions:
create: Never
displayMode: List
kind: Connection
name: Prometheus
query:
raw: |-
query Find($src: String!, $targetGroup: String!, $targetKind: String!) {
find(oid: $src) {
services: exposed_by(group: "", kind: "Service") {
refs: monitored_by(group: $targetGroup, kind: $targetKind) {
namespace
name
}
}
refs: monitored_by(group: $targetGroup, kind: $targetKind) {
namespace
name
}
}
}
type: GraphQL
ref:
group: monitoring.coreos.com
kind: Prometheus
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
apiVersion: meta.k8s.appscode.com/v1alpha1
kind: ResourceBlockDefinition
metadata:
creationTimestamp: null
name: stash.appscode.com-v1-apps-backup-kubedb
spec:
blocks:
- actions:
create: Never
displayMode: List
kind: Connection
name: Repository
query:
raw: |-
query Find($src: String!, $targetGroup: String!, $targetKind: String!) {
find(oid: $src) {
backup_via(group: "stash.appscode.com", kind: "BackupConfiguration") {
refs: offshoot(group: $targetGroup, kind: $targetKind) {
namespace
name
}
}
}
}
type: GraphQL
ref:
group: stash.appscode.com
kind: Repository
requiredFeatureSets:
opscenter-backup:
- stash
- actions:
create: Never
displayMode: List
kind: Connection
name: Backup Configuration
query:
byLabel: backup_via
type: GraphQL
ref:
group: stash.appscode.com
kind: BackupConfiguration
requiredFeatureSets:
opscenter-backup:
- stash
- 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: "stash.appscode.com", kind: "BackupConfiguration") {
refs: offshoot(group: $targetGroup, kind: $targetKind) {
namespace
name
}
}
}
}
type: GraphQL
ref:
group: stash.appscode.com
kind: BackupSession
requiredFeatureSets:
opscenter-backup:
- stash
- actions:
create: Never
displayMode: List
kind: Connection
name: Recent Restores
query:
raw: |-
query Find($src: String!, $targetGroup: String!, $targetKind: String!) {
find(oid: $src) {
backup_via(group: "stash.appscode.com", kind: "BackupConfiguration") {
refs: offshoot(group: $targetGroup, kind: $targetKind) {
namespace
name
}
}
}
}
type: GraphQL
ref:
group: stash.appscode.com
kind: RestoreSession
requiredFeatureSets:
opscenter-backup:
- stash
- 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: "stash.appscode.com", kind: "BackupConfiguration") {
refs: offshoot(group: $targetGroup, kind: $targetKind) {
namespace
name
}
}
}
}
type: GraphQL
ref:
group: batch
kind: CronJob
requiredFeatureSets:
opscenter-backup:
- stash
Original file line number Diff line number Diff line change
Expand Up @@ -104,18 +104,6 @@ spec:
kind: MariaDBSchemaOverview
type: MatchName
exec:
- alias: Primary
command:
- bash
- -c
- mysql -u"$MYSQL_ROOT_USERNAME" -p"$MYSQL_ROOT_PASSWORD"
container: mariadb
help: |
show databases;
if:
condition: |
{{- if (hasPrefix "10." .spec.version) }}true{{ else }}false{{ end -}}
serviceNameTemplate: '{{- .metadata.name -}}'
- alias: Primary
command:
- bash
Expand All @@ -124,9 +112,6 @@ spec:
container: mariadb
help: |
show databases;
if:
condition: |
{{- if (hasPrefix "10." .spec.version) }}false{{ else }}true{{ end -}}
serviceNameTemplate: '{{- .metadata.name -}}'
resource:
group: kubedb.com
Expand Down
Loading

0 comments on commit 58332da

Please sign in to comment.