Skip to content

Commit

Permalink
Flatten api structure
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <tamal@appscode.com>
  • Loading branch information
tamalsaha committed May 19, 2020
1 parent 9c98fbc commit 0c9e2b4
Show file tree
Hide file tree
Showing 9 changed files with 2,152 additions and 272 deletions.
4 changes: 4 additions & 0 deletions api/api-rules/violation_exceptions.list
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,10 @@ API rule violation: list_type_missing,kubedb.dev/apimachinery/apis/dba/v1alpha1,
API rule violation: list_type_missing,kubedb.dev/apimachinery/apis/dba/v1alpha1,MemcachedModificationRequestStatus,Conditions
API rule violation: list_type_missing,kubedb.dev/apimachinery/apis/dba/v1alpha1,MongoDBModificationRequestList,Items
API rule violation: list_type_missing,kubedb.dev/apimachinery/apis/dba/v1alpha1,MongoDBModificationRequestStatus,Conditions
API rule violation: list_type_missing,kubedb.dev/apimachinery/apis/dba/v1alpha1,MongoDBVerticalScalingSpec,ConfigServer
API rule violation: list_type_missing,kubedb.dev/apimachinery/apis/dba/v1alpha1,MongoDBVerticalScalingSpec,Containers
API rule violation: list_type_missing,kubedb.dev/apimachinery/apis/dba/v1alpha1,MongoDBVerticalScalingSpec,Mongos
API rule violation: list_type_missing,kubedb.dev/apimachinery/apis/dba/v1alpha1,MongoDBVerticalScalingSpec,Shard
API rule violation: list_type_missing,kubedb.dev/apimachinery/apis/dba/v1alpha1,MySQLModificationRequestList,Items
API rule violation: list_type_missing,kubedb.dev/apimachinery/apis/dba/v1alpha1,MySQLModificationRequestStatus,Conditions
API rule violation: list_type_missing,kubedb.dev/apimachinery/apis/dba/v1alpha1,MySQLVerticalScalingSpec,Containers
Expand Down
4 changes: 2 additions & 2 deletions api/crds/bindata.go

Large diffs are not rendered by default.

