diff --git a/go.mod b/go.mod index e2108b049..3a2e98e49 100644 --- a/go.mod +++ b/go.mod @@ -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.2-0.20240711131537-5e9d22977a2c + kmodules.xyz/resource-metrics v0.30.2-0.20240809125122-4c04e13dfc80 kmodules.xyz/schema-checker v0.4.1 sigs.k8s.io/cli-utils v0.34.0 sigs.k8s.io/controller-runtime v0.18.4 diff --git a/go.sum b/go.sum index f624ef4a4..7e07b719d 100644 --- a/go.sum +++ b/go.sum @@ -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.2-0.20240711131537-5e9d22977a2c h1:lh7s0AXSRezZx0YnKSmB5GqGpTk3PQ9xCYxhqdbNFjU= -kmodules.xyz/resource-metrics v0.30.2-0.20240711131537-5e9d22977a2c/go.mod h1:UYcQQLN+3o8rNPQJwJa2D9bt5ihJCeo5bCDuQ4O3MPY= +kmodules.xyz/resource-metrics v0.30.2-0.20240809125122-4c04e13dfc80 h1:0fOJLpzMFZbk3PGAQdlZNvhpIBEyZMN1823U9wa/lG0= +kmodules.xyz/resource-metrics v0.30.2-0.20240809125122-4c04e13dfc80/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= diff --git a/hub/resourcedashboards/kubedb.com/v1/elasticsearches.yaml b/hub/resourcedashboards/kubedb.com/v1/elasticsearches.yaml new file mode 100644 index 000000000..9616a125f --- /dev/null +++ b/hub/resourcedashboards/kubedb.com/v1/elasticsearches.yaml @@ -0,0 +1,37 @@ +apiVersion: ui.k8s.appscode.com/v1alpha1 +kind: ResourceDashboard +metadata: + creationTimestamp: null + labels: + k8s.io/group: kubedb.com + k8s.io/kind: Elasticsearch + k8s.io/resource: elasticsearches + k8s.io/version: v1 + name: kubedb.com-v1-elasticsearches +spec: + dashboards: + - title: KubeDB / Elasticsearch / Summary + vars: + - name: namespace + value: '{{ .metadata.namespace }}' + - name: app + value: '{{ .metadata.name }}' + - title: KubeDB / Elasticsearch / Database + vars: + - name: namespace + value: '{{ .metadata.namespace }}' + - name: app + value: '{{ .metadata.name }}' + - title: KubeDB / Elasticsearch / Pod + vars: + - name: namespace + value: '{{ .metadata.namespace }}' + - name: app + value: '{{ .metadata.name }}' + provider: Grafana + resource: + group: kubedb.com + kind: Elasticsearch + name: elasticsearches + scope: Namespaced + version: v1 diff --git a/hub/resourcedashboards/kubedb.com/v1/etcds.yaml b/hub/resourcedashboards/kubedb.com/v1/etcds.yaml new file mode 100644 index 000000000..f890d47d5 --- /dev/null +++ b/hub/resourcedashboards/kubedb.com/v1/etcds.yaml @@ -0,0 +1,19 @@ +apiVersion: ui.k8s.appscode.com/v1alpha1 +kind: ResourceDashboard +metadata: + creationTimestamp: null + labels: + k8s.io/group: kubedb.com + k8s.io/kind: Etcd + k8s.io/resource: etcds + k8s.io/version: v1 + name: kubedb.com-v1-etcds +spec: + dashboards: null + provider: Grafana + resource: + group: kubedb.com + kind: Etcd + name: etcds + scope: Namespaced + version: v1 diff --git a/hub/resourcedashboards/kubedb.com/v1/kafkas.yaml b/hub/resourcedashboards/kubedb.com/v1/kafkas.yaml new file mode 100644 index 000000000..00d2628f5 --- /dev/null +++ b/hub/resourcedashboards/kubedb.com/v1/kafkas.yaml @@ -0,0 +1,25 @@ +apiVersion: ui.k8s.appscode.com/v1alpha1 +kind: ResourceDashboard +metadata: + creationTimestamp: null + labels: + k8s.io/group: kubedb.com + k8s.io/kind: Kafka + k8s.io/resource: kafkas + k8s.io/version: v1 + name: kubedb.com-v1-kafkas +spec: + dashboards: + - title: KubeDB / Kafka / Database + vars: + - name: namespace + value: '{{ .metadata.namespace }}' + - name: service + value: '{{ .metadata.name }}' + provider: Grafana + resource: + group: kubedb.com + kind: Kafka + name: kafkas + scope: Namespaced + version: v1 diff --git a/hub/resourcedashboards/kubedb.com/v1/mariadbs.yaml b/hub/resourcedashboards/kubedb.com/v1/mariadbs.yaml new file mode 100644 index 000000000..9a87139bc --- /dev/null +++ b/hub/resourcedashboards/kubedb.com/v1/mariadbs.yaml @@ -0,0 +1,45 @@ +apiVersion: ui.k8s.appscode.com/v1alpha1 +kind: ResourceDashboard +metadata: + creationTimestamp: null + labels: + k8s.io/group: kubedb.com + k8s.io/kind: MariaDB + k8s.io/resource: mariadbs + k8s.io/version: v1 + name: kubedb.com-v1-mariadbs +spec: + dashboards: + - title: KubeDB / MariaDB / Summary + vars: + - name: namespace + value: '{{ .metadata.namespace }}' + - name: app + value: '{{ .metadata.name }}' + - if: + condition: '{{- if eq .spec.replicas 1 }}false{{ else }}true{{ end -}}' + title: KubeDB / MariaDB / Galera-Cluster + vars: + - name: namespace + value: '{{ .metadata.namespace }}' + - name: app + value: '{{ .metadata.name }}' + - title: KubeDB / MariaDB / Database + vars: + - name: namespace + value: '{{ .metadata.namespace }}' + - name: app + value: '{{ .metadata.name }}' + - title: KubeDB / MariaDB / Pod + vars: + - name: namespace + value: '{{ .metadata.namespace }}' + - name: app + value: '{{ .metadata.name }}' + provider: Grafana + resource: + group: kubedb.com + kind: MariaDB + name: mariadbs + scope: Namespaced + version: v1 diff --git a/hub/resourcedashboards/kubedb.com/v1/memcacheds.yaml b/hub/resourcedashboards/kubedb.com/v1/memcacheds.yaml new file mode 100644 index 000000000..834550282 --- /dev/null +++ b/hub/resourcedashboards/kubedb.com/v1/memcacheds.yaml @@ -0,0 +1,19 @@ +apiVersion: ui.k8s.appscode.com/v1alpha1 +kind: ResourceDashboard +metadata: + creationTimestamp: null + labels: + k8s.io/group: kubedb.com + k8s.io/kind: Memcached + k8s.io/resource: memcacheds + k8s.io/version: v1 + name: kubedb.com-v1-memcacheds +spec: + dashboards: null + provider: Grafana + resource: + group: kubedb.com + kind: Memcached + name: memcacheds + scope: Namespaced + version: v1 diff --git a/hub/resourcedashboards/kubedb.com/v1/mongodbs.yaml b/hub/resourcedashboards/kubedb.com/v1/mongodbs.yaml new file mode 100644 index 000000000..9ea550ced --- /dev/null +++ b/hub/resourcedashboards/kubedb.com/v1/mongodbs.yaml @@ -0,0 +1,39 @@ +apiVersion: ui.k8s.appscode.com/v1alpha1 +kind: ResourceDashboard +metadata: + creationTimestamp: null + labels: + k8s.io/group: kubedb.com + k8s.io/kind: MongoDB + k8s.io/resource: mongodbs + k8s.io/version: v1 + name: kubedb.com-v1-mongodbs +spec: + dashboards: + - title: KubeDB / MongoDB / Summary + vars: + - name: namespace + value: '{{ .metadata.namespace }}' + - name: app + value: '{{ .metadata.name }}' + - if: + condition: '{{- if or (hasKey .spec "replicaSet") (hasKey .spec "shardTopology") }}true{{ else }}false{{ end -}}' + title: KubeDB / MongoDB / Database / ReplicaSet + vars: + - name: namespace + value: '{{ .metadata.namespace }}' + - name: app + value: '{{ .metadata.name }}' + - title: KubeDB / MongoDB / Pod + vars: + - name: namespace + value: '{{ .metadata.namespace }}' + - name: app + value: '{{ .metadata.name }}' + provider: Grafana + resource: + group: kubedb.com + kind: MongoDB + name: mongodbs + scope: Namespaced + version: v1 diff --git a/hub/resourcedashboards/kubedb.com/v1/mysqls.yaml b/hub/resourcedashboards/kubedb.com/v1/mysqls.yaml new file mode 100644 index 000000000..67d5ea1be --- /dev/null +++ b/hub/resourcedashboards/kubedb.com/v1/mysqls.yaml @@ -0,0 +1,45 @@ +apiVersion: ui.k8s.appscode.com/v1alpha1 +kind: ResourceDashboard +metadata: + creationTimestamp: null + labels: + k8s.io/group: kubedb.com + k8s.io/kind: MySQL + k8s.io/resource: mysqls + k8s.io/version: v1 + name: kubedb.com-v1-mysqls +spec: + dashboards: + - title: KubeDB / MySQL / Summary + vars: + - name: namespace + value: '{{ .metadata.namespace }}' + - name: app + value: '{{ .metadata.name }}' + - if: + condition: '{{- if or (eq .spec.topology.mode "GroupReplication") (eq .spec.topology.mode "InnoDBCluster") }}true{{ else }}false{{ end -}}' + title: KubeDB / MySQL / Group-Replication-Summary + vars: + - name: namespace + value: '{{ .metadata.namespace }}' + - name: app + value: '{{ .metadata.name }}' + - title: KubeDB / MySQL / Database + vars: + - name: namespace + value: '{{ .metadata.namespace }}' + - name: app + value: '{{ .metadata.name }}' + - title: KubeDB / MySQL / Pod + vars: + - name: namespace + value: '{{ .metadata.namespace }}' + - name: app + value: '{{ .metadata.name }}' + provider: Grafana + resource: + group: kubedb.com + kind: MySQL + name: mysqls + scope: Namespaced + version: v1 diff --git a/hub/resourcedashboards/kubedb.com/v1/perconaxtradbs.yaml b/hub/resourcedashboards/kubedb.com/v1/perconaxtradbs.yaml new file mode 100644 index 000000000..41c5a3414 --- /dev/null +++ b/hub/resourcedashboards/kubedb.com/v1/perconaxtradbs.yaml @@ -0,0 +1,19 @@ +apiVersion: ui.k8s.appscode.com/v1alpha1 +kind: ResourceDashboard +metadata: + creationTimestamp: null + labels: + k8s.io/group: kubedb.com + k8s.io/kind: PerconaXtraDB + k8s.io/resource: perconaxtradbs + k8s.io/version: v1 + name: kubedb.com-v1-perconaxtradbs +spec: + dashboards: null + provider: Grafana + resource: + group: kubedb.com + kind: PerconaXtraDB + name: perconaxtradbs + scope: Namespaced + version: v1 diff --git a/hub/resourcedashboards/kubedb.com/v1/pgbouncers.yaml b/hub/resourcedashboards/kubedb.com/v1/pgbouncers.yaml new file mode 100644 index 000000000..ae05ed486 --- /dev/null +++ b/hub/resourcedashboards/kubedb.com/v1/pgbouncers.yaml @@ -0,0 +1,19 @@ +apiVersion: ui.k8s.appscode.com/v1alpha1 +kind: ResourceDashboard +metadata: + creationTimestamp: null + labels: + k8s.io/group: kubedb.com + k8s.io/kind: PgBouncer + k8s.io/resource: pgbouncers + k8s.io/version: v1 + name: kubedb.com-v1-pgbouncers +spec: + dashboards: null + provider: Grafana + resource: + group: kubedb.com + kind: PgBouncer + name: pgbouncers + scope: Namespaced + version: v1 diff --git a/hub/resourcedashboards/kubedb.com/v1/pod/elasticsearches.yaml b/hub/resourcedashboards/kubedb.com/v1/pod/elasticsearches.yaml new file mode 100644 index 000000000..4da235c45 --- /dev/null +++ b/hub/resourcedashboards/kubedb.com/v1/pod/elasticsearches.yaml @@ -0,0 +1,19 @@ +apiVersion: ui.k8s.appscode.com/v1alpha1 +kind: ResourceDashboard +metadata: + creationTimestamp: null + name: kubedb.com-v1-elasticsearches-pod +spec: + dashboards: + - title: KubeDB / Elasticsearch / Pod + vars: + - name: namespace + value: '{{ .metadata.namespace }}' + - name: app + value: '{{ .metadata.name }}' + - name: pod + type: Target + value: '{{ .metadata.name }}' + provider: Grafana + resource: + group: "" diff --git a/hub/resourcedashboards/kubedb.com/v1/pod/mariadbs.yaml b/hub/resourcedashboards/kubedb.com/v1/pod/mariadbs.yaml new file mode 100644 index 000000000..184bd7efc --- /dev/null +++ b/hub/resourcedashboards/kubedb.com/v1/pod/mariadbs.yaml @@ -0,0 +1,19 @@ +apiVersion: ui.k8s.appscode.com/v1alpha1 +kind: ResourceDashboard +metadata: + creationTimestamp: null + name: kubedb.com-v1-mariadbs-pod +spec: + dashboards: + - title: KubeDB / MariaDB / Pod + vars: + - name: namespace + value: '{{ .metadata.namespace }}' + - name: app + value: '{{ .metadata.name }}' + - name: pod + type: Target + value: '{{ .metadata.name }}' + provider: Grafana + resource: + group: "" diff --git a/hub/resourcedashboards/kubedb.com/v1/pod/mongodbs.yaml b/hub/resourcedashboards/kubedb.com/v1/pod/mongodbs.yaml new file mode 100644 index 000000000..50340eba7 --- /dev/null +++ b/hub/resourcedashboards/kubedb.com/v1/pod/mongodbs.yaml @@ -0,0 +1,19 @@ +apiVersion: ui.k8s.appscode.com/v1alpha1 +kind: ResourceDashboard +metadata: + creationTimestamp: null + name: kubedb.com-v1-mongodbs-pod +spec: + dashboards: + - title: KubeDB / MongoDB / Pod + vars: + - name: namespace + value: '{{ .metadata.namespace }}' + - name: app + value: '{{ .metadata.name }}' + - name: pod + type: Target + value: '{{ .metadata.name }}' + provider: Grafana + resource: + group: "" diff --git a/hub/resourcedashboards/kubedb.com/v1/pod/mysqls.yaml b/hub/resourcedashboards/kubedb.com/v1/pod/mysqls.yaml new file mode 100644 index 000000000..8fe7dc790 --- /dev/null +++ b/hub/resourcedashboards/kubedb.com/v1/pod/mysqls.yaml @@ -0,0 +1,19 @@ +apiVersion: ui.k8s.appscode.com/v1alpha1 +kind: ResourceDashboard +metadata: + creationTimestamp: null + name: kubedb.com-v1-mysqls-pod +spec: + dashboards: + - title: KubeDB / MySQL / Pod + vars: + - name: namespace + value: '{{ .metadata.namespace }}' + - name: app + value: '{{ .metadata.name }}' + - name: pod + type: Target + value: '{{ .metadata.name }}' + provider: Grafana + resource: + group: "" diff --git a/hub/resourcedashboards/kubedb.com/v1/pod/postgreses.yaml b/hub/resourcedashboards/kubedb.com/v1/pod/postgreses.yaml new file mode 100644 index 000000000..3e63a4409 --- /dev/null +++ b/hub/resourcedashboards/kubedb.com/v1/pod/postgreses.yaml @@ -0,0 +1,19 @@ +apiVersion: ui.k8s.appscode.com/v1alpha1 +kind: ResourceDashboard +metadata: + creationTimestamp: null + name: kubedb.com-v1-postgreses-pod +spec: + dashboards: + - title: KubeDB / Postgres / Pod + vars: + - name: namespace + value: '{{ .metadata.namespace }}' + - name: app + value: '{{ .metadata.name }}' + - name: pod + type: Target + value: '{{ .metadata.name }}' + provider: Grafana + resource: + group: "" diff --git a/hub/resourcedashboards/kubedb.com/v1/pod/proxysqls.yaml b/hub/resourcedashboards/kubedb.com/v1/pod/proxysqls.yaml new file mode 100644 index 000000000..257180ce1 --- /dev/null +++ b/hub/resourcedashboards/kubedb.com/v1/pod/proxysqls.yaml @@ -0,0 +1,19 @@ +apiVersion: ui.k8s.appscode.com/v1alpha1 +kind: ResourceDashboard +metadata: + creationTimestamp: null + name: kubedb.com-v1-proxysqls-pod +spec: + dashboards: + - title: KubeDB / ProxySQL / Pod + vars: + - name: namespace + value: '{{ .metadata.namespace }}' + - name: app + value: '{{ .metadata.name }}' + - name: pod + type: Target + value: '{{ .metadata.name }}' + provider: Grafana + resource: + group: "" diff --git a/hub/resourcedashboards/kubedb.com/v1/pod/redises.yaml b/hub/resourcedashboards/kubedb.com/v1/pod/redises.yaml new file mode 100644 index 000000000..d79768e0d --- /dev/null +++ b/hub/resourcedashboards/kubedb.com/v1/pod/redises.yaml @@ -0,0 +1,19 @@ +apiVersion: ui.k8s.appscode.com/v1alpha1 +kind: ResourceDashboard +metadata: + creationTimestamp: null + name: kubedb.com-v1-redises-pod +spec: + dashboards: + - title: KubeDB / Redis / Pod + vars: + - name: namespace + value: '{{ .metadata.namespace }}' + - name: app + value: '{{ .metadata.name }}' + - name: pod + type: Target + value: '{{ .metadata.name }}' + provider: Grafana + resource: + group: "" diff --git a/hub/resourcedashboards/kubedb.com/v1/postgreses.yaml b/hub/resourcedashboards/kubedb.com/v1/postgreses.yaml new file mode 100644 index 000000000..d3353278d --- /dev/null +++ b/hub/resourcedashboards/kubedb.com/v1/postgreses.yaml @@ -0,0 +1,37 @@ +apiVersion: ui.k8s.appscode.com/v1alpha1 +kind: ResourceDashboard +metadata: + creationTimestamp: null + labels: + k8s.io/group: kubedb.com + k8s.io/kind: Postgres + k8s.io/resource: postgreses + k8s.io/version: v1 + name: kubedb.com-v1-postgreses +spec: + dashboards: + - title: KubeDB / Postgres / Summary + vars: + - name: namespace + value: '{{ .metadata.namespace }}' + - name: app + value: '{{ .metadata.name }}' + - title: KubeDB / Postgres / Database + vars: + - name: namespace + value: '{{ .metadata.namespace }}' + - name: app + value: '{{ .metadata.name }}' + - title: KubeDB / Postgres / Pod + vars: + - name: namespace + value: '{{ .metadata.namespace }}' + - name: app + value: '{{ .metadata.name }}' + provider: Grafana + resource: + group: kubedb.com + kind: Postgres + name: postgreses + scope: Namespaced + version: v1 diff --git a/hub/resourcedashboards/kubedb.com/v1/proxysqls.yaml b/hub/resourcedashboards/kubedb.com/v1/proxysqls.yaml new file mode 100644 index 000000000..3bfef6496 --- /dev/null +++ b/hub/resourcedashboards/kubedb.com/v1/proxysqls.yaml @@ -0,0 +1,37 @@ +apiVersion: ui.k8s.appscode.com/v1alpha1 +kind: ResourceDashboard +metadata: + creationTimestamp: null + labels: + k8s.io/group: kubedb.com + k8s.io/kind: ProxySQL + k8s.io/resource: proxysqls + k8s.io/version: v1 + name: kubedb.com-v1-proxysqls +spec: + dashboards: + - title: KubeDB / ProxySQL / Summary + vars: + - name: namespace + value: '{{ .metadata.namespace }}' + - name: app + value: '{{ .metadata.name }}' + - title: KubeDB / ProxySQL / Database + vars: + - name: namespace + value: '{{ .metadata.namespace }}' + - name: app + value: '{{ .metadata.name }}' + - title: KubeDB / ProxySQL / Pod + vars: + - name: namespace + value: '{{ .metadata.namespace }}' + - name: app + value: '{{ .metadata.name }}' + provider: Grafana + resource: + group: kubedb.com + kind: ProxySQL + name: proxysqls + scope: Namespaced + version: v1 diff --git a/hub/resourcedashboards/kubedb.com/v1/redises.yaml b/hub/resourcedashboards/kubedb.com/v1/redises.yaml new file mode 100644 index 000000000..f7c9d2442 --- /dev/null +++ b/hub/resourcedashboards/kubedb.com/v1/redises.yaml @@ -0,0 +1,39 @@ +apiVersion: ui.k8s.appscode.com/v1alpha1 +kind: ResourceDashboard +metadata: + creationTimestamp: null + labels: + k8s.io/group: kubedb.com + k8s.io/kind: Redis + k8s.io/resource: redises + k8s.io/version: v1 + name: kubedb.com-v1-redises +spec: + dashboards: + - title: KubeDB / Redis / Summary + vars: + - name: namespace + value: '{{ .metadata.namespace }}' + - name: app + value: '{{ .metadata.name }}' + - if: + condition: '{{- if eq .spec.mode "Cluster" }}true{{ else }}false{{ end -}}' + title: KubeDB / Redis / Shard + vars: + - name: namespace + value: '{{ .metadata.namespace }}' + - name: app + value: '{{ .metadata.name }}' + - title: KubeDB / Redis / Pod + vars: + - name: namespace + value: '{{ .metadata.namespace }}' + - name: app + value: '{{ .metadata.name }}' + provider: Grafana + resource: + group: kubedb.com + kind: Redis + name: redises + scope: Namespaced + version: v1 diff --git a/hub/resourcedashboards/kubedb.com/v1/redissentinels.yaml b/hub/resourcedashboards/kubedb.com/v1/redissentinels.yaml new file mode 100644 index 000000000..908ec17f9 --- /dev/null +++ b/hub/resourcedashboards/kubedb.com/v1/redissentinels.yaml @@ -0,0 +1,19 @@ +apiVersion: ui.k8s.appscode.com/v1alpha1 +kind: ResourceDashboard +metadata: + creationTimestamp: null + labels: + k8s.io/group: kubedb.com + k8s.io/kind: RedisSentinel + k8s.io/resource: redissentinels + k8s.io/version: v1 + name: kubedb.com-v1-redissentinels +spec: + dashboards: null + provider: Grafana + resource: + group: kubedb.com + kind: RedisSentinel + name: redissentinels + scope: Namespaced + version: v1 diff --git a/hub/resourceeditors/kubedb.com/v1/elasticsearches.yaml b/hub/resourceeditors/kubedb.com/v1/elasticsearches.yaml index bfadced08..cbaf515fe 100644 --- a/hub/resourceeditors/kubedb.com/v1/elasticsearches.yaml +++ b/hub/resourceeditors/kubedb.com/v1/elasticsearches.yaml @@ -83,7 +83,9 @@ spec: operationId: create-opsrequest-restart name: Operations - items: - - editor: + - disabledTemplate: | + {{ not (gt .spec.replicas 1) }} + editor: name: opskubedbcom-elasticsearchopsrequest-editor sourceRef: apiGroup: source.toolkit.fluxcd.io @@ -126,6 +128,36 @@ spec: name: Expand Volume operationId: create-opsrequest-volumeexpansion name: Scaling + - items: + - editor: + name: autoscalingkubedbcom-elasticsearchautoscaler-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: true + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/compute.svg + type: image/svg+xml + name: Compute + operationId: create-opsrequest-compute + - editor: + name: autoscalingkubedbcom-elasticsearchautoscaler-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: true + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/storage.svg + type: image/svg+xml + name: Storage + operationId: create-opsrequest-storage + name: Autoscaling - items: - disabledTemplate: | {{ not (and (hasKey .spec "tls") ( hasKey .spec.tls "issuerRef"))}} diff --git a/hub/resourceeditors/kubedb.com/v1/kafkas.yaml b/hub/resourceeditors/kubedb.com/v1/kafkas.yaml index f5d785347..a7f4d4f6d 100644 --- a/hub/resourceeditors/kubedb.com/v1/kafkas.yaml +++ b/hub/resourceeditors/kubedb.com/v1/kafkas.yaml @@ -22,6 +22,126 @@ spec: version: v1 ui: actions: + - items: + - editor: + name: opskubedbcom-kafkaopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: false + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/version.svg + type: image/svg+xml + name: Update Version + operationId: create-opsrequest-upgrade + - editor: + name: opskubedbcom-kafkaopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: false + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/restart.svg + type: image/svg+xml + name: Restart + operationId: create-opsrequest-restart + - editor: + name: opskubedbcom-kafkaopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: false + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/reconfigure.svg + type: image/svg+xml + name: Reconfigure + operationId: create-opsrequest-reconfigure + name: Operations + - items: + - disabledTemplate: | + {{ not (gt .spec.replicas 1) }} + editor: + name: opskubedbcom-kafkaopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: true + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/horizontal_scale.svg + type: image/svg+xml + name: Horizontal Scale + operationId: create-opsrequest-horizontalscaling + - editor: + name: opskubedbcom-kafkaopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: true + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/vertical_scale.svg + type: image/svg+xml + name: Vertical Scale + operationId: create-opsrequest-verticalscaling + - editor: + name: opskubedbcom-kafkaopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: true + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/expand.svg + type: image/svg+xml + name: Expand Volume + operationId: create-opsrequest-volumeexpansion + name: Scaling + - items: + - editor: + name: autoscalingkubedbcom-kafkaautoscaler-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: true + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/compute.svg + type: image/svg+xml + name: Compute + operationId: create-opsrequest-compute + - editor: + name: autoscalingkubedbcom-kafkaautoscaler-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: true + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/storage.svg + type: image/svg+xml + name: Storage + operationId: create-opsrequest-storage + name: Autoscaling - items: - editor: name: kubedbcom-kafka-editor diff --git a/hub/resourceeditors/kubedb.com/v1/mariadbs.yaml b/hub/resourceeditors/kubedb.com/v1/mariadbs.yaml index 26e3d8e20..4c2e0e068 100644 --- a/hub/resourceeditors/kubedb.com/v1/mariadbs.yaml +++ b/hub/resourceeditors/kubedb.com/v1/mariadbs.yaml @@ -142,6 +142,36 @@ spec: name: Expand Volume operationId: create-opsrequest-volumeexpansion name: Scaling + - items: + - editor: + name: autoscalingkubedbcom-mariadbautoscaler-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: true + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/compute.svg + type: image/svg+xml + name: Compute + operationId: create-opsrequest-compute + - editor: + name: autoscalingkubedbcom-mariadbautoscaler-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: true + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/storage.svg + type: image/svg+xml + name: Storage + operationId: create-opsrequest-storage + name: Autoscaling - items: - editor: name: opskubedbcom-mariadbopsrequest-editor diff --git a/hub/resourceeditors/kubedb.com/v1/memcacheds.yaml b/hub/resourceeditors/kubedb.com/v1/memcacheds.yaml index ad503b1bb..8b32884a8 100644 --- a/hub/resourceeditors/kubedb.com/v1/memcacheds.yaml +++ b/hub/resourceeditors/kubedb.com/v1/memcacheds.yaml @@ -21,6 +21,69 @@ spec: scope: Namespaced version: v1 ui: + actions: + - items: + - editor: + name: opskubedbcom-memcachedopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: false + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/restart.svg + type: image/svg+xml + name: Restart + operationId: create-opsrequest-restart + - editor: + name: opskubedbcom-memcachedopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: false + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/reconfigure.svg + type: image/svg+xml + name: Reconfigure + operationId: create-opsrequest-reconfigure + name: Operations + - items: + - disabledTemplate: | + {{ not (gt .spec.replicas 1) }} + editor: + name: opskubedbcom-memcachedopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: true + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/horizontal_scale.svg + type: image/svg+xml + name: Horizontal Scale + operationId: create-opsrequest-horizontalscaling + - editor: + name: opskubedbcom-memcachedopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: true + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/vertical_scale.svg + type: image/svg+xml + name: Vertical Scale + operationId: create-opsrequest-verticalscaling + name: Scaling editor: name: kubedbcom-memcached-editor sourceRef: diff --git a/hub/resourceeditors/kubedb.com/v1/mysqls.yaml b/hub/resourceeditors/kubedb.com/v1/mysqls.yaml index 8d2cb8b28..8cbdc712d 100644 --- a/hub/resourceeditors/kubedb.com/v1/mysqls.yaml +++ b/hub/resourceeditors/kubedb.com/v1/mysqls.yaml @@ -98,7 +98,7 @@ spec: name: Operations - items: - disabledTemplate: | - {{ not (and (hasKey .spec "topology") (hasKey .spec.topology "mode")) }} + {{ not (gt .spec.replicas 1) }} editor: name: opskubedbcom-mysqlopsrequest-editor sourceRef: @@ -142,6 +142,36 @@ spec: name: Expand Volume operationId: create-opsrequest-volumeexpansion name: Scaling + - items: + - editor: + name: autoscalingkubedbcom-mysqlautoscaler-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: true + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/compute.svg + type: image/svg+xml + name: Compute + operationId: create-opsrequest-compute + - editor: + name: autoscalingkubedbcom-mysqlautoscaler-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: true + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/storage.svg + type: image/svg+xml + name: Storage + operationId: create-opsrequest-storage + name: Autoscaling - items: - editor: name: opskubedbcom-mysqlopsrequest-editor diff --git a/hub/resourceeditors/kubedb.com/v1/perconaxtradbs.yaml b/hub/resourceeditors/kubedb.com/v1/perconaxtradbs.yaml index b13b556cc..b6612e789 100644 --- a/hub/resourceeditors/kubedb.com/v1/perconaxtradbs.yaml +++ b/hub/resourceeditors/kubedb.com/v1/perconaxtradbs.yaml @@ -21,6 +21,157 @@ spec: scope: Namespaced version: v1 ui: + actions: + - items: + - editor: + name: opskubedbcom-perconaxtradbopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: false + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/version.svg + type: image/svg+xml + name: Update Version + operationId: create-opsrequest-upgrade + - editor: + name: opskubedbcom-perconaxtradbopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: false + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/restart.svg + type: image/svg+xml + name: Restart + operationId: create-opsrequest-restart + - editor: + name: opskubedbcom-perconaxtradbopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: false + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/reconfigure.svg + type: image/svg+xml + name: Reconfigure + operationId: create-opsrequest-reconfigure + name: Operations + - items: + - disabledTemplate: | + {{ not (gt .spec.replicas 1) }} + editor: + name: opskubedbcom-perconaxtradbopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: true + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/horizontal_scale.svg + type: image/svg+xml + name: Horizontal Scale + operationId: create-opsrequest-horizontalscaling + - editor: + name: opskubedbcom-perconaxtradbopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: true + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/vertical_scale.svg + type: image/svg+xml + name: Vertical Scale + operationId: create-opsrequest-verticalscaling + - editor: + name: opskubedbcom-perconaxtradbopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: true + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/expand.svg + type: image/svg+xml + name: Expand Volume + operationId: create-opsrequest-volumeexpansion + name: Scaling + - items: + - editor: + name: autoscalingkubedbcom-perconaxtradbautoscaler-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: true + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/compute.svg + type: image/svg+xml + name: Compute + operationId: create-opsrequest-compute + - editor: + name: autoscalingkubedbcom-perconaxtradbautoscaler-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: true + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/storage.svg + type: image/svg+xml + name: Storage + operationId: create-opsrequest-storage + name: Autoscaling + - items: + - editor: + name: opskubedbcom-perconaxtradbopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: false + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/configure.svg + type: image/svg+xml + name: TLS Configure + operationId: create-opsrequest-reconfiguretls + - editor: + name: kubedbcom-perconaxtradb-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: false + flow: standalone-edit + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/monitor.svg + type: image/svg+xml + name: Monitoring + operationId: edit-self-monitoring + name: Security & Monitoring editor: name: kubedbcom-perconaxtradb-editor sourceRef: diff --git a/hub/resourceeditors/kubedb.com/v1/pgbouncers.yaml b/hub/resourceeditors/kubedb.com/v1/pgbouncers.yaml index a50b9342f..f606e5113 100644 --- a/hub/resourceeditors/kubedb.com/v1/pgbouncers.yaml +++ b/hub/resourceeditors/kubedb.com/v1/pgbouncers.yaml @@ -21,6 +21,85 @@ spec: scope: Namespaced version: v1 ui: + actions: + - items: + - editor: + name: opskubedbcom-pgbounceropsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: false + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/restart.svg + type: image/svg+xml + name: Restart + operationId: create-opsrequest-restart + - editor: + name: opskubedbcom-pgbounceropsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: false + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/reconfigure.svg + type: image/svg+xml + name: Reconfigure + operationId: create-opsrequest-reconfigure + name: Operations + - items: + - disabledTemplate: | + {{ not (gt .spec.replicas 1) }} + editor: + name: opskubedbcom-pgbounceropsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: true + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/horizontal_scale.svg + type: image/svg+xml + name: Horizontal Scale + operationId: create-opsrequest-horizontalscaling + - editor: + name: opskubedbcom-pgbounceropsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: true + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/vertical_scale.svg + type: image/svg+xml + name: Vertical Scale + operationId: create-opsrequest-verticalscaling + name: Scaling + - items: + - editor: + name: autoscalingkubedbcom-pgbouncerautoscaler-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: true + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/compute.svg + type: image/svg+xml + name: Compute + operationId: create-opsrequest-compute + name: Autoscaling editor: name: kubedbcom-pgbouncer-editor sourceRef: diff --git a/hub/resourceeditors/kubedb.com/v1/postgreses.yaml b/hub/resourceeditors/kubedb.com/v1/postgreses.yaml index ebbd938e6..513eb7f7c 100644 --- a/hub/resourceeditors/kubedb.com/v1/postgreses.yaml +++ b/hub/resourceeditors/kubedb.com/v1/postgreses.yaml @@ -142,6 +142,36 @@ spec: name: Expand Volume operationId: create-opsrequest-volumeexpansion name: Scaling + - items: + - editor: + name: autoscalingkubedbcom-postgresautoscaler-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: true + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/compute.svg + type: image/svg+xml + name: Compute + operationId: create-opsrequest-compute + - editor: + name: autoscalingkubedbcom-postgresautoscaler-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: true + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/storage.svg + type: image/svg+xml + name: Storage + operationId: create-opsrequest-storage + name: Autoscaling - items: - editor: name: opskubedbcom-postgresopsrequest-editor diff --git a/hub/resourceeditors/kubedb.com/v1/proxysqls.yaml b/hub/resourceeditors/kubedb.com/v1/proxysqls.yaml index 3a7a7b9b5..93e8fe99e 100644 --- a/hub/resourceeditors/kubedb.com/v1/proxysqls.yaml +++ b/hub/resourceeditors/kubedb.com/v1/proxysqls.yaml @@ -96,6 +96,22 @@ spec: name: Vertical Scale operationId: create-opsrequest-verticalscaling name: Scaling + - items: + - editor: + name: autoscalingkubedbcom-proxysqlautoscaler-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: true + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/compute.svg + type: image/svg+xml + name: Compute + operationId: create-opsrequest-compute + name: Autoscaling - items: - editor: name: opskubedbcom-proxysqlopsrequest-editor diff --git a/hub/resourceeditors/kubedb.com/v1/redises.yaml b/hub/resourceeditors/kubedb.com/v1/redises.yaml index be7798c7e..5701a1906 100644 --- a/hub/resourceeditors/kubedb.com/v1/redises.yaml +++ b/hub/resourceeditors/kubedb.com/v1/redises.yaml @@ -98,7 +98,7 @@ spec: name: Operations - items: - disabledTemplate: | - {{ or (not (hasKey .spec "mode")) (eq .spec.mode "Standalone") }} + {{ if ne .spec.replicas 1 }} editor: name: opskubedbcom-redisopsrequest-editor sourceRef: @@ -142,6 +142,36 @@ spec: name: Expand Volume operationId: create-opsrequest-volumeexpansion name: Scaling + - items: + - editor: + name: autoscalingkubedbcom-redisautoscaler-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: true + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/compute.svg + type: image/svg+xml + name: Compute + operationId: create-opsrequest-compute + - editor: + name: autoscalingkubedbcom-redisautoscaler-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: true + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/storage.svg + type: image/svg+xml + name: Storage + operationId: create-opsrequest-storage + name: Autoscaling - items: - editor: name: opskubedbcom-redisopsrequest-editor diff --git a/hub/resourceeditors/kubedb.com/v1/redissentinels.yaml b/hub/resourceeditors/kubedb.com/v1/redissentinels.yaml index ba91a630a..866e6cd0b 100644 --- a/hub/resourceeditors/kubedb.com/v1/redissentinels.yaml +++ b/hub/resourceeditors/kubedb.com/v1/redissentinels.yaml @@ -21,6 +21,127 @@ spec: scope: Namespaced version: v1 ui: + actions: + - items: + - editor: + name: opskubedbcom-redissentinelopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: false + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/version.svg + type: image/svg+xml + name: Update Version + operationId: create-opsrequest-upgrade + - editor: + name: opskubedbcom-redissentinelopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: false + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/restart.svg + type: image/svg+xml + name: Restart + operationId: create-opsrequest-restart + - editor: + name: opskubedbcom-redissentinelopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: false + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/reconfigure.svg + type: image/svg+xml + name: Reconfigure + operationId: create-opsrequest-reconfigure + name: Operations + - items: + - editor: + name: opskubedbcom-redissentinelopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: false + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/horizontal_scale.svg + type: image/svg+xml + name: Horizontal Scale + operationId: create-opsrequest-horizontalscaling + - editor: + name: opskubedbcom-redissentinelopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: false + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/vertical_scale.svg + type: image/svg+xml + name: Vertical Scale + operationId: create-opsrequest-verticalscaling + name: Scaling + - items: + - editor: + name: autoscalingkubedbcom-redissentinelautoscaler-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: true + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/compute.svg + type: image/svg+xml + name: Compute + operationId: create-opsrequest-compute + name: Autoscaling + - items: + - editor: + name: opskubedbcom-redissentinelopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: false + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/configure.svg + type: image/svg+xml + name: TLS Configure + operationId: create-opsrequest-reconfiguretls + - editor: + name: kubedbcom-redissentinel-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: false + flow: standalone-edit + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/monitor.svg + type: image/svg+xml + name: Monitoring + operationId: edit-self-monitoring + name: Security & Monitoring editor: name: kubedbcom-redissentinel-editor sourceRef: diff --git a/hub/resourceeditors/kubedb.com/v1alpha2/clickhouses.yaml b/hub/resourceeditors/kubedb.com/v1alpha2/clickhouses.yaml index ab79987e4..7bf265c8f 100644 --- a/hub/resourceeditors/kubedb.com/v1alpha2/clickhouses.yaml +++ b/hub/resourceeditors/kubedb.com/v1alpha2/clickhouses.yaml @@ -21,6 +21,83 @@ spec: scope: Namespaced version: v1alpha2 ui: + actions: + - items: + - editor: + name: opskubedbcom-mysqlopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: false + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/restart.svg + type: image/svg+xml + name: Restart + operationId: create-opsrequest-restart + - editor: + name: opskubedbcom-mysqlopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: false + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/reconfigure.svg + type: image/svg+xml + name: Reconfigure + operationId: create-opsrequest-reconfigure + name: Operations + - items: + - disabledTemplate: | + {{ not (gt .spec.replicas 1) }} + editor: + name: opskubedbcom-mysqlopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: true + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/horizontal_scale.svg + type: image/svg+xml + name: Horizontal Scale + operationId: create-opsrequest-horizontalscaling + - editor: + name: opskubedbcom-mysqlopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: true + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/vertical_scale.svg + type: image/svg+xml + name: Vertical Scale + operationId: create-opsrequest-verticalscaling + - editor: + name: opskubedbcom-mysqlopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: true + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/expand.svg + type: image/svg+xml + name: Expand Volume + operationId: create-opsrequest-volumeexpansion + name: Scaling editor: name: kubedbcom-clickhouse-editor sourceRef: diff --git a/hub/resourceeditors/kubedb.com/v1alpha2/druids.yaml b/hub/resourceeditors/kubedb.com/v1alpha2/druids.yaml index 18e8b0722..158421355 100644 --- a/hub/resourceeditors/kubedb.com/v1alpha2/druids.yaml +++ b/hub/resourceeditors/kubedb.com/v1alpha2/druids.yaml @@ -21,6 +21,115 @@ spec: scope: Namespaced version: v1alpha2 ui: + actions: + - items: + - editor: + name: opskubedbcom-mysqlopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: false + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/restart.svg + type: image/svg+xml + name: Restart + operationId: create-opsrequest-restart + - editor: + name: opskubedbcom-mysqlopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: false + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/reconfigure.svg + type: image/svg+xml + name: Reconfigure + operationId: create-opsrequest-reconfigure + name: Operations + - items: + - disabledTemplate: | + {{ not (gt .spec.replicas 1) }} + editor: + name: opskubedbcom-mysqlopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: true + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/horizontal_scale.svg + type: image/svg+xml + name: Horizontal Scale + operationId: create-opsrequest-horizontalscaling + - editor: + name: opskubedbcom-mysqlopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: true + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/vertical_scale.svg + type: image/svg+xml + name: Vertical Scale + operationId: create-opsrequest-verticalscaling + name: Scaling + - items: + - editor: + name: autoscalingkubedbcom-mysqlautoscaler-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: true + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/compute.svg + type: image/svg+xml + name: Compute + operationId: create-opsrequest-compute + - editor: + name: autoscalingkubedbcom-mysqlautoscaler-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: true + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/storage.svg + type: image/svg+xml + name: Storage + operationId: create-opsrequest-storage + name: Autoscaling + - items: + - editor: + name: kubedbcom-mysql-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: false + flow: standalone-edit + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/monitor.svg + type: image/svg+xml + name: Monitoring + operationId: edit-self-monitoring + name: Security & Monitoring editor: name: kubedbcom-druid-editor sourceRef: diff --git a/hub/resourceeditors/kubedb.com/v1alpha2/ferretdbs.yaml b/hub/resourceeditors/kubedb.com/v1alpha2/ferretdbs.yaml index 2db6f1247..e141884ea 100644 --- a/hub/resourceeditors/kubedb.com/v1alpha2/ferretdbs.yaml +++ b/hub/resourceeditors/kubedb.com/v1alpha2/ferretdbs.yaml @@ -21,6 +21,113 @@ spec: scope: Namespaced version: v1alpha2 ui: + actions: + - items: + - editor: + name: opskubedbcom-mysqlopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: false + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/restart.svg + type: image/svg+xml + name: Restart + operationId: create-opsrequest-restart + - editor: + name: opskubedbcom-mysqlopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: false + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/reconfigure.svg + type: image/svg+xml + name: Reconfigure + operationId: create-opsrequest-reconfigure + name: Operations + - items: + - disabledTemplate: | + {{ not (gt .spec.replicas 1) }} + editor: + name: opskubedbcom-mysqlopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: true + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/horizontal_scale.svg + type: image/svg+xml + name: Horizontal Scale + operationId: create-opsrequest-horizontalscaling + - editor: + name: opskubedbcom-mysqlopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: true + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/vertical_scale.svg + type: image/svg+xml + name: Vertical Scale + operationId: create-opsrequest-verticalscaling + - editor: + name: opskubedbcom-mysqlopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: true + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/expand.svg + type: image/svg+xml + name: Expand Volume + operationId: create-opsrequest-volumeexpansion + name: Scaling + - items: + - editor: + name: opskubedbcom-mysqlopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: false + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/configure.svg + type: image/svg+xml + name: TLS Configure + operationId: create-opsrequest-reconfiguretls + - editor: + name: kubedbcom-mysql-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: false + flow: standalone-edit + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/monitor.svg + type: image/svg+xml + name: Monitoring + operationId: edit-self-monitoring + name: Security & Monitoring editor: name: kubedbcom-ferretdb-editor sourceRef: diff --git a/hub/resourceeditors/kubedb.com/v1alpha2/mssqlservers.yaml b/hub/resourceeditors/kubedb.com/v1alpha2/mssqlservers.yaml index 41d37a4cf..a1d462eb9 100644 --- a/hub/resourceeditors/kubedb.com/v1alpha2/mssqlservers.yaml +++ b/hub/resourceeditors/kubedb.com/v1alpha2/mssqlservers.yaml @@ -21,6 +21,143 @@ spec: scope: Namespaced version: v1alpha2 ui: + actions: + - items: + - editor: + name: kubedbcom-mysql-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: false + flow: standalone-edit + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/backup.svg + type: image/svg+xml + name: Backup + operationId: edit-self-backupconfiguration + - editor: + name: stashappscodecom-restoresession-editor-options + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: false + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/restore.svg + type: image/svg+xml + name: Restore + operationId: create-restoresession + name: Backups + - items: + - editor: + name: opskubedbcom-mysqlopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: false + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/restart.svg + type: image/svg+xml + name: Restart + operationId: create-opsrequest-restart + - editor: + name: opskubedbcom-mysqlopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: false + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/reconfigure.svg + type: image/svg+xml + name: Reconfigure + operationId: create-opsrequest-reconfigure + name: Operations + - items: + - disabledTemplate: | + {{ not (gt .spec.replicas 1) }} + editor: + name: opskubedbcom-mysqlopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: true + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/horizontal_scale.svg + type: image/svg+xml + name: Horizontal Scale + operationId: create-opsrequest-horizontalscaling + - editor: + name: opskubedbcom-mysqlopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: true + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/vertical_scale.svg + type: image/svg+xml + name: Vertical Scale + operationId: create-opsrequest-verticalscaling + - editor: + name: opskubedbcom-mysqlopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: true + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/expand.svg + type: image/svg+xml + name: Expand Volume + operationId: create-opsrequest-volumeexpansion + name: Scaling + - items: + - editor: + name: opskubedbcom-mysqlopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: false + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/configure.svg + type: image/svg+xml + name: TLS Configure + operationId: create-opsrequest-reconfiguretls + - editor: + name: kubedbcom-mysql-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: false + flow: standalone-edit + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/monitor.svg + type: image/svg+xml + name: Monitoring + operationId: edit-self-monitoring + name: Security & Monitoring editor: name: kubedbcom-mssqlserver-editor sourceRef: diff --git a/hub/resourceeditors/kubedb.com/v1alpha2/pgpools.yaml b/hub/resourceeditors/kubedb.com/v1alpha2/pgpools.yaml index 4f1fab6dd..c386375b8 100644 --- a/hub/resourceeditors/kubedb.com/v1alpha2/pgpools.yaml +++ b/hub/resourceeditors/kubedb.com/v1alpha2/pgpools.yaml @@ -21,6 +21,143 @@ spec: scope: Namespaced version: v1alpha2 ui: + actions: + - items: + - editor: + name: opskubedbcom-pgpoolopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: false + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/restart.svg + type: image/svg+xml + name: Restart + operationId: create-opsrequest-restart + - editor: + name: opskubedbcom-pgpoolopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: false + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/reconfigure.svg + type: image/svg+xml + name: Reconfigure + operationId: create-opsrequest-reconfigure + name: Operations + - items: + - disabledTemplate: | + {{ not (gt .spec.replicas 1) }} + editor: + name: opskubedbcom-pgpoolopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: true + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/horizontal_scale.svg + type: image/svg+xml + name: Horizontal Scale + operationId: create-opsrequest-horizontalscaling + - editor: + name: opskubedbcom-pgpoolopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: true + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/vertical_scale.svg + type: image/svg+xml + name: Vertical Scale + operationId: create-opsrequest-verticalscaling + - editor: + name: opskubedbcom-pgpoolopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: true + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/expand.svg + type: image/svg+xml + name: Expand Volume + operationId: create-opsrequest-volumeexpansion + name: Scaling + - items: + - editor: + name: autoscalingkubedbcom-pgpoolautoscaler-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: true + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/compute.svg + type: image/svg+xml + name: Compute + operationId: create-opsrequest-compute + - editor: + name: autoscalingkubedbcom-pgpoolautoscaler-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: true + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/storage.svg + type: image/svg+xml + name: Storage + operationId: create-opsrequest-storage + name: Autoscaling + - items: + - editor: + name: opskubedbcom-pgpoolopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: false + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/configure.svg + type: image/svg+xml + name: TLS Configure + operationId: create-opsrequest-reconfiguretls + - editor: + name: kubedbcom-pgpool-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: false + flow: standalone-edit + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/monitor.svg + type: image/svg+xml + name: Monitoring + operationId: edit-self-monitoring + name: Security & Monitoring editor: name: kubedbcom-pgpool-editor sourceRef: diff --git a/hub/resourceeditors/kubedb.com/v1alpha2/rabbitmqs.yaml b/hub/resourceeditors/kubedb.com/v1alpha2/rabbitmqs.yaml index b15ed9e59..8b912daa2 100644 --- a/hub/resourceeditors/kubedb.com/v1alpha2/rabbitmqs.yaml +++ b/hub/resourceeditors/kubedb.com/v1alpha2/rabbitmqs.yaml @@ -21,6 +21,143 @@ spec: scope: Namespaced version: v1alpha2 ui: + actions: + - items: + - editor: + name: opskubedbcom-mysqlopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: false + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/restart.svg + type: image/svg+xml + name: Restart + operationId: create-opsrequest-restart + - editor: + name: opskubedbcom-mysqlopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: false + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/reconfigure.svg + type: image/svg+xml + name: Reconfigure + operationId: create-opsrequest-reconfigure + name: Operations + - items: + - disabledTemplate: | + {{ not (gt .spec.replicas 1) }} + editor: + name: opskubedbcom-mysqlopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: true + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/horizontal_scale.svg + type: image/svg+xml + name: Horizontal Scale + operationId: create-opsrequest-horizontalscaling + - editor: + name: opskubedbcom-mysqlopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: true + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/vertical_scale.svg + type: image/svg+xml + name: Vertical Scale + operationId: create-opsrequest-verticalscaling + - editor: + name: opskubedbcom-mysqlopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: true + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/expand.svg + type: image/svg+xml + name: Expand Volume + operationId: create-opsrequest-volumeexpansion + name: Scaling + - items: + - editor: + name: autoscalingkubedbcom-mysqlautoscaler-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: true + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/compute.svg + type: image/svg+xml + name: Compute + operationId: create-opsrequest-compute + - editor: + name: autoscalingkubedbcom-mysqlautoscaler-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: true + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/storage.svg + type: image/svg+xml + name: Storage + operationId: create-opsrequest-storage + name: Autoscaling + - items: + - editor: + name: opskubedbcom-mysqlopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: false + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/configure.svg + type: image/svg+xml + name: TLS Configure + operationId: create-opsrequest-reconfiguretls + - editor: + name: kubedbcom-mysql-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: false + flow: standalone-edit + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/monitor.svg + type: image/svg+xml + name: Monitoring + operationId: edit-self-monitoring + name: Security & Monitoring editor: name: kubedbcom-rabbitmq-editor sourceRef: diff --git a/hub/resourceeditors/kubedb.com/v1alpha2/singlestores.yaml b/hub/resourceeditors/kubedb.com/v1alpha2/singlestores.yaml index 9733f9642..9f7920ed6 100644 --- a/hub/resourceeditors/kubedb.com/v1alpha2/singlestores.yaml +++ b/hub/resourceeditors/kubedb.com/v1alpha2/singlestores.yaml @@ -21,6 +21,187 @@ spec: scope: Namespaced version: v1alpha2 ui: + actions: + - items: + - editor: + name: kubedbcom-singlestore-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: false + flow: standalone-edit + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/backup.svg + type: image/svg+xml + name: Backup + operationId: edit-self-backupconfiguration + - editor: + name: stashappscodecom-restoresession-editor-options + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: false + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/restore.svg + type: image/svg+xml + name: Restore + operationId: create-restoresession + name: Backups + - items: + - editor: + name: opskubedbcom-singlestoreopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: false + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/version.svg + type: image/svg+xml + name: Update Version + operationId: create-opsrequest-upgrade + - editor: + name: opskubedbcom-singlestoreopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: false + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/restart.svg + type: image/svg+xml + name: Restart + operationId: create-opsrequest-restart + - editor: + name: opskubedbcom-singlestoreopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: false + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/reconfigure.svg + type: image/svg+xml + name: Reconfigure + operationId: create-opsrequest-reconfigure + name: Operations + - items: + - disabledTemplate: | + {{ not (gt .spec.replicas 1) }} + editor: + name: opskubedbcom-singlestoreopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: true + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/horizontal_scale.svg + type: image/svg+xml + name: Horizontal Scale + operationId: create-opsrequest-horizontalscaling + - editor: + name: opskubedbcom-singlestoreopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: true + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/vertical_scale.svg + type: image/svg+xml + name: Vertical Scale + operationId: create-opsrequest-verticalscaling + - editor: + name: opskubedbcom-singlestoreopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: true + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/expand.svg + type: image/svg+xml + name: Expand Volume + operationId: create-opsrequest-volumeexpansion + name: Scaling + - items: + - editor: + name: autoscalingkubedbcom-singlestoreautoscaler-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: true + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/compute.svg + type: image/svg+xml + name: Compute + operationId: create-opsrequest-compute + - editor: + name: autoscalingkubedbcom-singlestoreautoscaler-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: true + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/storage.svg + type: image/svg+xml + name: Storage + operationId: create-opsrequest-storage + name: Autoscaling + - items: + - editor: + name: opskubedbcom-singlestoreopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: false + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/configure.svg + type: image/svg+xml + name: TLS Configure + operationId: create-opsrequest-reconfiguretls + - editor: + name: kubedbcom-singlestore-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: false + flow: standalone-edit + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/monitor.svg + type: image/svg+xml + name: Monitoring + operationId: edit-self-monitoring + name: Security & Monitoring editor: name: kubedbcom-singlestore-editor sourceRef: diff --git a/hub/resourceeditors/kubedb.com/v1alpha2/solrs.yaml b/hub/resourceeditors/kubedb.com/v1alpha2/solrs.yaml index a5a2d12c8..d745ef336 100644 --- a/hub/resourceeditors/kubedb.com/v1alpha2/solrs.yaml +++ b/hub/resourceeditors/kubedb.com/v1alpha2/solrs.yaml @@ -21,6 +21,129 @@ spec: scope: Namespaced version: v1alpha2 ui: + actions: + - items: + - editor: + name: kubedbcom-solr-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: false + flow: standalone-edit + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/backup.svg + type: image/svg+xml + name: Backup + operationId: edit-self-backupconfiguration + - editor: + name: stashappscodecom-restoresession-editor-options + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: false + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/restore.svg + type: image/svg+xml + name: Restore + operationId: create-restoresession + name: Backups + - items: + - editor: + name: opskubedbcom-solropsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: false + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/restart.svg + type: image/svg+xml + name: Restart + operationId: create-opsrequest-restart + - editor: + name: opskubedbcom-solropsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: false + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/reconfigure.svg + type: image/svg+xml + name: Reconfigure + operationId: create-opsrequest-reconfigure + name: Operations + - items: + - disabledTemplate: | + {{ not (gt .spec.replicas 1) }} + editor: + name: opskubedbcom-solropsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: true + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/horizontal_scale.svg + type: image/svg+xml + name: Horizontal Scale + operationId: create-opsrequest-horizontalscaling + - editor: + name: opskubedbcom-solropsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: true + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/vertical_scale.svg + type: image/svg+xml + name: Vertical Scale + operationId: create-opsrequest-verticalscaling + - editor: + name: opskubedbcom-solropsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: true + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/expand.svg + type: image/svg+xml + name: Expand Volume + operationId: create-opsrequest-volumeexpansion + name: Scaling + - items: + - editor: + name: kubedbcom-solr-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: false + flow: standalone-edit + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/monitor.svg + type: image/svg+xml + name: Monitoring + operationId: edit-self-monitoring + name: Security & Monitoring editor: name: kubedbcom-solr-editor sourceRef: diff --git a/hub/resourceeditors/kubedb.com/v1alpha2/zookeepers.yaml b/hub/resourceeditors/kubedb.com/v1alpha2/zookeepers.yaml index 04e687fd9..33442e6bf 100644 --- a/hub/resourceeditors/kubedb.com/v1alpha2/zookeepers.yaml +++ b/hub/resourceeditors/kubedb.com/v1alpha2/zookeepers.yaml @@ -21,6 +21,67 @@ spec: scope: Namespaced version: v1alpha2 ui: + actions: + - items: + - editor: + name: opskubedbcom-zookeeperopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: false + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/restart.svg + type: image/svg+xml + name: Restart + operationId: create-opsrequest-restart + - editor: + name: opskubedbcom-zookeeperopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: false + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/reconfigure.svg + type: image/svg+xml + name: Reconfigure + operationId: create-opsrequest-reconfigure + name: Operations + - items: + - editor: + name: opskubedbcom-zookeeperopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: false + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/horizontal_scale.svg + type: image/svg+xml + name: Horizontal Scale + operationId: create-opsrequest-horizontalscaling + - editor: + name: opskubedbcom-zookeeperopsrequest-editor + sourceRef: + apiGroup: source.toolkit.fluxcd.io + kind: HelmRepository + name: appscode-charts-oci + version: v0.4.20 + enforceQuota: false + flow: standalone-create + icons: + - src: https://cdn.appscode.com/k8s/icons/action-icons/vertical_scale.svg + type: image/svg+xml + name: Vertical Scale + operationId: create-opsrequest-verticalscaling + name: Scaling editor: name: kubedbcom-zookeeper-editor sourceRef: diff --git a/hub/resourceoutlines/charts.x-helm.dev/v1alpha1/chartpresets.yaml b/hub/resourceoutlines/charts.x-helm.dev/v1alpha1/chartpresets.yaml new file mode 100644 index 000000000..3f7411042 --- /dev/null +++ b/hub/resourceoutlines/charts.x-helm.dev/v1alpha1/chartpresets.yaml @@ -0,0 +1,18 @@ +apiVersion: meta.k8s.appscode.com/v1alpha1 +kind: ResourceDescriptor +metadata: + creationTimestamp: null + labels: + k8s.io/group: charts.x-helm.dev + k8s.io/kind: ChartPreset + k8s.io/resource: chartpresets + k8s.io/version: v1alpha1 + name: charts.x-helm.dev-v1alpha1-chartpresets +spec: + defaultLayout: false + resource: + group: charts.x-helm.dev + kind: ChartPreset + name: chartpresets + scope: Namespaced + version: v1alpha1 diff --git a/hub/resourceoutlines/charts.x-helm.dev/v1alpha1/clusterchartpresets.yaml b/hub/resourceoutlines/charts.x-helm.dev/v1alpha1/clusterchartpresets.yaml new file mode 100644 index 000000000..ef11714f7 --- /dev/null +++ b/hub/resourceoutlines/charts.x-helm.dev/v1alpha1/clusterchartpresets.yaml @@ -0,0 +1,18 @@ +apiVersion: meta.k8s.appscode.com/v1alpha1 +kind: ResourceDescriptor +metadata: + creationTimestamp: null + labels: + k8s.io/group: charts.x-helm.dev + k8s.io/kind: ClusterChartPreset + k8s.io/resource: clusterchartpresets + k8s.io/version: v1alpha1 + name: charts.x-helm.dev-v1alpha1-clusterchartpresets +spec: + defaultLayout: false + resource: + group: charts.x-helm.dev + kind: ClusterChartPreset + name: clusterchartpresets + scope: Cluster + version: v1alpha1 diff --git a/vendor/kmodules.xyz/resource-metrics/kubedb.com/v1/elasticsearch.go b/vendor/kmodules.xyz/resource-metrics/kubedb.com/v1/elasticsearch.go index bdf2fc24e..14d6986b4 100644 --- a/vendor/kmodules.xyz/resource-metrics/kubedb.com/v1/elasticsearch.go +++ b/vendor/kmodules.xyz/resource-metrics/kubedb.com/v1/elasticsearch.go @@ -22,10 +22,8 @@ import ( "kmodules.xyz/resource-metrics/api" - "gomodules.xyz/pointer" core "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" ) @@ -114,8 +112,8 @@ func (r Elasticsearch) roleResourceFn(fn func(rr core.ResourceRequirements) core var replicas int64 = 0 result := map[api.PodRole]api.PodInfo{} - for role, roleSpec := range topology { - rolePerReplicaResources, roleReplicas, err := ElasticsearchNodeResources(roleSpec.(map[string]interface{}), fn) + for role := range topology { + rolePerReplicaResources, roleReplicas, err := api.AppNodeResourcesV2(topology, fn, ElasticsearchContainerName, role) if err != nil { return nil, err } @@ -145,29 +143,3 @@ type ElasticsearchNode struct { Resources core.ResourceRequirements `json:"resources,omitempty"` Storage core.PersistentVolumeClaimSpec `json:"storage,omitempty"` } - -func ElasticsearchNodeResources( - obj map[string]interface{}, - fn func(rr core.ResourceRequirements) core.ResourceList, - fields ...string, -) (core.ResourceList, int64, error) { - val, found, err := unstructured.NestedFieldNoCopy(obj, fields...) - if !found || err != nil { - return nil, 0, err - } - - var node ElasticsearchNode - err = runtime.DefaultUnstructuredConverter.FromUnstructured(val.(map[string]interface{}), &node) - if err != nil { - return nil, 0, fmt.Errorf("failed to parse node %#v: %w", node, err) - } - - if node.Replicas == nil { - node.Replicas = pointer.Int64P(1) - } - rr := fn(node.Resources) - sr := fn(api.ToResourceRequirements(node.Storage.Resources)) - rr[core.ResourceStorage] = *sr.Storage() - - return rr, *node.Replicas, nil -} diff --git a/vendor/kmodules.xyz/resource-metrics/kubedb.com/v1/redis.go b/vendor/kmodules.xyz/resource-metrics/kubedb.com/v1/redis.go index 807830faa..047c3d091 100644 --- a/vendor/kmodules.xyz/resource-metrics/kubedb.com/v1/redis.go +++ b/vendor/kmodules.xyz/resource-metrics/kubedb.com/v1/redis.go @@ -54,7 +54,7 @@ func (r Redis) roleReplicasFn(obj map[string]interface{}) (api.ReplicaList, erro return nil, err } if found && mode == DBModeCluster { - shards, _, err := unstructured.NestedInt64(obj, "spec", "cluster", "master") + shards, _, err := unstructured.NestedInt64(obj, "spec", "cluster", "shards") if err != nil { return nil, err } diff --git a/vendor/kmodules.xyz/resource-metrics/kubedb.com/v1alpha2/clickhouse.go b/vendor/kmodules.xyz/resource-metrics/kubedb.com/v1alpha2/clickhouse.go new file mode 100644 index 000000000..445726598 --- /dev/null +++ b/vendor/kmodules.xyz/resource-metrics/kubedb.com/v1alpha2/clickhouse.go @@ -0,0 +1,156 @@ +/* +Copyright AppsCode Inc. and Contributors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +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 v1alpha2 + +import ( + "fmt" + "reflect" + + "kmodules.xyz/resource-metrics/api" + + core "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +func init() { + api.Register(schema.GroupVersionKind{ + Group: "kubedb.com", + Version: "v1alpha2", + Kind: "ClickHouse", + }, ClickHouse{}.ResourceCalculator()) +} + +type ClickHouse struct{} + +func (r ClickHouse) ResourceCalculator() api.ResourceCalculator { + return &api.ResourceCalculatorFuncs{ + AppRoles: []api.PodRole{api.PodRoleDefault, api.PodRoleTotalShard}, + RuntimeRoles: []api.PodRole{api.PodRoleDefault, api.PodRoleTotalShard}, + RoleReplicasFn: r.roleReplicasFn, + ModeFn: r.modeFn, + RoleResourceLimitsFn: r.roleResourceFn(api.ResourceLimits), + RoleResourceRequestsFn: r.roleResourceFn(api.ResourceRequests), + } +} + +func (r ClickHouse) roleReplicasFn(obj map[string]interface{}) (api.ReplicaList, error) { + result := api.ReplicaList{} + + clusterTopology, found, err := unstructured.NestedMap(obj, "spec", "clusterTopology") + if err != nil { + return nil, err + } + if found && clusterTopology != nil { + // dedicated topology mode + var replicas int64 = 0 + + clusters, _, err := unstructured.NestedSlice(clusterTopology, "cluster") + if err != nil { + return nil, err + } + + for _, cluster := range clusters { + shardCount, _, err := unstructured.NestedInt64(cluster.(map[string]interface{}), "shards") + if err != nil { + return nil, err + } + + shardReplicas, _, err := unstructured.NestedInt64(cluster.(map[string]interface{}), "replicas") + if err != nil { + return nil, err + } + replicas += shardReplicas * shardCount + } + result[api.PodRoleTotalShard] = replicas + + } else { + // standalone + replicas, found, err := unstructured.NestedInt64(obj, "spec", "replicas") + if err != nil { + return nil, fmt.Errorf("failed to read spec.replicas %v: %w", obj, err) + } + if !found { + result[api.PodRoleDefault] = 1 + } else { + result[api.PodRoleDefault] = replicas + } + } + return result, nil +} + +func (r ClickHouse) modeFn(obj map[string]interface{}) (string, error) { + clusterTopology, found, err := unstructured.NestedFieldNoCopy(obj, "spec", "clusterTopology") + if err != nil { + return "", err + } + if found && !reflect.ValueOf(clusterTopology).IsNil() { + return DBModeCluster, nil + } + return DBModeStandalone, nil +} + +func (r ClickHouse) roleResourceFn(fn func(rr core.ResourceRequirements) core.ResourceList) func(obj map[string]interface{}) (map[api.PodRole]api.PodInfo, error) { + return func(obj map[string]interface{}) (map[api.PodRole]api.PodInfo, error) { + clusterTopology, found, err := unstructured.NestedMap(obj, "spec", "clusterTopology") + if err != nil { + return nil, err + } + if found && clusterTopology != nil { + clusters, _, err := unstructured.NestedSlice(clusterTopology, "cluster") + if err != nil { + return nil, err + } + var totalReplicas int64 = 0 + var totalRes core.ResourceList + for i, c := range clusters { + cluster := c.(map[string]interface{}) + cRes, cReplicas, err := api.AppNodeResourcesV2(cluster, fn, ClickHouseContainerName) + if err != nil { + return nil, err + } + shards, _, err := unstructured.NestedInt64(cluster, "shards") + if err != nil { + return nil, err + } + + totalReplicas += cReplicas * shards + /* + TODO: Need to change. As this style will not work if different cluster have different resources. Possible Algorithm => + For each shards : + summedUpRes = api.AddResourceList(summedUpRes, api.MulResourceList(cRes, cReplicas*shards)) + totalRes = summedUpRes / totalReplicas + */ + if i == 0 { + totalRes = cRes + } + } + return map[api.PodRole]api.PodInfo{ + api.PodRoleTotalShard: {Resource: totalRes, Replicas: totalReplicas}, + }, nil + } else { + container, replicas, err := api.AppNodeResourcesV2(obj, fn, ClickHouseContainerName, "spec") + if err != nil { + return nil, err + } + + return map[api.PodRole]api.PodInfo{ + api.PodRoleDefault: {Resource: container, Replicas: replicas}, + }, nil + } + } +} diff --git a/vendor/kmodules.xyz/resource-metrics/kubedb.com/v1alpha2/constants.go b/vendor/kmodules.xyz/resource-metrics/kubedb.com/v1alpha2/constants.go index ebdd69c12..77af77897 100644 --- a/vendor/kmodules.xyz/resource-metrics/kubedb.com/v1alpha2/constants.go +++ b/vendor/kmodules.xyz/resource-metrics/kubedb.com/v1alpha2/constants.go @@ -27,8 +27,10 @@ const ( ) const ( + ClickHouseContainerName = "clickhouse" DruidContainerName = "druid" FerretDBContainerName = "ferretdb" + MSSQLServerContainerName = "mssql" PgpoolContainerName = "pgpool" RabbitMQContainerName = "rabbitmq" SinglestoreContainerName = "singlestore" diff --git a/vendor/kmodules.xyz/resource-metrics/kubedb.com/v1alpha2/mssqlserver.go b/vendor/kmodules.xyz/resource-metrics/kubedb.com/v1alpha2/mssqlserver.go new file mode 100644 index 000000000..6dd2b24e3 --- /dev/null +++ b/vendor/kmodules.xyz/resource-metrics/kubedb.com/v1alpha2/mssqlserver.go @@ -0,0 +1,89 @@ +/* +Copyright AppsCode Inc. and Contributors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +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 v1alpha2 + +import ( + "fmt" + + "kmodules.xyz/resource-metrics/api" + + core "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +func init() { + api.Register(schema.GroupVersionKind{ + Group: "kubedb.com", + Version: "v1alpha2", + Kind: "MSSQLServer", + }, MSSQLServer{}.ResourceCalculator()) +} + +type MSSQLServer struct{} + +func (r MSSQLServer) ResourceCalculator() api.ResourceCalculator { + return &api.ResourceCalculatorFuncs{ + AppRoles: []api.PodRole{api.PodRoleDefault}, + RuntimeRoles: []api.PodRole{api.PodRoleDefault, api.PodRoleExporter}, + RoleReplicasFn: r.roleReplicasFn, + UsesTLSFn: r.usesTLSFn, + RoleResourceLimitsFn: r.roleResourceFn(api.ResourceLimits), + RoleResourceRequestsFn: r.roleResourceFn(api.ResourceRequests), + } +} + +func (r MSSQLServer) roleReplicasFn(obj map[string]interface{}) (api.ReplicaList, error) { + replicas, found, err := unstructured.NestedInt64(obj, "spec", "replicas") + if err != nil { + return nil, fmt.Errorf("failed to read spec.replicas %v: %w", obj, err) + } + if !found { + return api.ReplicaList{api.PodRoleDefault: 1}, nil + } + return api.ReplicaList{api.PodRoleDefault: replicas}, nil +} + +func (r MSSQLServer) usesTLSFn(obj map[string]interface{}) (bool, error) { + enabled, found, err := unstructured.NestedBool(obj, "spec", "tls", "clientTLS") + if err != nil { + return false, err + } + + if found && enabled { + return true, nil + } + return false, nil +} + +func (r MSSQLServer) roleResourceFn(fn func(rr core.ResourceRequirements) core.ResourceList) func(obj map[string]interface{}) (map[api.PodRole]api.PodInfo, error) { + return func(obj map[string]interface{}) (map[api.PodRole]api.PodInfo, error) { + container, replicas, err := api.AppNodeResourcesV2(obj, fn, MSSQLServerContainerName, "spec") + if err != nil { + return nil, err + } + + exporter, err := api.ContainerResources(obj, fn, "spec", "monitor", "prometheus", "exporter") + if err != nil { + return nil, err + } + return map[api.PodRole]api.PodInfo{ + api.PodRoleDefault: {Resource: container, Replicas: replicas}, + api.PodRoleExporter: {Resource: exporter, Replicas: replicas}, + }, nil + } +} diff --git a/vendor/modules.txt b/vendor/modules.txt index b1ae63057..450fd285d 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -740,7 +740,7 @@ kmodules.xyz/go-containerregistry/name ## explicit; go 1.22.0 kmodules.xyz/offshoot-api/api/v1 kmodules.xyz/offshoot-api/api/v2 -# kmodules.xyz/resource-metrics v0.30.2-0.20240711131537-5e9d22977a2c +# kmodules.xyz/resource-metrics v0.30.2-0.20240809125122-4c04e13dfc80 ## explicit; go 1.22.1 kmodules.xyz/resource-metrics kmodules.xyz/resource-metrics/api