Skip to content

Commit

Permalink
Make kubedb-presets more configurable (#562)
Browse files Browse the repository at this point in the history
Signed-off-by: Arnob kumar saha <[email protected]>
  • Loading branch information
ArnobKumarSaha authored Nov 7, 2024
1 parent e1ee9ea commit 1540899
Show file tree
Hide file tree
Showing 11 changed files with 960 additions and 12 deletions.
76 changes: 75 additions & 1 deletion charts/kubedb-ui-presets/README.md

Large diffs are not rendered by default.

396 changes: 396 additions & 0 deletions charts/kubedb-ui-presets/values.openapiv3_schema.yaml

Large diffs are not rendered by default.

100 changes: 99 additions & 1 deletion charts/kubedb-ui-presets/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,101 +23,181 @@ databases:
available: []
default: ""
toggle: true
mode:
available: []
default: ""
toggle: true
Druid:
versions:
available: []
default: ""
toggle: true
mode:
available: []
default: ""
toggle: true
Elasticsearch:
versions:
available: []
default: ""
toggle: true
mode:
available: []
default: ""
toggle: true
FerretDB:
versions:
available: []
default: ""
toggle: true
mode:
available: []
default: ""
toggle: true
Kafka:
versions:
available: []
default: ""
toggle: true
mode:
available: []
default: ""
toggle: true
MariaDB:
versions:
available: []
default: ""
toggle: true
mode:
available: []
default: ""
toggle: true
Memcached:
versions:
available: []
default: ""
toggle: true
mode:
available: []
default: ""
toggle: true
MongoDB:
versions:
available: []
default: ""
toggle: true
mode:
available: []
default: ""
toggle: true
MSSQLServer:
versions:
available: []
default: ""
toggle: true
mode:
available: []
default: ""
toggle: true
MySQL:
versions:
available: []
default: ""
toggle: true
mode:
available: []
default: ""
toggle: true
PerconaXtraDB:
versions:
available: []
default: ""
toggle: true
mode:
available: []
default: ""
toggle: true
PgBouncer:
versions:
available: []
default: ""
toggle: true
mode:
available: []
default: ""
toggle: true
Pgpool:
versions:
available: []
default: ""
toggle: true
mode:
available: []
default: ""
toggle: true
Postgres:
versions:
available: []
default: ""
toggle: true
mode:
available: []
default: ""
toggle: true
ProxySQL:
versions:
available: []
default: ""
toggle: true
mode:
available: []
default: ""
toggle: true
RabbitMQ:
versions:
available: []
default: ""
toggle: true
mode:
available: []
default: ""
toggle: true
Redis:
versions:
available: []
default: ""
toggle: true
mode:
available: []
default: ""
toggle: true
Singlestore:
versions:
available: []
default: ""
toggle: true
mode:
available: []
default: ""
toggle: true
Solr:
versions:
available: []
default: ""
toggle: true
mode:
available: []
default: ""
toggle: true
ZooKeeper:
versions:
available: []
default: ""
toggle: true
mode:
available: []
default: ""
toggle: true

storageClasses:
available: []
Expand All @@ -135,6 +215,15 @@ expose:
default: true
toggle: true
showPreview: false
leftPanel:
showInsights: true
showVaultInfo: true
showOperations: true
showBackup: true
showBackupLegacy: false
showSecurity: false
nodeSelector: {}
tolerations: []

monitoring:
# Name of monitoring agent (one of "prometheus.io", "prometheus.io/operator", "prometheus.io/builtin")
Expand All @@ -145,6 +234,15 @@ monitoring:
alert:
toggle: true

archiver:
deletionPolicy:
default: WipeOut
toggle: true
backup:
default: true
toggle: true
archiver:
default: false
toggle: true
pointInTimeRecovery:
default: false
toggle: true
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ toolchain go1.23.2
require (
go.bytebuilders.dev/catalog v0.0.9-0.20241103203407-01a77a6813c9
go.bytebuilders.dev/resource-model v0.1.1-0.20241023004602-2c43ef3bb37b
go.bytebuilders.dev/ui-wizards v0.8.0
go.bytebuilders.dev/ui-wizards v0.8.1-0.20241107085111-1f7fd6efa56d
go.openviz.dev/installer v0.0.0-20240731074805-a62b13eaedb0
gomodules.xyz/go-sh v0.1.0
k8s.io/api v0.30.2
Expand Down Expand Up @@ -85,7 +85,7 @@ require (
github.com/yudai/gojsondiff v1.0.0 // indirect
github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 // indirect
github.com/zeebo/xxh3 v1.0.2 // indirect
go.appscode.dev/alerts v0.2.1-0.20240604101218-3069fbd7c6b8 // indirect
go.appscode.dev/alerts v0.2.1-0.20240918094400-626962340a86 // indirect
golang.org/x/crypto v0.27.0 // indirect
golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 // indirect
golang.org/x/net v0.29.0 // indirect
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -184,14 +184,14 @@ github.com/zeebo/assert v1.3.0 h1:g7C04CbJuIDKNPFHmsk4hwZDO5O+kntRxzaUoNXj+IQ=
github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0=
github.com/zeebo/xxh3 v1.0.2 h1:xZmwmqxHZA8AI603jOQ0tMqmBr9lPeFwGg6d+xy9DC0=
github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA=
go.appscode.dev/alerts v0.2.1-0.20240604101218-3069fbd7c6b8 h1:7FP18GEp6Jm0OUt5lsS9HjVitmiU9zZ5wVQwgU+Y23g=
go.appscode.dev/alerts v0.2.1-0.20240604101218-3069fbd7c6b8/go.mod h1:5+qwuxF78YiFg/CEGfgfXREj7KEJYLgQeFhke4+lQ8k=
go.appscode.dev/alerts v0.2.1-0.20240918094400-626962340a86 h1:dfc+hbp0T8/WkaKpVx+VgbDNPyKMvTLa4jxdd0Dx+8c=
go.appscode.dev/alerts v0.2.1-0.20240918094400-626962340a86/go.mod h1:5+qwuxF78YiFg/CEGfgfXREj7KEJYLgQeFhke4+lQ8k=
go.bytebuilders.dev/catalog v0.0.9-0.20241103203407-01a77a6813c9 h1:ESCaEsrR0XJrrV8E81aZJCJ0fSHHfM7e9N6IDTIo/to=
go.bytebuilders.dev/catalog v0.0.9-0.20241103203407-01a77a6813c9/go.mod h1:ndC200F9L1RM0MjYG19Bc2+nEikgPpTlGZ60d4oc+kU=
go.bytebuilders.dev/resource-model v0.1.1-0.20241023004602-2c43ef3bb37b h1:loq3wv7NQY9givjW8djFMqe/1d+8j2wE4k5hueDIWC0=
go.bytebuilders.dev/resource-model v0.1.1-0.20241023004602-2c43ef3bb37b/go.mod h1:/uMIfxqPIrDmiYWA28OW3xzogijxpwkicR4kK7jam9g=
go.bytebuilders.dev/ui-wizards v0.8.0 h1:7hute2GVoidjP6wcI78kyUV/x2Lhpw4VodFCZpFE6Lc=
go.bytebuilders.dev/ui-wizards v0.8.0/go.mod h1:tuKPXHNlnHLJiiV5bfPabnjQshiqIqkJ1qw6k9ctgak=
go.bytebuilders.dev/ui-wizards v0.8.1-0.20241107085111-1f7fd6efa56d h1:DtEjx2u89fgsqU6dRQiR5h3GnQPlzTNqPmn+dxuvK3o=
go.bytebuilders.dev/ui-wizards v0.8.1-0.20241107085111-1f7fd6efa56d/go.mod h1:uIhI+FJJnC0Lg7NU6u1XkoLuo4QkkF+3BcWpT30KhZA=
go.openviz.dev/installer v0.0.0-20240731074805-a62b13eaedb0 h1:zA5/psft6xJPNZZfDh7VpOlEEzqVOWoLQlXRFyOeyjc=
go.openviz.dev/installer v0.0.0-20240731074805-a62b13eaedb0/go.mod h1:5q9Z38No4Xw0RGJnWYqAWPpXSG4XQYqiLzGHMv4pTPI=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
/*
Copyright AppsCode Inc. and Contributors
Licensed under the AppsCode Community License 1.0.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://github.com/appscode/licenses/raw/1.0.0/AppsCode-Community-1.0.0.md
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package v1alpha1

import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
mona "kmodules.xyz/monitoring-agent-api/api/v1"
api "x-helm.dev/apimachinery/apis/releases/v1alpha1"
)

const (
ResourceKindMemcachedAlerts = "MemcachedAlerts"
ResourceMemcachedAlerts = "memcachedalerts"
ResourceMemcachedAlertss = "memcachedalertss"
)

// MemcachedAlerts defines the schama for KubeDB Ops Manager Operator Installer.

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

// +kubebuilder:object:root=true
// +kubebuilder:resource:path=memcachedalertss,singular=memcachedalerts,categories={kubedb,appscode}
type MemcachedAlerts struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec MemcachedAlertsSpec `json:"spec,omitempty"`
}

// MemcachedAlertsSpec is the schema for kubedb-autoscaler chart values file
type MemcachedAlertsSpec struct {
api.Metadata `json:"metadata,omitempty"`
Form MemcachedAlertsSpecForm `json:"form"`
Grafana MemcachedGrafana `json:"grafana"`
}

type MemcachedAlertsSpecForm struct {
Alert MemcachedAlert `json:"alert"`
}

type MemcachedAlert struct {
Enabled mona.SeverityFlag `json:"enabled"`
Labels map[string]string `json:"labels"`
// +optional
Annotations map[string]string `json:"annotations"`
// +optional
AdditionalRuleLabels map[string]string `json:"additionalRuleLabels"`
Groups MemcachedAlertGroups `json:"groups"`
}
type MemcachedAlertGroups struct {
Database MemcachedDatabaseAlert `json:"database"`
Provisioner ProvisionerAlert `json:"provisioner"`
KubeStash KubeStashAlert `json:"kubeStash"`
}
type MemcachedDatabaseAlert struct {
Enabled mona.SeverityFlag `json:"enabled"`
Rules MemcachedDatabaseAlertRules `json:"rules"`
}

type MemcachedDatabaseAlertRules struct {
MemcachedDown FixedAlert `json:"memcachedDown"`
MemcachedServiceRespawn IntValAlert `json:"memcachedServiceRespawn"`
MemcachedConnectionThrottled IntValAlert `json:"memcachedConnectionThrottled"`
MemcachedConnectionsNoneMinor FixedAlert `json:"memcachedConnectionsNoneMinor"`
MemcachedItemsNoneMinor FixedAlert `json:"memcachedItemsNoneMinor"`
MemcachedEvictionsLimit IntValAlert `json:"memcachedEvictionsLimit"`
}

type MemcachedGrafana struct {
Enabled bool `json:"enabled"`
Version string `json:"version"`
JobName string `json:"jobName"`
URL string `json:"url"`
ApiKey string `json:"apikey"`
}

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

// MemcachedAlertsList is a list of MemcachedAlertss
type MemcachedAlertsList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
// Items is a list of MemcachedAlerts CRD objects
Items []MemcachedAlerts `json:"items,omitempty"`
}
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ func addKnownTypes(scheme *runtime.Scheme) error {
&KafkaAlertsList{},
&MariadbAlerts{},
&MariadbAlertsList{},
&MemcachedAlerts{},
&MemcachedAlertsList{},
&MongodbAlerts{},
&MongodbAlertsList{},
&MysqlAlerts{},
Expand Down
Loading

0 comments on commit 1540899

Please sign in to comment.