blob: 55e5e25ab75d96d6ff80fe4a43dc4dfef75a685c [file] [log] [blame]
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.9.0
creationTimestamp: null
name: shardingsphereproxies.shardingsphere.apache.org
spec:
group: shardingsphere.apache.org
names:
kind: ShardingSphereProxy
listKind: ShardingSphereProxyList
plural: shardingsphereproxies
singular: shardingsphereproxy
scope: Namespaced
versions:
- additionalPrinterColumns:
- jsonPath: .status.readyNodes
name: ReadyNodes
type: integer
- jsonPath: .status.phase
name: Phase
type: string
name: v1alpha1
schema:
openAPIV3Schema:
description: ShardingSphereProxy is the Schema for the proxies API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: ProxySpec defines the desired state of ShardingSphereProxy
properties:
automaticScaling:
description: AutomaticScaling HPA configuration
properties:
customMetrics:
items:
description: MetricSpec specifies how to scale based on a single
metric (only `type` and one other matching field should be
set at once).
properties:
containerResource:
description: container resource refers to a resource metric
(such as those specified in requests and limits) known
to Kubernetes describing a single container in each pod
of the current scale target (e.g. CPU or memory). Such
metrics are built in to Kubernetes, and have special scaling
options on top of those available to normal per-pod metrics
using the "pods" source. This is an alpha feature and
can be enabled by the HPAContainerMetrics feature flag.
properties:
container:
description: container is the name of the container
in the pods of the scaling target
type: string
name:
description: name is the name of the resource in question.
type: string
target:
description: target specifies the target value for the
given metric
properties:
averageUtilization:
description: averageUtilization is the target value
of the average of the resource metric across all
relevant pods, represented as a percentage of
the requested value of the resource for the pods.
Currently only valid for Resource metric source
type
format: int32
type: integer
averageValue:
anyOf:
- type: integer
- type: string
description: averageValue is the target value of
the average of the metric across all relevant
pods (as a quantity)
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
type:
description: type represents whether the metric
type is Utilization, Value, or AverageValue
type: string
value:
anyOf:
- type: integer
- type: string
description: value is the target value of the metric
(as a quantity).
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
required:
- type
type: object
required:
- container
- name
- target
type: object
external:
description: external refers to a global metric that is
not associated with any Kubernetes object. It allows autoscaling
based on information coming from components running outside
of cluster (for example length of queue in cloud messaging
service, or QPS from loadbalancer running outside of cluster).
properties:
metric:
description: metric identifies the target metric by
name and selector
properties:
name:
description: name is the name of the given metric
type: string
selector:
description: selector is the string-encoded form
of a standard kubernetes label selector for the
given metric When set, it is passed as an additional
parameter to the metrics server for more specific
metrics scoping. When unset, just the metricName
will be used to gather metrics.
properties:
matchExpressions:
description: matchExpressions is a list of label
selector requirements. The requirements are
ANDed.
items:
description: A label selector requirement
is a selector that contains values, a key,
and an operator that relates the key and
values.
properties:
key:
description: key is the label key that
the selector applies to.
type: string
operator:
description: operator represents a key's
relationship to a set of values. Valid
operators are In, NotIn, Exists and
DoesNotExist.
type: string
values:
description: values is an array of string
values. If the operator is In or NotIn,
the values array must be non-empty.
If the operator is Exists or DoesNotExist,
the values array must be empty. This
array is replaced during a strategic
merge patch.
items:
type: string
type: array
required:
- key
- operator
type: object
type: array
matchLabels:
additionalProperties:
type: string
description: matchLabels is a map of {key,value}
pairs. A single {key,value} in the matchLabels
map is equivalent to an element of matchExpressions,
whose key field is "key", the operator is
"In", and the values array contains only "value".
The requirements are ANDed.
type: object
type: object
required:
- name
type: object
target:
description: target specifies the target value for the
given metric
properties:
averageUtilization:
description: averageUtilization is the target value
of the average of the resource metric across all
relevant pods, represented as a percentage of
the requested value of the resource for the pods.
Currently only valid for Resource metric source
type
format: int32
type: integer
averageValue:
anyOf:
- type: integer
- type: string
description: averageValue is the target value of
the average of the metric across all relevant
pods (as a quantity)
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
type:
description: type represents whether the metric
type is Utilization, Value, or AverageValue
type: string
value:
anyOf:
- type: integer
- type: string
description: value is the target value of the metric
(as a quantity).
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
required:
- type
type: object
required:
- metric
- target
type: object
object:
description: object refers to a metric describing a single
kubernetes object (for example, hits-per-second on an
Ingress object).
properties:
describedObject:
description: CrossVersionObjectReference contains enough
information to let you identify the referred resource.
properties:
apiVersion:
description: API version of the referent
type: string
kind:
description: 'Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
name:
description: 'Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names'
type: string
required:
- kind
- name
type: object
metric:
description: metric identifies the target metric by
name and selector
properties:
name:
description: name is the name of the given metric
type: string
selector:
description: selector is the string-encoded form
of a standard kubernetes label selector for the
given metric When set, it is passed as an additional
parameter to the metrics server for more specific
metrics scoping. When unset, just the metricName
will be used to gather metrics.
properties:
matchExpressions:
description: matchExpressions is a list of label
selector requirements. The requirements are
ANDed.
items:
description: A label selector requirement
is a selector that contains values, a key,
and an operator that relates the key and
values.
properties:
key:
description: key is the label key that
the selector applies to.
type: string
operator:
description: operator represents a key's
relationship to a set of values. Valid
operators are In, NotIn, Exists and
DoesNotExist.
type: string
values:
description: values is an array of string
values. If the operator is In or NotIn,
the values array must be non-empty.
If the operator is Exists or DoesNotExist,
the values array must be empty. This
array is replaced during a strategic
merge patch.
items:
type: string
type: array
required:
- key
- operator
type: object
type: array
matchLabels:
additionalProperties:
type: string
description: matchLabels is a map of {key,value}
pairs. A single {key,value} in the matchLabels
map is equivalent to an element of matchExpressions,
whose key field is "key", the operator is
"In", and the values array contains only "value".
The requirements are ANDed.
type: object
type: object
required:
- name
type: object
target:
description: target specifies the target value for the
given metric
properties:
averageUtilization:
description: averageUtilization is the target value
of the average of the resource metric across all
relevant pods, represented as a percentage of
the requested value of the resource for the pods.
Currently only valid for Resource metric source
type
format: int32
type: integer
averageValue:
anyOf:
- type: integer
- type: string
description: averageValue is the target value of
the average of the metric across all relevant
pods (as a quantity)
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
type:
description: type represents whether the metric
type is Utilization, Value, or AverageValue
type: string
value:
anyOf:
- type: integer
- type: string
description: value is the target value of the metric
(as a quantity).
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
required:
- type
type: object
required:
- describedObject
- metric
- target
type: object
pods:
description: pods refers to a metric describing each pod
in the current scale target (for example, transactions-processed-per-second). The
values will be averaged together before being compared
to the target value.
properties:
metric:
description: metric identifies the target metric by
name and selector
properties:
name:
description: name is the name of the given metric
type: string
selector:
description: selector is the string-encoded form
of a standard kubernetes label selector for the
given metric When set, it is passed as an additional
parameter to the metrics server for more specific
metrics scoping. When unset, just the metricName
will be used to gather metrics.
properties:
matchExpressions:
description: matchExpressions is a list of label
selector requirements. The requirements are
ANDed.
items:
description: A label selector requirement
is a selector that contains values, a key,
and an operator that relates the key and
values.
properties:
key:
description: key is the label key that
the selector applies to.
type: string
operator:
description: operator represents a key's
relationship to a set of values. Valid
operators are In, NotIn, Exists and
DoesNotExist.
type: string
values:
description: values is an array of string
values. If the operator is In or NotIn,
the values array must be non-empty.
If the operator is Exists or DoesNotExist,
the values array must be empty. This
array is replaced during a strategic
merge patch.
items:
type: string
type: array
required:
- key
- operator
type: object
type: array
matchLabels:
additionalProperties:
type: string
description: matchLabels is a map of {key,value}
pairs. A single {key,value} in the matchLabels
map is equivalent to an element of matchExpressions,
whose key field is "key", the operator is
"In", and the values array contains only "value".
The requirements are ANDed.
type: object
type: object
required:
- name
type: object
target:
description: target specifies the target value for the
given metric
properties:
averageUtilization:
description: averageUtilization is the target value
of the average of the resource metric across all
relevant pods, represented as a percentage of
the requested value of the resource for the pods.
Currently only valid for Resource metric source
type
format: int32
type: integer
averageValue:
anyOf:
- type: integer
- type: string
description: averageValue is the target value of
the average of the metric across all relevant
pods (as a quantity)
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
type:
description: type represents whether the metric
type is Utilization, Value, or AverageValue
type: string
value:
anyOf:
- type: integer
- type: string
description: value is the target value of the metric
(as a quantity).
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
required:
- type
type: object
required:
- metric
- target
type: object
resource:
description: resource refers to a resource metric (such
as those specified in requests and limits) known to Kubernetes
describing each pod in the current scale target (e.g.
CPU or memory). Such metrics are built in to Kubernetes,
and have special scaling options on top of those available
to normal per-pod metrics using the "pods" source.
properties:
name:
description: name is the name of the resource in question.
type: string
target:
description: target specifies the target value for the
given metric
properties:
averageUtilization:
description: averageUtilization is the target value
of the average of the resource metric across all
relevant pods, represented as a percentage of
the requested value of the resource for the pods.
Currently only valid for Resource metric source
type
format: int32
type: integer
averageValue:
anyOf:
- type: integer
- type: string
description: averageValue is the target value of
the average of the metric across all relevant
pods (as a quantity)
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
type:
description: type represents whether the metric
type is Utilization, Value, or AverageValue
type: string
value:
anyOf:
- type: integer
- type: string
description: value is the target value of the metric
(as a quantity).
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
required:
- type
type: object
required:
- name
- target
type: object
type:
description: 'type is the type of metric source. It should
be one of "ContainerResource", "External", "Object", "Pods"
or "Resource", each mapping to a matching field in the
object. Note: "ContainerResource" type is available on
when the feature-gate HPAContainerMetrics is enabled'
type: string
required:
- type
type: object
type: array
enable:
type: boolean
maxInstance:
format: int32
type: integer
minInstance:
format: int32
type: integer
scaleDownWindows:
format: int32
type: integer
scaleUpWindows:
format: int32
type: integer
target:
format: int32
type: integer
type: object
imagePullSecrets:
items:
description: LocalObjectReference contains enough information to
let you locate the referenced object inside the same namespace.
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
type: array
livenessProbe:
description: Probes are not allowed for ephemeral containers.
properties:
exec:
description: Exec specifies the action to take.
properties:
command:
description: Command is the command line to execute inside
the container, the working directory for the command is
root ('/') in the container's filesystem. The command is
simply exec'd, it is not run inside a shell, so traditional
shell instructions ('|', etc) won't work. To use a shell,
you need to explicitly call out to that shell. Exit status
of 0 is treated as live/healthy and non-zero is unhealthy.
items:
type: string
type: array
type: object
failureThreshold:
description: Minimum consecutive failures for the probe to be
considered failed after having succeeded. Defaults to 3. Minimum
value is 1.
format: int32
type: integer
grpc:
description: GRPC specifies an action involving a GRPC port. This
is a beta field and requires enabling GRPCContainerProbe feature
gate.
properties:
port:
description: Port number of the gRPC service. Number must
be in the range 1 to 65535.
format: int32
type: integer
service:
description: "Service is the name of the service to place
in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).
\n If this is not specified, the default behavior is defined
by gRPC."
type: string
required:
- port
type: object
httpGet:
description: HTTPGet specifies the http request to perform.
properties:
host:
description: Host name to connect to, defaults to the pod
IP. You probably want to set "Host" in httpHeaders instead.
type: string
httpHeaders:
description: Custom headers to set in the request. HTTP allows
repeated headers.
items:
description: HTTPHeader describes a custom header to be
used in HTTP probes
properties:
name:
description: The header field name
type: string
value:
description: The header field value
type: string
required:
- name
- value
type: object
type: array
path:
description: Path to access on the HTTP server.
type: string
port:
anyOf:
- type: integer
- type: string
description: Name or number of the port to access on the container.
Number must be in the range 1 to 65535. Name must be an
IANA_SVC_NAME.
x-kubernetes-int-or-string: true
scheme:
description: Scheme to use for connecting to the host. Defaults
to HTTP.
type: string
required:
- port
type: object
initialDelaySeconds:
description: 'Number of seconds after the container has started
before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
format: int32
type: integer
periodSeconds:
description: How often (in seconds) to perform the probe. Default
to 10 seconds. Minimum value is 1.
format: int32
type: integer
successThreshold:
description: Minimum consecutive successes for the probe to be
considered successful after having failed. Defaults to 1. Must
be 1 for liveness and startup. Minimum value is 1.
format: int32
type: integer
tcpSocket:
description: TCPSocket specifies an action involving a TCP port.
properties:
host:
description: 'Optional: Host name to connect to, defaults
to the pod IP.'
type: string
port:
anyOf:
- type: integer
- type: string
description: Number or name of the port to access on the container.
Number must be in the range 1 to 65535. Name must be an
IANA_SVC_NAME.
x-kubernetes-int-or-string: true
required:
- port
type: object
terminationGracePeriodSeconds:
description: Optional duration in seconds the pod needs to terminate
gracefully upon probe failure. The grace period is the duration
in seconds after the processes running in the pod are sent a
termination signal and the time when the processes are forcibly
halted with a kill signal. Set this value longer than the expected
cleanup time for your process. If this value is nil, the pod's
terminationGracePeriodSeconds will be used. Otherwise, this
value overrides the value provided by the pod spec. Value must
be non-negative integer. The value zero indicates stop immediately
via the kill signal (no opportunity to shut down). This is a
beta field and requires enabling ProbeTerminationGracePeriod
feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds
is used if unset.
format: int64
type: integer
timeoutSeconds:
description: 'Number of seconds after which the probe times out.
Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
format: int32
type: integer
type: object
mySQLDriver:
description: MySQLDriver Defines the mysql-driven version in ShardingSphere-proxy
properties:
version:
description: mysql-driven version,must be x.y.z
pattern: ^([1-9]\d|[1-9])(\.([1-9]\d|\d)){2}$
type: string
required:
- version
type: object
port:
description: Port is ShardingSphere-Proxy startup port
format: int32
minimum: 0
type: integer
proxyConfigName:
description: ProxyConfigName is the name of the ShardingSphereProxyServerConfig
CRD
minLength: 0
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
type: string
readinessProbe:
description: Probes are not allowed for ephemeral containers.
properties:
exec:
description: Exec specifies the action to take.
properties:
command:
description: Command is the command line to execute inside
the container, the working directory for the command is
root ('/') in the container's filesystem. The command is
simply exec'd, it is not run inside a shell, so traditional
shell instructions ('|', etc) won't work. To use a shell,
you need to explicitly call out to that shell. Exit status
of 0 is treated as live/healthy and non-zero is unhealthy.
items:
type: string
type: array
type: object
failureThreshold:
description: Minimum consecutive failures for the probe to be
considered failed after having succeeded. Defaults to 3. Minimum
value is 1.
format: int32
type: integer
grpc:
description: GRPC specifies an action involving a GRPC port. This
is a beta field and requires enabling GRPCContainerProbe feature
gate.
properties:
port:
description: Port number of the gRPC service. Number must
be in the range 1 to 65535.
format: int32
type: integer
service:
description: "Service is the name of the service to place
in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).
\n If this is not specified, the default behavior is defined
by gRPC."
type: string
required:
- port
type: object
httpGet:
description: HTTPGet specifies the http request to perform.
properties:
host:
description: Host name to connect to, defaults to the pod
IP. You probably want to set "Host" in httpHeaders instead.
type: string
httpHeaders:
description: Custom headers to set in the request. HTTP allows
repeated headers.
items:
description: HTTPHeader describes a custom header to be
used in HTTP probes
properties:
name:
description: The header field name
type: string
value:
description: The header field value
type: string
required:
- name
- value
type: object
type: array
path:
description: Path to access on the HTTP server.
type: string
port:
anyOf:
- type: integer
- type: string
description: Name or number of the port to access on the container.
Number must be in the range 1 to 65535. Name must be an
IANA_SVC_NAME.
x-kubernetes-int-or-string: true
scheme:
description: Scheme to use for connecting to the host. Defaults
to HTTP.
type: string
required:
- port
type: object
initialDelaySeconds:
description: 'Number of seconds after the container has started
before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
format: int32
type: integer
periodSeconds:
description: How often (in seconds) to perform the probe. Default
to 10 seconds. Minimum value is 1.
format: int32
type: integer
successThreshold:
description: Minimum consecutive successes for the probe to be
considered successful after having failed. Defaults to 1. Must
be 1 for liveness and startup. Minimum value is 1.
format: int32
type: integer
tcpSocket:
description: TCPSocket specifies an action involving a TCP port.
properties:
host:
description: 'Optional: Host name to connect to, defaults
to the pod IP.'
type: string
port:
anyOf:
- type: integer
- type: string
description: Number or name of the port to access on the container.
Number must be in the range 1 to 65535. Name must be an
IANA_SVC_NAME.
x-kubernetes-int-or-string: true
required:
- port
type: object
terminationGracePeriodSeconds:
description: Optional duration in seconds the pod needs to terminate
gracefully upon probe failure. The grace period is the duration
in seconds after the processes running in the pod are sent a
termination signal and the time when the processes are forcibly
halted with a kill signal. Set this value longer than the expected
cleanup time for your process. If this value is nil, the pod's
terminationGracePeriodSeconds will be used. Otherwise, this
value overrides the value provided by the pod spec. Value must
be non-negative integer. The value zero indicates stop immediately
via the kill signal (no opportunity to shut down). This is a
beta field and requires enabling ProbeTerminationGracePeriod
feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds
is used if unset.
format: int64
type: integer
timeoutSeconds:
description: 'Number of seconds after which the probe times out.
Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
format: int32
type: integer
type: object
replicas:
description: Replicas is the expected number of replicas of ShardingSphere-Proxy
format: int32
type: integer
resources:
description: ResourceRequirements describes the compute resource requirements.
properties:
claims:
description: "Claims lists the names of resources, defined in
spec.resourceClaims, that are used by this container. \n This
is an alpha field and requires enabling the DynamicResourceAllocation
feature gate. \n This field is immutable. It can only be set
for containers."
items:
description: ResourceClaim references one entry in PodSpec.ResourceClaims.
properties:
name:
description: Name must match the name of one entry in pod.spec.resourceClaims
of the Pod where this field is used. It makes that resource
available inside a container.
type: string
required:
- name
type: object
type: array
x-kubernetes-list-map-keys:
- name
x-kubernetes-list-type: map
limits:
additionalProperties:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
description: 'Limits describes the maximum amount of compute resources
allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
type: object
requests:
additionalProperties:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
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-resources-containers/'
type: object
type: object
serviceType:
description: ServiceType defines the Service in Kubernetes of ShardingSphere-Proxy
properties:
nodePort:
description: 'The port on each node on which this service is exposed
when type is NodePort or LoadBalancer. Usually assigned by
the system. If a value is specified, in-range, and not in use
it will be used, otherwise the operation will fail. If not
specified, a port will be allocated if this Service requires
one. If this field is specified when creating a Service which
does not need it, creation will fail. This field will be wiped
when updating a Service to no longer need it (e.g. changing
type from NodePort to ClusterIP). More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport'
format: int32
minimum: 0
type: integer
type:
description: Service Type string describes ingress methods for
a service
enum:
- ClusterIP
- NodePort
- LoadBalancer
- ExternalName
type: string
required:
- type
type: object
startupProbe:
description: Probes are not allowed for ephemeral containers.
properties:
exec:
description: Exec specifies the action to take.
properties:
command:
description: Command is the command line to execute inside
the container, the working directory for the command is
root ('/') in the container's filesystem. The command is
simply exec'd, it is not run inside a shell, so traditional
shell instructions ('|', etc) won't work. To use a shell,
you need to explicitly call out to that shell. Exit status
of 0 is treated as live/healthy and non-zero is unhealthy.
items:
type: string
type: array
type: object
failureThreshold:
description: Minimum consecutive failures for the probe to be
considered failed after having succeeded. Defaults to 3. Minimum
value is 1.
format: int32
type: integer
grpc:
description: GRPC specifies an action involving a GRPC port. This
is a beta field and requires enabling GRPCContainerProbe feature
gate.
properties:
port:
description: Port number of the gRPC service. Number must
be in the range 1 to 65535.
format: int32
type: integer
service:
description: "Service is the name of the service to place
in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).
\n If this is not specified, the default behavior is defined
by gRPC."
type: string
required:
- port
type: object
httpGet:
description: HTTPGet specifies the http request to perform.
properties:
host:
description: Host name to connect to, defaults to the pod
IP. You probably want to set "Host" in httpHeaders instead.
type: string
httpHeaders:
description: Custom headers to set in the request. HTTP allows
repeated headers.
items:
description: HTTPHeader describes a custom header to be
used in HTTP probes
properties:
name:
description: The header field name
type: string
value:
description: The header field value
type: string
required:
- name
- value
type: object
type: array
path:
description: Path to access on the HTTP server.
type: string
port:
anyOf:
- type: integer
- type: string
description: Name or number of the port to access on the container.
Number must be in the range 1 to 65535. Name must be an
IANA_SVC_NAME.
x-kubernetes-int-or-string: true
scheme:
description: Scheme to use for connecting to the host. Defaults
to HTTP.
type: string
required:
- port
type: object
initialDelaySeconds:
description: 'Number of seconds after the container has started
before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
format: int32
type: integer
periodSeconds:
description: How often (in seconds) to perform the probe. Default
to 10 seconds. Minimum value is 1.
format: int32
type: integer
successThreshold:
description: Minimum consecutive successes for the probe to be
considered successful after having failed. Defaults to 1. Must
be 1 for liveness and startup. Minimum value is 1.
format: int32
type: integer
tcpSocket:
description: TCPSocket specifies an action involving a TCP port.
properties:
host:
description: 'Optional: Host name to connect to, defaults
to the pod IP.'
type: string
port:
anyOf:
- type: integer
- type: string
description: Number or name of the port to access on the container.
Number must be in the range 1 to 65535. Name must be an
IANA_SVC_NAME.
x-kubernetes-int-or-string: true
required:
- port
type: object
terminationGracePeriodSeconds:
description: Optional duration in seconds the pod needs to terminate
gracefully upon probe failure. The grace period is the duration
in seconds after the processes running in the pod are sent a
termination signal and the time when the processes are forcibly
halted with a kill signal. Set this value longer than the expected
cleanup time for your process. If this value is nil, the pod's
terminationGracePeriodSeconds will be used. Otherwise, this
value overrides the value provided by the pod spec. Value must
be non-negative integer. The value zero indicates stop immediately
via the kill signal (no opportunity to shut down). This is a
beta field and requires enabling ProbeTerminationGracePeriod
feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds
is used if unset.
format: int64
type: integer
timeoutSeconds:
description: 'Number of seconds after which the probe times out.
Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes'
format: int32
type: integer
type: object
version:
description: Version is the version of ShardingSphere-Proxy
type: string
required:
- port
- proxyConfigName
- replicas
- serviceType
- version
type: object
status:
description: ProxyStatus defines the observed state of ShardingSphereProxy
properties:
conditions:
description: Conditions The conditions array, the reason and message
fields
items:
properties:
lastUpdateTime:
format: date-time
type: string
status:
type: string
type:
type: string
required:
- status
- type
type: object
type: array
phase:
description: 'ShardingSphere-Proxy phase are a brief summary of the
ShardingSphere-Proxy life cycle There are two possible phase values:
Ready: ShardingSphere-Proxy can already provide external services
NotReady: ShardingSphere-Proxy cannot provide external services'
type: string
readyNodes:
description: ReadyNodes shows the number of replicas that ShardingSphere-Proxy
is running normally
format: int32
type: integer
required:
- conditions
- phase
- readyNodes
type: object
type: object
served: true
storage: true
subresources:
status: {}