diff --git a/ops.kubedb.com/v1alpha1/aerospike_mapping.go b/ops.kubedb.com/v1alpha1/aerospike_mapping.go new file mode 100644 index 0000000..7219616 --- /dev/null +++ b/ops.kubedb.com/v1alpha1/aerospike_mapping.go @@ -0,0 +1,53 @@ +/* +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(&AerospikeOpsRequest{}) +} + +type AerospikeOpsRequest struct{} + +var _ OpsPathMapper = (*AerospikeOpsRequest)(nil) + +func (m *AerospikeOpsRequest) HorizontalPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{} +} + +func (m *AerospikeOpsRequest) VerticalPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{ + "spec.verticalScaling.aerospike": "spec.podTemplate.spec.resources", + } +} + +func (m *AerospikeOpsRequest) VolumeExpansionPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{} +} + +func (m *AerospikeOpsRequest) GetAppRefPath() []string { + return []string{"spec", "databaseRef"} +} + +func (m *AerospikeOpsRequest) GroupVersionKind() schema.GroupVersionKind { + return schema.GroupVersionKind{ + Group: "ops.kubedb.com", + Version: "v1alpha1", + Kind: "AerospikeOpsRequest", + } +} diff --git a/ops.kubedb.com/v1alpha1/cassandra_mapping.go b/ops.kubedb.com/v1alpha1/cassandra_mapping.go new file mode 100644 index 0000000..d6c8ce4 --- /dev/null +++ b/ops.kubedb.com/v1alpha1/cassandra_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(&CassandraOpsRequest{}) +} + +type CassandraOpsRequest struct{} + +var _ OpsPathMapper = (*CassandraOpsRequest)(nil) + +func (m *CassandraOpsRequest) HorizontalPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{ + "spec.horizontalScaling.node": "spec.replicas", + } +} + +func (m *CassandraOpsRequest) VerticalPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{ + "spec.verticalScaling.node": "spec.podTemplate.spec.resources", + } +} + +func (m *CassandraOpsRequest) VolumeExpansionPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{ + "spec.volumeExpansion.node": "spec.storage.resources.requests.storage", + } +} + +func (m *CassandraOpsRequest) GetAppRefPath() []string { + return []string{"spec", "databaseRef"} +} + +func (m *CassandraOpsRequest) GroupVersionKind() schema.GroupVersionKind { + return schema.GroupVersionKind{ + Group: "ops.kubedb.com", + Version: "v1alpha1", + Kind: "CassandraOpsRequest", + } +} diff --git a/ops.kubedb.com/v1alpha1/clickhouse_mapping.go b/ops.kubedb.com/v1alpha1/clickhouse_mapping.go new file mode 100644 index 0000000..94d3e50 --- /dev/null +++ b/ops.kubedb.com/v1alpha1/clickhouse_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(&ClickHouseOpsRequest{}) +} + +type ClickHouseOpsRequest struct{} + +var _ OpsPathMapper = (*ClickHouseOpsRequest)(nil) + +func (m *ClickHouseOpsRequest) HorizontalPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{ + "spec.horizontalScaling.replicas": "spec.replicas", + } +} + +func (m *ClickHouseOpsRequest) VerticalPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{ + "spec.verticalScaling.node": "spec.podTemplate.spec.resources", + } +} + +func (m *ClickHouseOpsRequest) VolumeExpansionPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{ + "spec.volumeExpansion.node": "spec.storage.resources.requests.storage", + } +} + +func (m *ClickHouseOpsRequest) GetAppRefPath() []string { + return []string{"spec", "databaseRef"} +} + +func (m *ClickHouseOpsRequest) GroupVersionKind() schema.GroupVersionKind { + return schema.GroupVersionKind{ + Group: "ops.kubedb.com", + Version: "v1alpha1", + Kind: "ClickHouseOpsRequest", + } +} diff --git a/ops.kubedb.com/v1alpha1/db2_mapping.go b/ops.kubedb.com/v1alpha1/db2_mapping.go new file mode 100644 index 0000000..d203311 --- /dev/null +++ b/ops.kubedb.com/v1alpha1/db2_mapping.go @@ -0,0 +1,53 @@ +/* +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(&DB2OpsRequest{}) +} + +type DB2OpsRequest struct{} + +var _ OpsPathMapper = (*DB2OpsRequest)(nil) + +func (m *DB2OpsRequest) HorizontalPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{} +} + +func (m *DB2OpsRequest) VerticalPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{ + "spec.verticalScaling.db2": "spec.podTemplate.spec.resources", + } +} + +func (m *DB2OpsRequest) VolumeExpansionPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{} +} + +func (m *DB2OpsRequest) GetAppRefPath() []string { + return []string{"spec", "databaseRef"} +} + +func (m *DB2OpsRequest) GroupVersionKind() schema.GroupVersionKind { + return schema.GroupVersionKind{ + Group: "ops.kubedb.com", + Version: "v1alpha1", + Kind: "DB2OpsRequest", + } +} diff --git a/ops.kubedb.com/v1alpha1/documentdb_mapping.go b/ops.kubedb.com/v1alpha1/documentdb_mapping.go new file mode 100644 index 0000000..fc0c82a --- /dev/null +++ b/ops.kubedb.com/v1alpha1/documentdb_mapping.go @@ -0,0 +1,58 @@ +/* +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(&DocumentDBOpsRequest{}) +} + +type DocumentDBOpsRequest struct{} + +var _ OpsPathMapper = (*DocumentDBOpsRequest)(nil) + +func (m *DocumentDBOpsRequest) HorizontalPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{ + "spec.horizontalScaling.replicas": "spec.replicas", + } +} + +func (m *DocumentDBOpsRequest) VerticalPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{ + "spec.verticalScaling.documentdb": "spec.podTemplate.spec.resources", + } +} + +func (m *DocumentDBOpsRequest) VolumeExpansionPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{ + "spec.volumeExpansion.documentdb": "spec.storage.resources.requests.storage", + "spec.volumeExpansion.arbiter": "spec.arbiter.storage.resources.requests.storage", + } +} + +func (m *DocumentDBOpsRequest) GetAppRefPath() []string { + return []string{"spec", "databaseRef"} +} + +func (m *DocumentDBOpsRequest) GroupVersionKind() schema.GroupVersionKind { + return schema.GroupVersionKind{ + Group: "ops.kubedb.com", + Version: "v1alpha1", + Kind: "DocumentDBOpsRequest", + } +} diff --git a/ops.kubedb.com/v1alpha1/hanadb_mapping.go b/ops.kubedb.com/v1alpha1/hanadb_mapping.go new file mode 100644 index 0000000..a2a1f71 --- /dev/null +++ b/ops.kubedb.com/v1alpha1/hanadb_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(&HanaDBOpsRequest{}) +} + +type HanaDBOpsRequest struct{} + +var _ OpsPathMapper = (*HanaDBOpsRequest)(nil) + +func (m *HanaDBOpsRequest) HorizontalPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{} +} + +func (m *HanaDBOpsRequest) VerticalPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{ + "spec.verticalScaling.hanadb": "spec.podTemplate.spec.resources", + } +} + +func (m *HanaDBOpsRequest) VolumeExpansionPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{ + "spec.volumeExpansion.hanadb": "spec.storage.resources.requests.storage", + } +} + +func (m *HanaDBOpsRequest) GetAppRefPath() []string { + return []string{"spec", "databaseRef"} +} + +func (m *HanaDBOpsRequest) GroupVersionKind() schema.GroupVersionKind { + return schema.GroupVersionKind{ + Group: "ops.kubedb.com", + Version: "v1alpha1", + Kind: "HanaDBOpsRequest", + } +} diff --git a/ops.kubedb.com/v1alpha1/hazelcast_mapping.go b/ops.kubedb.com/v1alpha1/hazelcast_mapping.go new file mode 100644 index 0000000..28ce59b --- /dev/null +++ b/ops.kubedb.com/v1alpha1/hazelcast_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(&HazelcastOpsRequest{}) +} + +type HazelcastOpsRequest struct{} + +var _ OpsPathMapper = (*HazelcastOpsRequest)(nil) + +func (m *HazelcastOpsRequest) HorizontalPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{ + "spec.horizontalScaling.hazelcast": "spec.replicas", + } +} + +func (m *HazelcastOpsRequest) VerticalPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{ + "spec.verticalScaling.hazelcast": "spec.podTemplate.spec.resources", + } +} + +func (m *HazelcastOpsRequest) VolumeExpansionPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{ + "spec.volumeExpansion.hazelcast": "spec.storage.resources.requests.storage", + } +} + +func (m *HazelcastOpsRequest) GetAppRefPath() []string { + return []string{"spec", "databaseRef"} +} + +func (m *HazelcastOpsRequest) GroupVersionKind() schema.GroupVersionKind { + return schema.GroupVersionKind{ + Group: "ops.kubedb.com", + Version: "v1alpha1", + Kind: "HazelcastOpsRequest", + } +} diff --git a/ops.kubedb.com/v1alpha1/ignite_mapping.go b/ops.kubedb.com/v1alpha1/ignite_mapping.go new file mode 100644 index 0000000..952c4a3 --- /dev/null +++ b/ops.kubedb.com/v1alpha1/ignite_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(&IgniteOpsRequest{}) +} + +type IgniteOpsRequest struct{} + +var _ OpsPathMapper = (*IgniteOpsRequest)(nil) + +func (m *IgniteOpsRequest) HorizontalPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{ + "spec.horizontalScaling.node": "spec.replicas", + } +} + +func (m *IgniteOpsRequest) VerticalPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{ + "spec.verticalScaling.node": "spec.podTemplate.spec.resources", + } +} + +func (m *IgniteOpsRequest) VolumeExpansionPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{ + "spec.volumeExpansion.node": "spec.storage.resources.requests.storage", + } +} + +func (m *IgniteOpsRequest) GetAppRefPath() []string { + return []string{"spec", "databaseRef"} +} + +func (m *IgniteOpsRequest) GroupVersionKind() schema.GroupVersionKind { + return schema.GroupVersionKind{ + Group: "ops.kubedb.com", + Version: "v1alpha1", + Kind: "IgniteOpsRequest", + } +} diff --git a/ops.kubedb.com/v1alpha1/milvus_mapping.go b/ops.kubedb.com/v1alpha1/milvus_mapping.go new file mode 100644 index 0000000..6a52da9 --- /dev/null +++ b/ops.kubedb.com/v1alpha1/milvus_mapping.go @@ -0,0 +1,67 @@ +/* +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(&MilvusOpsRequest{}) +} + +type MilvusOpsRequest struct{} + +var _ OpsPathMapper = (*MilvusOpsRequest)(nil) + +func (m *MilvusOpsRequest) HorizontalPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{ + "spec.horizontalScaling.topology.proxy": "spec.topology.distributed.proxy.replicas", + "spec.horizontalScaling.topology.mixcoord": "spec.topology.distributed.mixcoord.replicas", + "spec.horizontalScaling.topology.querynode": "spec.topology.distributed.querynode.replicas", + "spec.horizontalScaling.topology.streamingnode": "spec.topology.distributed.streamingnode.replicas", + "spec.horizontalScaling.topology.dataNode": "spec.topology.distributed.datanode.replicas", + } +} + +func (m *MilvusOpsRequest) VerticalPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{ + "spec.verticalScaling.node": "spec.podTemplate.spec.resources", + "spec.verticalScaling.proxy": "spec.topology.distributed.proxy.podTemplate.spec.resources", + "spec.verticalScaling.mixcoord": "spec.topology.distributed.mixcoord.podTemplate.spec.resources", + "spec.verticalScaling.datanode": "spec.topology.distributed.datanode.podTemplate.spec.resources", + "spec.verticalScaling.querynode": "spec.topology.distributed.querynode.podTemplate.spec.resources", + "spec.verticalScaling.streamingnode": "spec.topology.distributed.streamingnode.podTemplate.spec.resources", + } +} + +func (m *MilvusOpsRequest) VolumeExpansionPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{ + "spec.volumeExpansion.node": "spec.storage.resources.requests.storage", + "spec.volumeExpansion.streamingnode": "spec.topology.distributed.streamingnode.storage.resources.requests.storage", + } +} + +func (m *MilvusOpsRequest) GetAppRefPath() []string { + return []string{"spec", "databaseRef"} +} + +func (m *MilvusOpsRequest) GroupVersionKind() schema.GroupVersionKind { + return schema.GroupVersionKind{ + Group: "ops.kubedb.com", + Version: "v1alpha1", + Kind: "MilvusOpsRequest", + } +} diff --git a/ops.kubedb.com/v1alpha1/neo4j_mapping.go b/ops.kubedb.com/v1alpha1/neo4j_mapping.go new file mode 100644 index 0000000..02198de --- /dev/null +++ b/ops.kubedb.com/v1alpha1/neo4j_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(&Neo4jOpsRequest{}) +} + +type Neo4jOpsRequest struct{} + +var _ OpsPathMapper = (*Neo4jOpsRequest)(nil) + +func (m *Neo4jOpsRequest) HorizontalPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{ + "spec.horizontalScaling.server": "spec.replicas", + } +} + +func (m *Neo4jOpsRequest) VerticalPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{ + "spec.verticalScaling.server": "spec.podTemplate.spec.resources", + } +} + +func (m *Neo4jOpsRequest) VolumeExpansionPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{ + "spec.volumeExpansion.server": "spec.storage.resources.requests.storage", + } +} + +func (m *Neo4jOpsRequest) GetAppRefPath() []string { + return []string{"spec", "databaseRef"} +} + +func (m *Neo4jOpsRequest) GroupVersionKind() schema.GroupVersionKind { + return schema.GroupVersionKind{ + Group: "ops.kubedb.com", + Version: "v1alpha1", + Kind: "Neo4jOpsRequest", + } +} diff --git a/ops.kubedb.com/v1alpha1/oracle_mapping.go b/ops.kubedb.com/v1alpha1/oracle_mapping.go new file mode 100644 index 0000000..9c09026 --- /dev/null +++ b/ops.kubedb.com/v1alpha1/oracle_mapping.go @@ -0,0 +1,56 @@ +/* +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(&OracleOpsRequest{}) +} + +type OracleOpsRequest struct{} + +var _ OpsPathMapper = (*OracleOpsRequest)(nil) + +func (m *OracleOpsRequest) HorizontalPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{} +} + +func (m *OracleOpsRequest) VerticalPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{ + "spec.verticalScaling.node": "spec.podTemplate.spec.resources", + } +} + +func (m *OracleOpsRequest) VolumeExpansionPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{ + "spec.volumeExpansion.node": "spec.storage.resources.requests.storage", + "spec.volumeExpansion.observer": "spec.dataGuard.observer.storage.resources.requests.storage", + } +} + +func (m *OracleOpsRequest) GetAppRefPath() []string { + return []string{"spec", "databaseRef"} +} + +func (m *OracleOpsRequest) GroupVersionKind() schema.GroupVersionKind { + return schema.GroupVersionKind{ + Group: "ops.kubedb.com", + Version: "v1alpha1", + Kind: "OracleOpsRequest", + } +} diff --git a/ops.kubedb.com/v1alpha1/qdrant_mapping.go b/ops.kubedb.com/v1alpha1/qdrant_mapping.go new file mode 100644 index 0000000..dc3f253 --- /dev/null +++ b/ops.kubedb.com/v1alpha1/qdrant_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(&QdrantOpsRequest{}) +} + +type QdrantOpsRequest struct{} + +var _ OpsPathMapper = (*QdrantOpsRequest)(nil) + +func (m *QdrantOpsRequest) HorizontalPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{ + "spec.horizontalScaling.node": "spec.replicas", + } +} + +func (m *QdrantOpsRequest) VerticalPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{ + "spec.verticalScaling.node": "spec.podTemplate.spec.resources", + } +} + +func (m *QdrantOpsRequest) VolumeExpansionPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{ + "spec.volumeExpansion.node": "spec.storage.resources.requests.storage", + } +} + +func (m *QdrantOpsRequest) GetAppRefPath() []string { + return []string{"spec", "databaseRef"} +} + +func (m *QdrantOpsRequest) GroupVersionKind() schema.GroupVersionKind { + return schema.GroupVersionKind{ + Group: "ops.kubedb.com", + Version: "v1alpha1", + Kind: "QdrantOpsRequest", + } +} diff --git a/ops.kubedb.com/v1alpha1/weaviate_mapping.go b/ops.kubedb.com/v1alpha1/weaviate_mapping.go new file mode 100644 index 0000000..f9fb037 --- /dev/null +++ b/ops.kubedb.com/v1alpha1/weaviate_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(&WeaviateOpsRequest{}) +} + +type WeaviateOpsRequest struct{} + +var _ OpsPathMapper = (*WeaviateOpsRequest)(nil) + +func (m *WeaviateOpsRequest) HorizontalPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{ + "spec.horizontalScaling.node": "spec.replicas", + } +} + +func (m *WeaviateOpsRequest) VerticalPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{ + "spec.verticalScaling.node": "spec.podTemplate.spec.resources", + } +} + +func (m *WeaviateOpsRequest) VolumeExpansionPathMapping() map[OpsReqPath]ReferencedObjPath { + return map[OpsReqPath]ReferencedObjPath{ + "spec.volumeExpansion.node": "spec.storage.resources.requests.storage", + } +} + +func (m *WeaviateOpsRequest) GetAppRefPath() []string { + return []string{"spec", "databaseRef"} +} + +func (m *WeaviateOpsRequest) GroupVersionKind() schema.GroupVersionKind { + return schema.GroupVersionKind{ + Group: "ops.kubedb.com", + Version: "v1alpha1", + Kind: "WeaviateOpsRequest", + } +}