Skip to content

Commit

Permalink
Add layouts for new dbs
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <tamal@appscode.com>
  • Loading branch information
tamalsaha committed May 9, 2024
1 parent 9d9d35d commit a1bb1b0
Show file tree
Hide file tree
Showing 44 changed files with 4,205 additions and 4 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.4-0.20240508091636-af957419033d
kmodules.xyz/resource-metadata v0.18.5-0.20240509105622-88a4ee7486a1
kmodules.xyz/resource-metrics v0.29.5
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.4-0.20240508091636-af957419033d h1:bx0zkG52i/zispkGB9gudcqVuoawzeeGs6p8P9Js5s4=
kmodules.xyz/resource-metadata v0.18.4-0.20240508091636-af957419033d/go.mod h1:HY6FmDDzQOEHfIEHRiqwNXVyof3uRIDtLSu0Yi1mIBw=
kmodules.xyz/resource-metadata v0.18.5-0.20240509105622-88a4ee7486a1 h1:Hlrrot/ZlODo4qKfSt/R83Qz73S1DwXPotfY3ykUfQY=
kmodules.xyz/resource-metadata v0.18.5-0.20240509105622-88a4ee7486a1/go.mod h1:HY6FmDDzQOEHfIEHRiqwNXVyof3uRIDtLSu0Yi1mIBw=
kmodules.xyz/resource-metrics v0.29.5 h1:ciuvRXuXsloLNW/JwkubqbYySsvHvHr6/nhkTL5Sf1o=
kmodules.xyz/resource-metrics v0.29.5/go.mod h1:OuG/QobZ7o8GFHl/u3lqaUR0fDZDegxtV8Vdh+MNBD4=
kmodules.xyz/sets v0.29.0 h1:ZX/qOECzUob95JhhRtngJElHSlJ1UNNdwK4hTEy+nl0=
Expand Down
9 changes: 9 additions & 0 deletions vendor/kmodules.xyz/resource-metadata/hub/helm.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
"kmodules.xyz/resource-metadata/apis/shared"

fluxsrc "github.com/fluxcd/source-controller/api/v1beta2"
"k8s.io/apimachinery/pkg/runtime/schema"
"sigs.k8s.io/controller-runtime/pkg/client"
chartsapi "x-helm.dev/apimachinery/apis/charts/v1alpha1"
releasesapi "x-helm.dev/apimachinery/apis/releases/v1alpha1"
Expand Down Expand Up @@ -146,3 +147,11 @@ func HelmCreateNamespace(kc client.Client) bool {
}
return true
}

func IsFeaturesetGR(gr schema.GroupResource) bool {
return gr.Group == "ui.k8s.appscode.com" && gr.Resource == "featuresets"
}

