diff --git a/go.mod b/go.mod index 2d6184087..daef6662e 100644 --- a/go.mod +++ b/go.mod @@ -50,8 +50,8 @@ require ( kmodules.xyz/go-containerregistry v0.0.12 kmodules.xyz/monitoring-agent-api v0.30.2 kmodules.xyz/offshoot-api v0.30.1 - kmodules.xyz/resource-metadata v0.21.1-0.20241101060818-82302d83f0de - kmodules.xyz/resource-metrics v0.30.4 + kmodules.xyz/resource-metadata v0.21.1-0.20241107112216-37fff326ac28 + kmodules.xyz/resource-metrics v0.30.5 kmodules.xyz/resource-metrics/utils v0.30.4 kmodules.xyz/sets v0.29.0 kubeops.dev/falco-ui-server v0.0.4 diff --git a/go.sum b/go.sum index 07da1455a..c8a427dca 100644 --- a/go.sum +++ b/go.sum @@ -934,10 +934,10 @@ kmodules.xyz/monitoring-agent-api v0.30.2 h1:sAgz5P5EXZqhlj1NzJ+QltAgeIx5bGSMj+a kmodules.xyz/monitoring-agent-api v0.30.2/go.mod h1:BoZFPDDRB7J39CcUsSDlzgW8PQCwik4ILPleyUob+Mg= kmodules.xyz/offshoot-api v0.30.1 h1:TrulAYO+oBsXe9sZZGTmNWIuI8qD2izMpgcTSPvgAmI= kmodules.xyz/offshoot-api v0.30.1/go.mod h1:T3mpjR6fui0QzOcmQvIuANytW48fe9ytmy/1cgx6D4g= -kmodules.xyz/resource-metadata v0.21.1-0.20241101060818-82302d83f0de h1:VnyZFHRT4Rhb3HVFN5UrYxtFGUm2EA5pCnJkfWV8W2A= -kmodules.xyz/resource-metadata v0.21.1-0.20241101060818-82302d83f0de/go.mod h1:pdge27Crf30IeiBGhy1QIveRiUtJ/QnSSOaO2VxHAmI= -kmodules.xyz/resource-metrics v0.30.4 h1:8HBPtYmo9ETY91gsc55JE8Z986+3ZuRq57M0wZ9npqI= -kmodules.xyz/resource-metrics v0.30.4/go.mod h1:w9+rz7/s/kGP1GWzYSuRdCn+l7EwpesmESSEHkLBnIQ= +kmodules.xyz/resource-metadata v0.21.1-0.20241107112216-37fff326ac28 h1:EwAFAlB25Q8BgMU6Es7/pknJ5UHrdx3Le2p19u1f+sg= +kmodules.xyz/resource-metadata v0.21.1-0.20241107112216-37fff326ac28/go.mod h1:KNp1ScLwOt3D5G/cG0lypXmNjVKxyArlMem/abqenPs= +kmodules.xyz/resource-metrics v0.30.5 h1:ZhpGeR9DCz1HTrKUg/mWhr95wlFzCPRdgVAqwaggy1o= +kmodules.xyz/resource-metrics v0.30.5/go.mod h1:w9+rz7/s/kGP1GWzYSuRdCn+l7EwpesmESSEHkLBnIQ= kmodules.xyz/resource-metrics/utils v0.30.4 h1:bJS/x0Qr7N1FFdxugFbzZ/Es6HVs4ptsFlhkmgj3jac= kmodules.xyz/resource-metrics/utils v0.30.4/go.mod h1:EedHEDZu1iVfkpKsTsSTfHkG5MUf77TdjDmCYRY4UR0= kmodules.xyz/sets v0.29.0 h1:ZX/qOECzUob95JhhRtngJElHSlJ1UNNdwK4hTEy+nl0= diff --git a/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/feature_types.go b/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/feature_types.go index 73d38e682..bd8624495 100644 --- a/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/feature_types.go +++ b/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/feature_types.go @@ -63,6 +63,10 @@ type FeatureSpec struct { // FeatureBlock specifies the ui block name of this feature. // +optional FeatureBlock string `json:"featureBlock,omitempty"` + // FeatureExclusionGroup specifies the name of the exclusion group for features + // Only one feature in a feature exclusion group can be installed + // +optional + FeatureExclusionGroup string `json:"featureExclusionGroup,omitempty"` // Required specifies whether this feature is mandatory or not for enabling the respecting FeatureSet. // +optional Recommended bool `json:"recommended,omitempty"` diff --git a/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/openapi_generated.go b/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/openapi_generated.go index 4a88579a7..985695192 100644 --- a/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/openapi_generated.go +++ b/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/openapi_generated.go @@ -20522,6 +20522,13 @@ func schema_resource_metadata_apis_ui_v1alpha1_FeatureSpec(ref common.ReferenceC Format: "", }, }, + "featureExclusionGroup": { + SchemaProps: spec.SchemaProps{ + Description: "FeatureExclusionGroup specifies the name of the exclusion group for features Only one feature in a feature exclusion group can be installed", + Type: []string{"string"}, + Format: "", + }, + }, "recommended": { SchemaProps: spec.SchemaProps{ Description: "Required specifies whether this feature is mandatory or not for enabling the respecting FeatureSet.", diff --git a/vendor/kmodules.xyz/resource-metadata/crds/ui.k8s.appscode.com_features.yaml b/vendor/kmodules.xyz/resource-metadata/crds/ui.k8s.appscode.com_features.yaml index 6476d1ff6..c32bef86c 100644 --- a/vendor/kmodules.xyz/resource-metadata/crds/ui.k8s.appscode.com_features.yaml +++ b/vendor/kmodules.xyz/resource-metadata/crds/ui.k8s.appscode.com_features.yaml @@ -100,6 +100,11 @@ spec: featureBlock: description: FeatureBlock specifies the ui block name of this feature. type: string + featureExclusionGroup: + description: FeatureExclusionGroup specifies the name of the exclusion + group for features Only one feature in a feature exclusion group + can be installed + type: string featureSet: description: FeatureSet specifies the name of the FeatureSet where this feature belong to. diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kubedb.com/v1/mongodbs.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kubedb.com/v1/mongodbs.yaml index b2dc4d2f4..81560c193 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kubedb.com/v1/mongodbs.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/kubedb.com/v1/mongodbs.yaml @@ -150,7 +150,7 @@ spec: kind: HelmRepository name: appscode-charts-oci version: v0.9.0 - enforceQuota: true + enforceQuota: false flow: standalone-create icons: - src: https://cdn.appscode.com/k8s/icons/action-icons/compute.svg @@ -164,7 +164,7 @@ spec: kind: HelmRepository name: appscode-charts-oci version: v0.9.0 - enforceQuota: true + enforceQuota: false flow: standalone-create icons: - src: https://cdn.appscode.com/k8s/icons/action-icons/storage.svg diff --git a/vendor/kmodules.xyz/resource-metrics/kubedb.com/v1alpha2/mssqlserver.go b/vendor/kmodules.xyz/resource-metrics/kubedb.com/v1alpha2/mssqlserver.go index 6dd2b24e3..9f6bf271f 100644 --- a/vendor/kmodules.xyz/resource-metrics/kubedb.com/v1alpha2/mssqlserver.go +++ b/vendor/kmodules.xyz/resource-metrics/kubedb.com/v1alpha2/mssqlserver.go @@ -41,6 +41,7 @@ func (r MSSQLServer) ResourceCalculator() api.ResourceCalculator { AppRoles: []api.PodRole{api.PodRoleDefault}, RuntimeRoles: []api.PodRole{api.PodRoleDefault, api.PodRoleExporter}, RoleReplicasFn: r.roleReplicasFn, + ModeFn: r.modeFn, UsesTLSFn: r.usesTLSFn, RoleResourceLimitsFn: r.roleResourceFn(api.ResourceLimits), RoleResourceRequestsFn: r.roleResourceFn(api.ResourceRequests), @@ -58,6 +59,17 @@ func (r MSSQLServer) roleReplicasFn(obj map[string]interface{}) (api.ReplicaList return api.ReplicaList{api.PodRoleDefault: replicas}, nil } +func (r MSSQLServer) modeFn(obj map[string]interface{}) (string, error) { + mode, found, err := unstructured.NestedString(obj, "spec", "topology", "mode") + if err != nil { + return "", err + } + if found { + return mode, nil + } + return DBModeStandalone, nil +} + func (r MSSQLServer) usesTLSFn(obj map[string]interface{}) (bool, error) { enabled, found, err := unstructured.NestedBool(obj, "spec", "tls", "clientTLS") if err != nil { diff --git a/vendor/kmodules.xyz/resource-metrics/ops.kubedb.com/v1alpha1/druid_mapping.go b/vendor/kmodules.xyz/resource-metrics/ops.kubedb.com/v1alpha1/druid_mapping.go new file mode 100644 index 000000000..6f108ec78 --- /dev/null +++ b/vendor/kmodules.xyz/resource-metrics/ops.kubedb.com/v1alpha1/druid_mapping.go @@ -0,0 +1,68 @@ +/* +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 v1alpha1 + +import "k8s.io/apimachinery/pkg/runtime/schema" + +func init() { + RegisterOpsPathMapperToPlugins(&DruidOpsRequest{}) +} + +type DruidOpsRequest struct{} + +var _ OpsPathMapper = (*DruidOpsRequest)(nil) + +func (m *DruidOpsRequest) HorizontalPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{ + "spec.horizontalScaling.topology.coordinators": "spec.topology.coordinators.replicas", + "spec.horizontalScaling.topology.overloads": "spec.topology.overloads.replicas", + "spec.horizontalScaling.topology.middleManagers": "spec.topology.middleManagers.replicas", + "spec.horizontalScaling.topology.historicals": "spec.topology.historicals.replicas", + "spec.horizontalScaling.topology.brokers": "spec.topology.brokers.replicas", + "spec.horizontalScaling.topology.routers": "spec.topology.routers.replicas", + } +} + +func (m *DruidOpsRequest) VerticalPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{ + "spec.verticalScaling.topology.coordinators": "spec.topology.coordinators.podTemplate.spec.resources", + "spec.verticalScaling.topology.overloads": "spec.topology.overloads.podTemplate.spec.resources", + "spec.verticalScaling.topology.middleManagers": "spec.topology.middleManagers.podTemplate.spec.resources", + "spec.verticalScaling.topology.historicals": "spec.topology.historicals.podTemplate.spec.resources", + "spec.verticalScaling.topology.brokers": "spec.topology.brokers.podTemplate.spec.resources", + "spec.verticalScaling.topology.routers": "spec.topology.routers.podTemplate.spec.resources", + } +} + +func (m *DruidOpsRequest) VolumeExpansionPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{ + "spec.volumeExpansion.topology.middleManagers": "spec.topology.middleManagers.podTemplate.spec.storage.resources.requests.storage", + "spec.volumeExpansion.topology.historicals": "spec.topology.historicals.podTemplate.spec.storage.resources.requests.storage", + } +} + +func (m *DruidOpsRequest) GetAppRefPath() []string { + return []string{"spec", "databaseRef"} +} + +func (m *DruidOpsRequest) GroupVersionKind() schema.GroupVersionKind { + return schema.GroupVersionKind{ + Group: "ops.kubedb.com", + Version: "v1alpha1", + Kind: "DruidOpsRequest", + } +} diff --git a/vendor/kmodules.xyz/resource-metrics/ops.kubedb.com/v1alpha1/ferretdb_mapping.go b/vendor/kmodules.xyz/resource-metrics/ops.kubedb.com/v1alpha1/ferretdb_mapping.go new file mode 100644 index 000000000..d32f2edf5 --- /dev/null +++ b/vendor/kmodules.xyz/resource-metrics/ops.kubedb.com/v1alpha1/ferretdb_mapping.go @@ -0,0 +1,55 @@ +/* +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 v1alpha1 + +import "k8s.io/apimachinery/pkg/runtime/schema" + +func init() { + RegisterOpsPathMapperToPlugins(&FerretDBOpsRequest{}) +} + +type FerretDBOpsRequest struct{} + +var _ OpsPathMapper = (*FerretDBOpsRequest)(nil) + +func (m *FerretDBOpsRequest) HorizontalPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{ + "spec.horizontalScaling.node": "spec.replicas", + } +} + +func (m *FerretDBOpsRequest) VerticalPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{ + "spec.verticalScaling.node": "spec.podTemplate.spec.resources", + } +} + +func (m *FerretDBOpsRequest) VolumeExpansionPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{} +} + +func (m *FerretDBOpsRequest) GetAppRefPath() []string { + return []string{"spec", "databaseRef"} +} + +func (m *FerretDBOpsRequest) GroupVersionKind() schema.GroupVersionKind { + return schema.GroupVersionKind{ + Group: "ops.kubedb.com", + Version: "v1alpha1", + Kind: "FerretDBOpsRequest", + } +} diff --git a/vendor/kmodules.xyz/resource-metrics/ops.kubedb.com/v1alpha1/mssqlserver_mapping.go b/vendor/kmodules.xyz/resource-metrics/ops.kubedb.com/v1alpha1/mssqlserver_mapping.go new file mode 100644 index 000000000..55cb0d6fc --- /dev/null +++ b/vendor/kmodules.xyz/resource-metrics/ops.kubedb.com/v1alpha1/mssqlserver_mapping.go @@ -0,0 +1,59 @@ +/* +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 v1alpha1 + +import "k8s.io/apimachinery/pkg/runtime/schema" + +func init() { + RegisterOpsPathMapperToPlugins(&MSSQLServerOpsRequest{}) +} + +type MSSQLServerOpsRequest struct{} + +var _ OpsPathMapper = (*MSSQLServerOpsRequest)(nil) + +func (m *MSSQLServerOpsRequest) HorizontalPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{ + "spec.horizontalScaling.replicas": "spec.replicas", + } +} + +func (m *MSSQLServerOpsRequest) VerticalPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{ + "spec.verticalScaling.mssqlserver": "spec.podTemplate.spec.resources", + "spec.verticalScaling.exporter": "spec.monitor.prometheus.exporter.resources", + "spec.verticalScaling.coordinator": "spec.coordinator.resources", + } +} + +func (m *MSSQLServerOpsRequest) VolumeExpansionPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{ + "spec.volumeExpansion.mssqlserver": "spec.storage.resources.requests.storage", + } +} + +func (m *MSSQLServerOpsRequest) GetAppRefPath() []string { + return []string{"spec", "databaseRef"} +} + +func (m *MSSQLServerOpsRequest) GroupVersionKind() schema.GroupVersionKind { + return schema.GroupVersionKind{ + Group: "ops.kubedb.com", + Version: "v1alpha1", + Kind: "MSSQLServerOpsRequest", + } +} diff --git a/vendor/kmodules.xyz/resource-metrics/ops.kubedb.com/v1alpha1/perconaxtradb_mapping.go b/vendor/kmodules.xyz/resource-metrics/ops.kubedb.com/v1alpha1/perconaxtradb_mapping.go new file mode 100644 index 000000000..366fc415c --- /dev/null +++ b/vendor/kmodules.xyz/resource-metrics/ops.kubedb.com/v1alpha1/perconaxtradb_mapping.go @@ -0,0 +1,59 @@ +/* +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 v1alpha1 + +import "k8s.io/apimachinery/pkg/runtime/schema" + +func init() { + RegisterOpsPathMapperToPlugins(&PerconaXtraDBOpsRequest{}) +} + +type PerconaXtraDBOpsRequest struct{} + +var _ OpsPathMapper = (*PerconaXtraDBOpsRequest)(nil) + +func (m *PerconaXtraDBOpsRequest) HorizontalPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{ + "spec.horizontalScaling.member": "spec.replicas", + } +} + +func (m *PerconaXtraDBOpsRequest) VerticalPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{ + "spec.verticalScaling.perconaxtradb": "spec.podTemplate.spec.resources", + "spec.verticalScaling.exporter": "spec.monitor.prometheus.exporter.resources", + "spec.verticalScaling.coordinator": "spec.coordinator.resources", + } +} + +func (m *PerconaXtraDBOpsRequest) VolumeExpansionPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{ + "spec.volumeExpansion.perconaxtradb": "spec.storage.resources.requests.storage", + } +} + +func (m *PerconaXtraDBOpsRequest) GetAppRefPath() []string { + return []string{"spec", "databaseRef"} +} + +func (m *PerconaXtraDBOpsRequest) GroupVersionKind() schema.GroupVersionKind { + return schema.GroupVersionKind{ + Group: "ops.kubedb.com", + Version: "v1alpha1", + Kind: "PerconaXtraDBOpsRequest", + } +} diff --git a/vendor/kmodules.xyz/resource-metrics/ops.kubedb.com/v1alpha1/pgpool_mapping.go b/vendor/kmodules.xyz/resource-metrics/ops.kubedb.com/v1alpha1/pgpool_mapping.go new file mode 100644 index 000000000..534a33bf6 --- /dev/null +++ b/vendor/kmodules.xyz/resource-metrics/ops.kubedb.com/v1alpha1/pgpool_mapping.go @@ -0,0 +1,55 @@ +/* +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 v1alpha1 + +import "k8s.io/apimachinery/pkg/runtime/schema" + +func init() { + RegisterOpsPathMapperToPlugins(&PgpoolOpsRequest{}) +} + +type PgpoolOpsRequest struct{} + +var _ OpsPathMapper = (*PgpoolOpsRequest)(nil) + +func (m *PgpoolOpsRequest) HorizontalPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{ + "spec.horizontalScaling.node": "spec.replicas", + } +} + +func (m *PgpoolOpsRequest) VerticalPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{ + "spec.verticalScaling.node": "spec.podTemplate.spec.resources", + } +} + +func (m *PgpoolOpsRequest) VolumeExpansionPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{} +} + +func (m *PgpoolOpsRequest) GetAppRefPath() []string { + return []string{"spec", "databaseRef"} +} + +func (m *PgpoolOpsRequest) GroupVersionKind() schema.GroupVersionKind { + return schema.GroupVersionKind{ + Group: "ops.kubedb.com", + Version: "v1alpha1", + Kind: "PgpoolOpsRequest", + } +} diff --git a/vendor/kmodules.xyz/resource-metrics/ops.kubedb.com/v1alpha1/rabbitmq_mapping.go b/vendor/kmodules.xyz/resource-metrics/ops.kubedb.com/v1alpha1/rabbitmq_mapping.go new file mode 100644 index 000000000..d66bb316a --- /dev/null +++ b/vendor/kmodules.xyz/resource-metrics/ops.kubedb.com/v1alpha1/rabbitmq_mapping.go @@ -0,0 +1,57 @@ +/* +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 v1alpha1 + +import "k8s.io/apimachinery/pkg/runtime/schema" + +func init() { + RegisterOpsPathMapperToPlugins(&RabbitMQOpsRequest{}) +} + +type RabbitMQOpsRequest struct{} + +var _ OpsPathMapper = (*RabbitMQOpsRequest)(nil) + +func (m *RabbitMQOpsRequest) HorizontalPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{ + "spec.horizontalScaling.node": "spec.replicas", + } +} + +func (m *RabbitMQOpsRequest) VerticalPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{ + "spec.verticalScaling.node": "spec.podTemplate.spec.resources", + } +} + +func (m *RabbitMQOpsRequest) VolumeExpansionPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{ + "spec.volumeExpansion.node": "spec.storage.resources.requests.storage", + } +} + +func (m *RabbitMQOpsRequest) GetAppRefPath() []string { + return []string{"spec", "databaseRef"} +} + +func (m *RabbitMQOpsRequest) GroupVersionKind() schema.GroupVersionKind { + return schema.GroupVersionKind{ + Group: "ops.kubedb.com", + Version: "v1alpha1", + Kind: "RabbitMQOpsRequest", + } +} diff --git a/vendor/kmodules.xyz/resource-metrics/ops.kubedb.com/v1alpha1/singlestore_mapping.go b/vendor/kmodules.xyz/resource-metrics/ops.kubedb.com/v1alpha1/singlestore_mapping.go new file mode 100644 index 000000000..b21c81aad --- /dev/null +++ b/vendor/kmodules.xyz/resource-metrics/ops.kubedb.com/v1alpha1/singlestore_mapping.go @@ -0,0 +1,63 @@ +/* +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 v1alpha1 + +import "k8s.io/apimachinery/pkg/runtime/schema" + +func init() { + RegisterOpsPathMapperToPlugins(&SinglestoreOpsRequest{}) +} + +type SinglestoreOpsRequest struct{} + +var _ OpsPathMapper = (*SinglestoreOpsRequest)(nil) + +func (m *SinglestoreOpsRequest) HorizontalPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{ + "spec.horizontalScaling.aggregator": "spec.topology.aggregator.replicas", + "spec.horizontalScaling.leaf": "spec.topology.leaf.replicas", + } +} + +func (m *SinglestoreOpsRequest) VerticalPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{ + "spec.verticalScaling.node": "spec.podTemplate.spec.resources", + "spec.verticalScaling.aggregator": "spec.topology.aggregator.podTemplate.spec.resources", + "spec.verticalScaling.leaf": "spec.topology.leaf.podTemplate.spec.resources", + "spec.verticalScaling.coordinator": "spec.coordinator.resources", + } +} + +func (m *SinglestoreOpsRequest) VolumeExpansionPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{ + "spec.volumeExpansion.node": "spec.storage.resources.requests.storage", + "spec.volumeExpansion.aggregator": "spec.topology.aggregator.storage.resources.requests.storage", + "spec.volumeExpansion.leaf": "spec.topology.leaf.storage.resources.requests.storage", + } +} + +func (m *SinglestoreOpsRequest) GetAppRefPath() []string { + return []string{"spec", "databaseRef"} +} + +func (m *SinglestoreOpsRequest) GroupVersionKind() schema.GroupVersionKind { + return schema.GroupVersionKind{ + Group: "ops.kubedb.com", + Version: "v1alpha1", + Kind: "SinglestoreOpsRequest", + } +} diff --git a/vendor/kmodules.xyz/resource-metrics/ops.kubedb.com/v1alpha1/solr_mapping.go b/vendor/kmodules.xyz/resource-metrics/ops.kubedb.com/v1alpha1/solr_mapping.go new file mode 100644 index 000000000..9ae893d16 --- /dev/null +++ b/vendor/kmodules.xyz/resource-metrics/ops.kubedb.com/v1alpha1/solr_mapping.go @@ -0,0 +1,66 @@ +/* +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 v1alpha1 + +import "k8s.io/apimachinery/pkg/runtime/schema" + +func init() { + RegisterOpsPathMapperToPlugins(&SolrOpsRequest{}) +} + +type SolrOpsRequest struct{} + +var _ OpsPathMapper = (*SolrOpsRequest)(nil) + +func (m *SolrOpsRequest) HorizontalPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{ + "spec.horizontalScaling.node": "spec.replicas", + "spec.horizontalScaling.data": "spec.topology.data.replicas", + "spec.horizontalScaling.overseer": "spec.topology.overseer.replicas", + "spec.horizontalScaling.coordinator": "spec.topology.coordinator.replicas", + } +} + +func (m *SolrOpsRequest) VerticalPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{ + "spec.verticalScaling.node": "spec.podTemplate.spec.resources", + "spec.verticalScaling.data": "spec.topology.data.podTemplate.spec.resources", + "spec.verticalScaling.overseer": "spec.topology.overseer.podTemplate.spec.resources", + "spec.verticalScaling.coordinator": "spec.topology.coordinator.podTemplate.spec.resources", + } +} + +func (m *SolrOpsRequest) VolumeExpansionPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{ + "spec.volumeExpansion.node": "spec.storage.resources.requests.storage", + "spec.volumeExpansion.data": "spec.topology.data.storage.resources.requests.storage", + "spec.volumeExpansion.overseer": "spec.topology.overseer.storage.resources.requests.storage", + "spec.volumeExpansion.coordinator": "spec.topology.coordinator.storage.resources.requests.storage", + } +} + +func (m *SolrOpsRequest) GetAppRefPath() []string { + return []string{"spec", "databaseRef"} +} + +func (m *SolrOpsRequest) GroupVersionKind() schema.GroupVersionKind { + return schema.GroupVersionKind{ + Group: "ops.kubedb.com", + Version: "v1alpha1", + Kind: "SolrOpsRequest", + } +} diff --git a/vendor/kmodules.xyz/resource-metrics/ops.kubedb.com/v1alpha1/zookeeper_mapping.go b/vendor/kmodules.xyz/resource-metrics/ops.kubedb.com/v1alpha1/zookeeper_mapping.go new file mode 100644 index 000000000..f49cb28be --- /dev/null +++ b/vendor/kmodules.xyz/resource-metrics/ops.kubedb.com/v1alpha1/zookeeper_mapping.go @@ -0,0 +1,57 @@ +/* +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 v1alpha1 + +import "k8s.io/apimachinery/pkg/runtime/schema" + +func init() { + RegisterOpsPathMapperToPlugins(&ZooKeeperOpsRequest{}) +} + +type ZooKeeperOpsRequest struct{} + +var _ OpsPathMapper = (*ZooKeeperOpsRequest)(nil) + +func (m *ZooKeeperOpsRequest) HorizontalPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{ + "spec.horizontalScaling.replicas": "spec.replicas", + } +} + +func (m *ZooKeeperOpsRequest) VerticalPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{ + "spec.verticalScaling.node": "spec.podTemplate.spec.resources", + } +} + +func (m *ZooKeeperOpsRequest) VolumeExpansionPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{ + "spec.volumeExpansion.node": "spec.storage.resources.requests.storage", + } +} + +func (m *ZooKeeperOpsRequest) GetAppRefPath() []string { + return []string{"spec", "databaseRef"} +} + +func (m *ZooKeeperOpsRequest) GroupVersionKind() schema.GroupVersionKind { + return schema.GroupVersionKind{ + Group: "ops.kubedb.com", + Version: "v1alpha1", + Kind: "ZooKeeperOpsRequest", + } +} diff --git a/vendor/modules.txt b/vendor/modules.txt index f8ccbecdf..8e085cea9 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -2041,7 +2041,7 @@ kmodules.xyz/monitoring-agent-api/client ## explicit; go 1.22.0 kmodules.xyz/offshoot-api/api/v1 kmodules.xyz/offshoot-api/api/v2 -# kmodules.xyz/resource-metadata v0.21.1-0.20241101060818-82302d83f0de +# kmodules.xyz/resource-metadata v0.21.1-0.20241107112216-37fff326ac28 ## explicit; go 1.22.1 kmodules.xyz/resource-metadata/apis/core/install kmodules.xyz/resource-metadata/apis/core/v1alpha1 @@ -2072,7 +2072,7 @@ kmodules.xyz/resource-metadata/pkg/layouts kmodules.xyz/resource-metadata/pkg/tableconvertor kmodules.xyz/resource-metadata/pkg/tableconvertor/lib kmodules.xyz/resource-metadata/pkg/tableconvertor/printers -# kmodules.xyz/resource-metrics v0.30.4 +# kmodules.xyz/resource-metrics v0.30.5 ## explicit; go 1.22.1 kmodules.xyz/resource-metrics kmodules.xyz/resource-metrics/api