Skip to content

Commit

Permalink
chore: update examples and operator charts (#420)
Browse files Browse the repository at this point in the history
* chore: rename example crds

Signed-off-by: mlycore <[email protected]>

* chore: rename chaos crd examples

Signed-off-by: mlycore <[email protected]>

* chore: update crds yaml in operator charts

Signed-off-by: mlycore <[email protected]>

* chore: update examples of computenode

Signed-off-by: mlycore <[email protected]>

* docs: update default replicas of operator in docs

Signed-off-by: mlycore <[email protected]>

* chore: remove computenode and shardingsphereproxy crd

Signed-off-by: mlycore <[email protected]>

* fix: fix license header

Signed-off-by: mlycore <[email protected]>

* fix: fix operator it

Signed-off-by: mlycore <[email protected]>

* fix: fix operator it

Signed-off-by: mlycore <[email protected]>

* chore: update operator it

Signed-off-by: mlycore <[email protected]>

* chore: update operator it

Signed-off-by: mlycore <[email protected]>

* chore: update example

Signed-off-by: mlycore <[email protected]>

* fix: fix operator

Signed-off-by: mlycore <[email protected]>

* chore: update operator it

Signed-off-by: mlycore <[email protected]>

* chore: enable computenode in operator it

Signed-off-by: mlycore <[email protected]>

* chore: add kubernetes crs for operator it

Signed-off-by: mlycore <[email protected]>

---------

Signed-off-by: mlycore <[email protected]>
  • Loading branch information
mlycore authored Jun 20, 2023
1 parent 6d3a847 commit e950ee3
Show file tree
Hide file tree
Showing 22 changed files with 602 additions and 405 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ spec:
type: ZooKeeper
props:
timeToLiveSeconds: "600"
server-lists: ${PLEASE_REPLACE_THIS_WITH_YOUR_ZOOKEEPER_SERVICE}
server-lists: ${PLEASE_REPLACE_THIS_WITH_YOUR_ZOOKEEPER_SERVICE}
retryIntervalMilliseconds: "500"
operationTimeoutMilliseconds: "5000"
namespace: governance_ds
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/operator-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,17 @@ jobs:
cd charts/apache-shardingsphere-operator-charts/
helm dependency build
cd ../
helm install shardingsphere-operator apache-shardingsphere-operator-charts -n shardingsphere-operator --set replicaCount=1
helm install shardingsphere-operator apache-shardingsphere-operator-charts -n shardingsphere-operator --set replicaCount=1 --set operator.featureGates.computeNode=true
sleep 60
kubectl wait --timeout=120s --for=condition=Ready --all pod -n shardingsphere-operator
kubectl get pod -n shardingsphere-operator --show-labels
kubectl port-forward svc/shardingsphere-operator-shardingsphere-proxy 3307:3307 -n shardingsphere-operator &
- name: "Install ComputeNode"
run: |
sed -i 's#${PLEASE_REPLACE_THIS_WITH_YOUR_ZOOKEEPER_SERVICE}#shardingsphere-operator-zookeeper.shardingsphere-operator:2181#g' .github/kubernetes/shardingsphere-computenode-mysql-cluster.yaml
kubectl apply -f .github/kubernetes/shardingsphere-computenode-mysql-cluster.yaml
kubectl wait --timeout=120s --for=condition=Ready --all pod -n default
kubectl get pod -n default --show-labels
kubectl port-forward svc/foo 3307:3307 &
- name: "Prepare MySQL for ShardingSphere Proxy test"
run: |
set -x
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You 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.
#
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You 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.
#
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
Expand All @@ -32,11 +32,11 @@ spec:
scope: Namespaced
versions:
- additionalPrinterColumns:
- jsonPath: .status.readyInstances
name: ReadyInstances
type: integer
- jsonPath: .status.ready
name: Ready
type: string
- jsonPath: .status.phase
name: Phase
name: Status
type: string
- jsonPath: .status.loadBalancer.clusterIP
name: Cluster-IP
Expand Down Expand Up @@ -114,19 +114,21 @@ spec:
tracing:
description: PluginTracing defines the plugin for tracing
properties:
openTracing:
openTelemetry:
properties:
props:
additionalProperties:
type: string
type: object
x-kubernetes-preserve-unknown-fields: true
type: object
openTelemetry:
openTracing:
properties:
props:
additionalProperties:
type: string
type: object
x-kubernetes-preserve-unknown-fields: true
type: object
type: object
type: object
Expand All @@ -139,17 +141,16 @@ spec:
Proxy
properties:
authority:
description: ComputeNodeAuth is used to set up initial user
to login compute node, and authority data of storage node.
description: ComputeNodeAuthority is used to set up initial
user to login compute node, and authority data of storage
node.
properties:
privilege:
description: ComputeNodePrivilege for storage node, the
default value is ALL_PERMITTED
properties:
type:
type: string
required:
- type
type: object
users:
items:
Expand All @@ -167,8 +168,6 @@ spec:
- user
type: object
type: array
required:
- users
type: object
mode:
description: ComputeNodeServerMode is the mode for ShardingSphere
Expand All @@ -181,8 +180,7 @@ spec:
props:
additionalProperties:
type: string
description: properties of metadata repository Props
ComputeNodeClusterProps `json:"props,omitempty"`
description: properties of metadata repository
type: object
x-kubernetes-preserve-unknown-fields: true
type:
Expand All @@ -191,23 +189,15 @@ spec:
- ZooKeeper
- Etcd
type: string
required:
- type
type: object
type:
type: string
required:
- type
type: object
props:
additionalProperties:
type: string
description: Props *ComputeNodeProps `json:"props,omitempty"`
type: object
x-kubernetes-preserve-unknown-fields: true
required:
- authority
- mode
type: object
type: object
env:
Expand Down Expand Up @@ -824,6 +814,27 @@ spec:
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:
Expand Down Expand Up @@ -928,16 +939,11 @@ spec:
description: Conditions The conditions array, the reason and message
fields
items:
description: ComputeNodeCondition | **phase** | **condition** |
**descriptions**| | ------------- | ---------- | ----------------------------------------------------
| | NotReady | Deployed | pods are deployed but are not
created or currently pending| | NotReady | Started | pods
are started but not satisfy ready requirements| | Ready |
Ready | minimum pods satisfy ready requirements| | NotReady |
Unknown | can not locate the status of pods | | NotReady |
Failed | ShardingSphere-Proxy failed to start correctly due
to some problems|
description: ComputeNodeCondition defines a condition template
properties:
lastTransitionTime:
format: date-time
type: string
lastUpdateTime:
format: date-time
type: string
Expand All @@ -946,8 +952,12 @@ spec:
reason:
type: string
status:
description: ConditionStatus represents the validation status
of a condition
type: string
type:
description: ComputeNodeConditioType represents the type of
a compute node condition during the startup process of ShardingSphere-Proxy
type: string
required:
- message
Expand Down Expand Up @@ -1027,11 +1037,8 @@ spec:
Ready: ShardingSphere-Proxy can already provide external services
NotReady: ShardingSphere-Proxy cannot provide external services'
type: string
readyInstances:
description: ReadyInstances shows the number of replicas that ShardingSphere-Proxy
is running normally
format: int32
type: integer
ready:
type: string
replicas:
format: int32
type: integer
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You 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.
#
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You 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.
#

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
Expand Down Expand Up @@ -252,7 +253,7 @@ spec:
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"'
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'
Expand Down Expand Up @@ -884,6 +885,27 @@ spec:
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:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You 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.
#
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You 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.
#
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
Expand Down
Loading

0 comments on commit e950ee3

Please sign in to comment.