171 changes: 169 additions & 2 deletions api/crds/dba.kubedb.com_mongodbmodificationrequests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,44 @@ spec:
description: MongoDBModificationRequestSpec is the spec for MongoDBModificationRequest
properties:
databaseRef:
description: Specifies the Elasticsearch reference
description: Specifies the MongoDB reference
properties:
name:
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Add other useful fields. apiVersion, kind, uid?'
type: string
type: object
horizontalScaling:
description: Specifies information necessary for horizontal scaling
properties:
configServer:
description: ConfigNode is the spec for mongodb ConfigServer
properties:
replicas:
format: int32
type: integer
type: object
mongos:
description: MongosNode is the spec for mongodb Mongos
properties:
replicas:
format: int32
type: integer
type: object
replicas:
format: int32
type: integer
shard:
description: MongoDBShardNode is the spec for mongodb Shard
properties:
replicas:
format: int32
type: integer
shards:
format: int32
type: integer
type: object
type: object
type:
description: 'Specifies the modification request type: Upgrade, HorizontalScaling,
VerticalScaling etc.'
Expand All @@ -70,12 +101,148 @@ spec:
- RotateCertificates
type: string
upgrade:
description: Specifies the field information that needed to be upgraded
description: Specifies information necessary for upgrading mongodb
properties:
targetVersion:
description: Specifies the target version name from catalog
type: string
type: object
verticalScaling:
description: Specifies information necessary for vertical scaling
properties:
configServer:
items:
description: Resources requested by a single application container
properties:
name:
description: Name of the container specified as a DNS_LABEL.
Each container in a pod must have a unique name (DNS_LABEL).
Cannot be updated.
type: string
resources:
description: 'Compute Resources required by this container.
Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
properties:
limits:
additionalProperties:
type: string
description: 'Limits describes the maximum amount of compute
resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
type: object
requests:
additionalProperties:
type: string
description: 'Requests describes the minimum amount of
compute resources required. If Requests is omitted for
a container, it defaults to Limits if that is explicitly
specified, otherwise to an implementation-defined value.
More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
type: object
type: object
required:
- name
type: object
type: array
containers:
items:
description: Resources requested by a single application container
properties:
name:
description: Name of the container specified as a DNS_LABEL.
Each container in a pod must have a unique name (DNS_LABEL).
Cannot be updated.
type: string
resources:
description: 'Compute Resources required by this container.
Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
properties:
limits:
additionalProperties:
type: string
description: 'Limits describes the maximum amount of compute
resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
type: object
requests:
additionalProperties:
type: string
description: 'Requests describes the minimum amount of
compute resources required. If Requests is omitted for
a container, it defaults to Limits if that is explicitly
specified, otherwise to an implementation-defined value.
More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
type: object
type: object
required:
- name
type: object
type: array
mongos:
items:
description: Resources requested by a single application container
properties:
name:
description: Name of the container specified as a DNS_LABEL.
Each container in a pod must have a unique name (DNS_LABEL).
Cannot be updated.
type: string
resources:
description: 'Compute Resources required by this container.
Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
properties:
limits:
additionalProperties:
type: string
description: 'Limits describes the maximum amount of compute
resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
type: object
requests:
additionalProperties:
type: string
description: 'Requests describes the minimum amount of
compute resources required. If Requests is omitted for
a container, it defaults to Limits if that is explicitly
specified, otherwise to an implementation-defined value.
More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
type: object
type: object
required:
- name
type: object
type: array
shard:
items:
description: Resources requested by a single application container
properties:
name:
description: Name of the container specified as a DNS_LABEL.
Each container in a pod must have a unique name (DNS_LABEL).
Cannot be updated.
type: string
resources:
description: 'Compute Resources required by this container.
Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
properties:
limits:
additionalProperties:
type: string
description: 'Limits describes the maximum amount of compute
resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
type: object
requests:
additionalProperties:
type: string
description: 'Requests describes the minimum amount of
compute resources required. If Requests is omitted for
a container, it defaults to Limits if that is explicitly
specified, otherwise to an implementation-defined value.
More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
type: object
type: object
required:
- name
type: object
type: array
type: object
required:
- databaseRef
- type
Expand Down
95 changes: 93 additions & 2 deletions api/openapi-spec/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -28289,6 +28289,16 @@
}
}
},
"dev.kubedb.apimachinery.apis.dba.v1alpha1.ConfigNode": {
"description": "ConfigNode is the spec for mongodb ConfigServer",
"type": "object",
"properties": {
"replicas": {
"type": "integer",
"format": "int32"
}
}
},
"dev.kubedb.apimachinery.apis.dba.v1alpha1.ContainerResources": {
"description": "Resources requested by a single application container",
"type": "object",
Expand Down Expand Up @@ -28641,6 +28651,25 @@
}
}
},
"dev.kubedb.apimachinery.apis.dba.v1alpha1.MongoDBHorizontalScalingSpec": {
"description": "HorizontalScaling is the spec for mongodb horizontal scaling",
"type": "object",
"properties": {
"configServer": {
"$ref": "#/definitions/dev.kubedb.apimachinery.apis.dba.v1alpha1.ConfigNode"
},
"mongos": {
"$ref": "#/definitions/dev.kubedb.apimachinery.apis.dba.v1alpha1.MongosNode"
},
"replicas": {
"type": "integer",
"format": "int32"
},
"shard": {
"$ref": "#/definitions/dev.kubedb.apimachinery.apis.dba.v1alpha1.MongoDBShardNode"
}
}
},
"dev.kubedb.apimachinery.apis.dba.v1alpha1.MongoDBModificationRequest": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -28710,16 +28739,24 @@
],
"properties": {
"databaseRef": {
"description": "Specifies the Elasticsearch reference",
"description": "Specifies the MongoDB reference",
"$ref": "#/definitions/io.k8s.api.core.v1.LocalObjectReference"
},
"horizontalScaling": {
"description": "Specifies information necessary for horizontal scaling",
"$ref": "#/definitions/dev.kubedb.apimachinery.apis.dba.v1alpha1.MongoDBHorizontalScalingSpec"
},
"type": {
"description": "Specifies the modification request type: Upgrade, HorizontalScaling, VerticalScaling etc.",
"type": "string"
},
"upgrade": {
"description": "Specifies the field information that needed to be upgraded",
"description": "Specifies information necessary for upgrading mongodb",
"$ref": "#/definitions/dev.kubedb.apimachinery.apis.dba.v1alpha1.UpgradeSpec"
},
"verticalScaling": {
"description": "Specifies information necessary for vertical scaling",
"$ref": "#/definitions/dev.kubedb.apimachinery.apis.dba.v1alpha1.MongoDBVerticalScalingSpec"
}
}
},
Expand All @@ -28744,6 +28781,60 @@
}
}
},
"dev.kubedb.apimachinery.apis.dba.v1alpha1.MongoDBShardNode": {
"description": "MongoDBShardNode is the spec for mongodb Shard",
"type": "object",
"properties": {
"replicas": {
"type": "integer",
"format": "int32"
},
"shards": {
"type": "integer",
"format": "int32"
}
}
},
"dev.kubedb.apimachinery.apis.dba.v1alpha1.MongoDBVerticalScalingSpec": {
"description": "MongoDBVerticalScalingSpec is the spec for mongodb vertical scaling",
"type": "object",
"properties": {
"configServer": {
"type": "array",
"items": {
"$ref": "#/definitions/dev.kubedb.apimachinery.apis.dba.v1alpha1.ContainerResources"
}
},
"containers": {
"type": "array",
"items": {
"$ref": "#/definitions/dev.kubedb.apimachinery.apis.dba.v1alpha1.ContainerResources"
}
},
"mongos": {
"type": "array",
"items": {
"$ref": "#/definitions/dev.kubedb.apimachinery.apis.dba.v1alpha1.ContainerResources"
}
},
"shard": {
"type": "array",
"items": {
"$ref": "#/definitions/dev.kubedb.apimachinery.apis.dba.v1alpha1.ContainerResources"
}
}
}
},
"dev.kubedb.apimachinery.apis.dba.v1alpha1.MongosNode": {
"description": "MongosNode is the spec for mongodb Mongos",
"type": "object",
"properties": {
"replicas": {
"type": "integer",
"format": "int32"
}
}
},
"dev.kubedb.apimachinery.apis.dba.v1alpha1.MySQLHorizontalScalingSpec": {
"type": "object",
"properties": {
Expand Down
Loading

0 comments on commit 0c9e2b4

Please sign in to comment.