-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Arnob kumar saha <[email protected]>
- Loading branch information
1 parent
8d88001
commit 1dd57f6
Showing
9 changed files
with
539 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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", | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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", | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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", | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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", | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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", | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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", | ||
} | ||
} |
Oops, something went wrong.