Skip to content

Commit

Permalink
Update descriptors, editors & tabledefinitions for kubedb api v1 (#443)
Browse files Browse the repository at this point in the history
Signed-off-by: Arnob kumar saha <[email protected]>
  • Loading branch information
ArnobKumarSaha authored Jul 12, 2024
1 parent d2e8e7c commit 2d70ce7
Show file tree
Hide file tree
Showing 85 changed files with 5,086 additions and 227 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ require (
kmodules.xyz/client-go v0.30.9
kmodules.xyz/crd-schema-fuzz v0.29.1
kmodules.xyz/go-containerregistry v0.0.12
kmodules.xyz/resource-metrics v0.30.1
kmodules.xyz/resource-metrics v0.30.2-0.20240711131537-5e9d22977a2c
kmodules.xyz/schema-checker v0.4.1
sigs.k8s.io/cli-utils v0.34.0
sigs.k8s.io/controller-runtime v0.18.4
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,8 @@ kmodules.xyz/go-containerregistry v0.0.12 h1:Tl32QGmSqRVm9PUEb/f3dgDeu9zW5fVzt3q
kmodules.xyz/go-containerregistry v0.0.12/go.mod h1:KgeNg0hDsgeda+qc0NzWk0iVRdF0+ZIg/oRzGoYh78I=
kmodules.xyz/offshoot-api v0.29.4 h1:WQV2BIUIoVKKiqZNmZ4gAy367jEdwBhEl3dFCLZM1qA=
kmodules.xyz/offshoot-api v0.29.4/go.mod h1:e+NQ0s4gW/YTPWBWEfdISZcmk+tlTq8IjvP5SLdqvko=
kmodules.xyz/resource-metrics v0.30.1 h1:o7mVY8ZwSe5iEILy1eMG4EPZCli7mXZCkgQONjoY9uU=
kmodules.xyz/resource-metrics v0.30.1/go.mod h1:UYcQQLN+3o8rNPQJwJa2D9bt5ihJCeo5bCDuQ4O3MPY=
kmodules.xyz/resource-metrics v0.30.2-0.20240711131537-5e9d22977a2c h1:lh7s0AXSRezZx0YnKSmB5GqGpTk3PQ9xCYxhqdbNFjU=
kmodules.xyz/resource-metrics v0.30.2-0.20240711131537-5e9d22977a2c/go.mod h1:UYcQQLN+3o8rNPQJwJa2D9bt5ihJCeo5bCDuQ4O3MPY=
kmodules.xyz/schema-checker v0.4.1 h1:V5UEjR6UMAXf307lTgw+9rDRfHLTNA8g/q9DngqYI9M=
kmodules.xyz/schema-checker v0.4.1/go.mod h1:BRXLB3Osuc9raHRJxHOgZFGecZ2aZumLXCHAOa5NPdA=
sigs.k8s.io/cli-utils v0.34.0 h1:zCUitt54f0/MYj/ajVFnG6XSXMhpZ72O/3RewIchW8w=
Expand Down
102 changes: 102 additions & 0 deletions hub/resourcedescriptors/kubedb.com/v1/elasticsearches.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,108 @@ metadata:
k8s.io/version: v1
name: kubedb.com-v1-elasticsearches
spec:
connections:
- labels:
- offshoot
level: Controller
namespace:
path: metadata.namespace
selector:
matchLabels:
app.kubernetes.io/instance: '{.metadata.name}'
app.kubernetes.io/managed-by: kubedb.com
app.kubernetes.io/name: elasticsearches.kubedb.com
target:
apiVersion: apps/v1
kind: StatefulSet
type: MatchSelector
- labels:
- auth_secret
references:
- '{.spec.authSecret.name}'
target:
apiVersion: v1
kind: Secret
type: MatchRef
- labels:
- catalog
references:
- '{.spec.version}'
target:
apiVersion: catalog.kubedb.com/v1alpha1
kind: ElasticsearchVersion
type: MatchRef
- labels:
- cert_issuer
namespace:
path: metadata.namespace
references:
- '{.spec.tls.issuerRef.name},{.metadata.namespace}'
target:
apiVersion: cert-manager.io/v1
kind: Issuer
type: MatchRef
- labels:
- cert_issuer
references:
- '{.spec.tls.issuerRef.name}'
target:
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
type: MatchRef
- labels:
- view
nameTemplate: '{.metadata.name}~Elasticsearch.kubedb.com'
namespace:
path: metadata.namespace
target:
apiVersion: core.k8s.appscode.com/v1alpha1
kind: GenericResource
type: MatchName
- labels:
- view
nameTemplate: '{.metadata.name}~Elasticsearch.kubedb.com'
namespace:
path: metadata.namespace
target:
apiVersion: core.k8s.appscode.com/v1alpha1
kind: GenericResourceService
type: MatchName
- labels:
- view
nameTemplate: '{.metadata.name}'
namespace:
path: metadata.namespace
target:
apiVersion: ui.kubedb.com/v1alpha1
kind: ElasticsearchInsight
type: MatchName
- labels:
- view
nameTemplate: '{.metadata.name}'
namespace:
path: metadata.namespace
target:
apiVersion: ui.kubedb.com/v1alpha1
kind: ElasticsearchNodesStats
type: MatchName
- labels:
- view
nameTemplate: '{.metadata.name}'
namespace:
path: metadata.namespace
target:
apiVersion: ui.kubedb.com/v1alpha1
kind: ElasticsearchSchemaOverview
type: MatchName
exec:
- alias: Primary
command:
- bash
container: elasticsearch
help: |
curl -XGET -k -u "$ELASTIC_USER:$ELASTIC_PASSWORD" "https://localhost:9200/_cluster/health?pretty"
serviceNameTemplate: '{{- .metadata.name -}}'
resource:
group: kubedb.com
kind: Elasticsearch
Expand Down
96 changes: 96 additions & 0 deletions hub/resourcedescriptors/kubedb.com/v1/kafkas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,102 @@ metadata:
k8s.io/version: v1
name: kubedb.com-v1-kafkas
spec:
connections:
- labels:
- offshoot
level: Controller
namespace:
path: metadata.namespace
selector:
matchLabels:
app.kubernetes.io/instance: '{.metadata.name}'
app.kubernetes.io/managed-by: kubedb.com
app.kubernetes.io/name: kafkas.kubedb.com
target:
apiVersion: apps/v1
kind: StatefulSet
type: MatchSelector
- labels:
- connect_via
level: Controller
nameTemplate: '{.metadata.name}'
namespace:
path: metadata.namespace
target:
apiVersion: appcatalog.appscode.com/v1alpha1
kind: AppBinding
type: MatchName
- labels:
- catalog
references:
- '{.spec.version}'
target:
apiVersion: catalog.kubedb.com/v1alpha1
kind: KafkaVersion
type: MatchRef
- labels:
- cert_issuer
namespace:
path: metadata.namespace
references:
- '{.spec.tls.issuerRef.name},{.metadata.namespace}'
target:
apiVersion: cert-manager.io/v1
kind: Issuer
type: MatchRef
- labels:
- cert_issuer
references:
- '{.spec.tls.issuerRef.name}'
target:
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
type: MatchRef
- labels:
- view
nameTemplate: '{.metadata.name}~Kafka.kubedb.com'
namespace:
path: metadata.namespace
target:
apiVersion: core.k8s.appscode.com/v1alpha1
kind: GenericResource
type: MatchName
- labels:
- view
nameTemplate: '{.metadata.name}~Kafka.kubedb.com'
namespace:
path: metadata.namespace
target:
apiVersion: core.k8s.appscode.com/v1alpha1
kind: GenericResourceService
type: MatchName
- labels:
- view
nameTemplate: '{.metadata.name}'
namespace:
path: metadata.namespace
target:
apiVersion: ui.kubedb.com/v1alpha1
kind: KafkaInsight
type: MatchName
- labels:
- view
nameTemplate: '{.metadata.name}'
namespace:
path: metadata.namespace
target:
apiVersion: ui.kubedb.com/v1alpha1
kind: KafkaNodesStats
type: MatchName
- labels:
- view
nameTemplate: '{.metadata.name}'
namespace:
path: metadata.namespace
target:
apiVersion: ui.kubedb.com/v1alpha1
kind: KafkaSchemaOverview
type: MatchName
resource:
group: kubedb.com
kind: Kafka
Expand Down
104 changes: 104 additions & 0 deletions hub/resourcedescriptors/kubedb.com/v1/mariadbs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,110 @@ metadata:
k8s.io/version: v1
name: kubedb.com-v1-mariadbs
spec:
connections:
- labels:
- offshoot
level: Controller
namespace:
path: metadata.namespace
selector:
matchLabels:
app.kubernetes.io/instance: '{.metadata.name}'
app.kubernetes.io/managed-by: kubedb.com
app.kubernetes.io/name: mariadbs.kubedb.com
target:
apiVersion: apps/v1
kind: StatefulSet
type: MatchSelector
- labels:
- auth_secret
references:
- '{.spec.authSecret.name}'
target:
apiVersion: v1
kind: Secret
type: MatchRef
- labels:
- catalog
references:
- '{.spec.version}'
target:
apiVersion: catalog.kubedb.com/v1alpha1
kind: MariaDBVersion
type: MatchRef
- labels:
- cert_issuer
namespace:
path: metadata.namespace
references:
- '{.spec.tls.issuerRef.name},{.metadata.namespace}'
target:
apiVersion: cert-manager.io/v1
kind: Issuer
type: MatchRef
- labels:
- cert_issuer
references:
- '{.spec.tls.issuerRef.name}'
target:
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
type: MatchRef
- labels:
- view
nameTemplate: '{.metadata.name}~MariaDB.kubedb.com'
namespace:
path: metadata.namespace
target:
apiVersion: core.k8s.appscode.com/v1alpha1
kind: GenericResource
type: MatchName
- labels:
- view
nameTemplate: '{.metadata.name}~MariaDB.kubedb.com'
namespace:
path: metadata.namespace
target:
apiVersion: core.k8s.appscode.com/v1alpha1
kind: GenericResourceService
type: MatchName
- labels:
- view
nameTemplate: '{.metadata.name}'
namespace:
path: metadata.namespace
target:
apiVersion: ui.kubedb.com/v1alpha1
kind: MariaDBInsight
type: MatchName
- labels:
- view
nameTemplate: '{.metadata.name}'
namespace:
path: metadata.namespace
target:
apiVersion: ui.kubedb.com/v1alpha1
kind: MariaDBQueries
type: MatchName
- labels:
- view
nameTemplate: '{.metadata.name}'
namespace:
path: metadata.namespace
target:
apiVersion: ui.kubedb.com/v1alpha1
kind: MariaDBSchemaOverview
type: MatchName
exec:
- alias: Primary
command:
- bash
- -c
- mariadb -u"$MYSQL_ROOT_USERNAME" -p"$MYSQL_ROOT_PASSWORD"
container: mariadb
help: |
show databases;
serviceNameTemplate: '{{- .metadata.name -}}'
resource:
group: kubedb.com
kind: MariaDB
Expand Down
Loading

0 comments on commit 2d70ce7

Please sign in to comment.