func IsFeaturesetGK(gk schema.GroupKind) bool {
return gk.Group == "ui.k8s.appscode.com" && gk.Kind == "FeatureSet"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
apiVersion: meta.k8s.appscode.com/v1alpha1
kind: ResourceBlockDefinition
metadata:
creationTimestamp: null
labels:
k8s.io/group: kubedb.com
k8s.io/kind: Druid
k8s.io/resource: druids
k8s.io/version: v1alpha2
name: kubedb.com-v1alpha2-druids
spec:
blocks:
- actions:
create: Never
displayMode: List
kind: Connection
name: Client Connections
query:
byLabel: connect_via
type: GraphQL
ref:
group: appcatalog.appscode.com
kind: AppBinding
- actions:
create: Never
displayMode: List
kind: Connection
name: Druid Version
query:
byLabel: catalog
type: GraphQL
ref:
group: catalog.kubedb.com
kind: DruidVersion
- actions:
create: Never
displayMode: List
kind: Connection
name: StatefulSets
query:
byLabel: offshoot
type: GraphQL
ref:
group: apps
kind: StatefulSet
- actions:
create: Never
displayMode: List
kind: Connection
name: Pods
query:
byLabel: offshoot
type: GraphQL
ref:
group: ""
kind: Pod
- actions:
create: Never
displayMode: List
kind: Connection
name: Services
query:
byLabel: exposed_by
type: GraphQL
ref:
group: ""
kind: Service
- actions:
create: Never
displayMode: List
kind: Connection
name: Secrets
query:
byLabel: config
type: GraphQL
ref:
group: ""
kind: Secret
- actions:
create: Never
displayMode: List
kind: Connection
name: PersistentVolumeClaims
query:
byLabel: storage
type: GraphQL
ref:
group: ""
kind: PersistentVolumeClaim
- actions:
create: Never
displayMode: List
kind: Connection
name: Pod Disruption Budgets
query:
byLabel: policy
type: GraphQL
ref:
group: policy
kind: PodDisruptionBudget
resource:
group: kubedb.com
kind: Druid
name: druids
scope: Namespaced
version: v1alpha2
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
apiVersion: meta.k8s.appscode.com/v1alpha1
kind: ResourceBlockDefinition
metadata:
creationTimestamp: null
labels:
k8s.io/group: kubedb.com
k8s.io/kind: FerretDB
k8s.io/resource: ferretdbs
k8s.io/version: v1alpha2
name: kubedb.com-v1alpha2-ferretdbs
spec:
blocks:
- actions:
create: Never
displayMode: List
kind: Connection
name: Client Connections
query:
byLabel: connect_via
type: GraphQL
ref:
group: appcatalog.appscode.com
kind: AppBinding
- actions:
create: Never
displayMode: List
kind: Connection
name: FerretDB Version
query:
byLabel: catalog
type: GraphQL
ref:
group: catalog.kubedb.com
kind: FerretDBVersion
- actions:
create: Never
displayMode: List
kind: Connection
name: StatefulSets
query:
byLabel: offshoot
type: GraphQL
ref:
group: apps
kind: StatefulSet
- actions:
create: Never
displayMode: List
kind: Connection
name: Pods
query:
byLabel: offshoot
type: GraphQL
ref:
group: ""
kind: Pod
- actions:
create: Never
displayMode: List
kind: Connection
name: Services
query:
byLabel: exposed_by
type: GraphQL
ref:
group: ""
kind: Service
- actions:
create: Never
displayMode: List
kind: Connection
name: Secrets
query:
byLabel: config
type: GraphQL
ref:
group: ""
kind: Secret
- actions:
create: Never
displayMode: List
kind: Connection
name: PersistentVolumeClaims
query:
byLabel: storage
type: GraphQL
ref:
group: ""
kind: PersistentVolumeClaim
- actions:
create: Never
displayMode: List
kind: Connection
name: Pod Disruption Budgets
query:
byLabel: policy
type: GraphQL
ref:
group: policy
kind: PodDisruptionBudget
resource:
group: kubedb.com
kind: FerretDB
name: ferretdbs
scope: Namespaced
version: v1alpha2
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
apiVersion: meta.k8s.appscode.com/v1alpha1
kind: ResourceBlockDefinition
metadata:
creationTimestamp: null
labels:
k8s.io/group: kubedb.com
k8s.io/kind: MSSQLServer
k8s.io/resource: mssqlservers
k8s.io/version: v1alpha2
name: kubedb.com-v1alpha2-mssqlservers
spec:
blocks:
- actions:
create: Never
displayMode: List
kind: Connection
name: Client Connections
query:
byLabel: connect_via
type: GraphQL
ref:
group: appcatalog.appscode.com
kind: AppBinding
- actions:
create: Never
displayMode: List
kind: Connection
name: MSSQLServer Version
query:
byLabel: catalog
type: GraphQL
ref:
group: catalog.kubedb.com
kind: MSSQLServerVersion
- actions:
create: Never
displayMode: List
kind: Connection
name: StatefulSets
query:
byLabel: offshoot
type: GraphQL
ref:
group: apps
kind: StatefulSet
- actions:
create: Never
displayMode: List
kind: Connection
name: Pods
query:
byLabel: offshoot
type: GraphQL
ref:
group: ""
kind: Pod
- actions:
create: Never
displayMode: List
kind: Connection
name: Services
query:
byLabel: exposed_by
type: GraphQL
ref:
group: ""
kind: Service
- actions:
create: Never
displayMode: List
kind: Connection
name: Secrets
query:
byLabel: config
type: GraphQL
ref:
group: ""
kind: Secret
- actions:
create: Never
displayMode: List
kind: Connection
name: PersistentVolumeClaims
query:
byLabel: storage
type: GraphQL
ref:
group: ""
kind: PersistentVolumeClaim
- actions:
create: Never
displayMode: List
kind: Connection
name: Pod Disruption Budgets
query:
byLabel: policy
type: GraphQL
ref:
group: policy
kind: PodDisruptionBudget
resource:
group: kubedb.com
kind: MSSQLServer
name: mssqlservers
scope: Namespaced
version: v1alpha2
Loading

0 comments on commit a1bb1b0

Please sign in to comment.