Skip to content

Commit

Permalink
refactor(domain): refactor domain sphere-ex.com to apache.org
Browse files Browse the repository at this point in the history
Signed-off-by: windghoul <[email protected]>
  • Loading branch information
windghoul committed Aug 24, 2022
1 parent 704d0b6 commit b8f28e6
Show file tree
Hide file tree
Showing 18 changed files with 55 additions and 56 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ body:
description: Bug report without environment information will be ignored or closed.
value: |
- Contents of your values.yaml file,if your helm deployment process goes wrong.
- Contents of your CRD resource file. Include proxy.shardingsphere.sphere-ex.com/v1alpha1 and proxyconfig.shardingsphere.sphere-ex.com/v1alpha1
- Contents of your CRD resource file. Include proxy.shardingsphere.apache.org/v1alpha1 and proxyconfig.shardingsphere.apache.org/v1alpha1
- Kubernetes distro (e.g. RKE/K3s/EKS/OpenShift) and version
validations:
required: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# limitations under the License.
#

apiVersion: shardingsphere.sphere-ex.com/v1alpha1
apiVersion: shardingsphere.apache.org/v1alpha1
kind: ShardingSphereProxy
metadata:
name: {{ template "common.names.fullname" . }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# limitations under the License.
#

apiVersion: shardingsphere.sphere-ex.com/v1alpha1
apiVersion: shardingsphere.apache.org/v1alpha1
kind: ShardingSphereProxyServerConfig
metadata:
name: {{ printf "%s-configuration" (include "common.names.fullname" .) }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.8.0
creationTimestamp: null
name: shardingsphereproxies.shardingsphere.sphere-ex.com
name: shardingsphereproxies.shardingsphere.apache.org
spec:
group: shardingsphere.sphere-ex.com
group: shardingsphere.apache.org
names:
kind: ShardingSphereProxy
listKind: ShardingSphereProxyList
Expand Down Expand Up @@ -117,7 +117,7 @@ spec:
type: integer
grpc:
description: GRPC specifies an action involving a GRPC port. This
is an alpha field and requires enabling GRPCContainerProbe feature
is a beta field and requires enabling GRPCContainerProbe feature
gate.
properties:
port:
Expand Down Expand Up @@ -280,7 +280,7 @@ spec:
type: integer
grpc:
description: GRPC specifies an action involving a GRPC port. This
is an alpha field and requires enabling GRPCContainerProbe feature
is a beta field and requires enabling GRPCContainerProbe feature
gate.
properties:
port:
Expand Down Expand Up @@ -480,7 +480,7 @@ spec:
type: integer
grpc:
description: GRPC specifies an action involving a GRPC port. This
is an alpha field and requires enabling GRPCContainerProbe feature
is a beta field and requires enabling GRPCContainerProbe feature
gate.
properties:
port:
Expand Down Expand Up @@ -620,8 +620,8 @@ spec:
true | pod started successfully but not ready| | Started |
false | pod started failed| | Ready | true |
The pod is ready and can provide external services| | Unknown |
true | ShardingSphere-Proxy failed to start
correctly due to some problems |
true | ShardingSphere-Proxy failed to start correctly due
to some problems |
properties:
lastUpdateTime:
format: date-time
Expand All @@ -636,11 +636,10 @@ spec:
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'
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.8.0
creationTimestamp: null
name: shardingsphereproxyserverconfigs.shardingsphere.sphere-ex.com
name: shardingsphereproxyserverconfigs.shardingsphere.apache.org
spec:
group: shardingsphere.sphere-ex.com
group: shardingsphere.apache.org
names:
kind: ShardingSphereProxyServerConfig
listKind: ShardingSphereProxyServerConfigList
Expand Down
12 changes: 6 additions & 6 deletions charts/shardingsphere-operator/templates/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ rules:
- update
- watch
- apiGroups:
- shardingsphere.sphere-ex.com
- shardingsphere.apache.org
resources:
- shardingsphereproxies
verbs:
Expand All @@ -128,21 +128,21 @@ rules:
- update
- watch
- apiGroups:
- shardingsphere.sphere-ex.com
- shardingsphere.apache.org
resources:
- shardingsphereproxies/finalizers
verbs:
- update
- apiGroups:
- shardingsphere.sphere-ex.com
- shardingsphere.apache.org
resources:
- shardingsphereproxies/status
verbs:
- get
- patch
- update
- apiGroups:
- shardingsphere.sphere-ex.com
- shardingsphere.apache.org
resources:
- shardingsphereproxyserverconfigs
verbs:
Expand All @@ -154,13 +154,13 @@ rules:
- update
- watch
- apiGroups:
- shardingsphere.sphere-ex.com
- shardingsphere.apache.org
resources:
- shardingsphereproxyserverconfigs/finalizers
verbs:
- update
- apiGroups:
- shardingsphere.sphere-ex.com
- shardingsphere.apache.org
resources:
- shardingsphereproxyserverconfigs/status
verbs:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
apiVersion: apiregistration.k8s.io/v1
kind: APIService
metadata:
name: v1alpha1.admission.shardingsphere.sphere-ex.com
name: v1alpha1.admission.shardingsphere.apache.org
spec:
insecureSkipTLSVerify: true
group: admission.shardingsphere.sphere-ex.com
group: admission.shardingsphere.apache.org
groupPriorityMinimum: 1000
versionPriority: 5
service:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ webhooks:
service:
name: kubernetes
namespace: default
path: /apis/admission.shardingsphere.sphere-ex.com/v1alpha1/mutate-shardingsphere-sphere-ex-com-v1alpha1-shardingsphereproxy
path: /apis/admission.shardingsphere.apache.org/v1alpha1/mutate-shardingsphere-apache-org-v1alpha1-shardingsphereproxy
failurePolicy: Fail
name: mproxy.shardingsphere.sphere-ex.com
name: mproxy.shardingsphere.apache.org
rules:
- apiGroups:
- shardingsphere.sphere-ex.com
- shardingsphere.apache.org
apiVersions:
- v1alpha1
operations:
Expand All @@ -53,12 +53,12 @@ webhooks:
service:
name: kubernetes
namespace: default
path: /apis/admission.shardingsphere.sphere-ex.com/v1alpha1/validate-shardingsphere-sphere-ex-com-v1alpha1-shardingsphereproxy
path: /apis/admission.shardingsphere.apache.org/v1alpha1/validate-shardingsphere-apache-org-v1alpha1-shardingsphereproxy
failurePolicy: Fail
name: vproxy.shardingsphere.sphere-ex.com
name: vproxy.shardingsphere.apache.org
rules:
- apiGroups:
- shardingsphere.sphere-ex.com
- shardingsphere.apache.org
apiVersions:
- v1alpha1
operations:
Expand Down
5 changes: 3 additions & 2 deletions doc/shardingsphere-operator.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,15 @@ kubectl create ns shardingsphere
helm install shardingsphere-cluster shardingsphere-cluster -n shardingsphere
```

## Online Install ShardingSphere-Proxy cluster && ShardingSphere-Operator
## Online Install ShardingSphere-Proxy cluster && ShardingSphere-Operator (temporarily unavailable)
```shell
helm repo add shardingspherecloud https://sphereex.github.io/shardingsphere-on-cloud/
kubectl create ns shardingsphere-operator
helm install shardingsphere-operator shardingspherecloud/shardingsphere-operator -n shardingsphere-operator
kubectl create ns shardingsphere
helm install shardingsphere-cluster shardingspherecloud/shardingsphere-cluster -n shardingsphere
```

## Parameters
### ShardingSphere Operator Parameters

Expand Down Expand Up @@ -275,5 +276,5 @@ zookeeper:
```shell
helm uninstall shardingsphere-cluster -n shardingsphere
helm uninstall shardingsphere-operator -n shardingsphere-operator
kubectl delete crd shardingsphereproxies.shardingsphere.sphere-ex.com shardingsphereproxyserverconfigs.shardingsphere.sphere-ex.com
kubectl delete crd shardingsphereproxies.shardingsphere.apache.org shardingsphereproxyserverconfigs.shardingsphere.apache.org
```
12 changes: 6 additions & 6 deletions shardingsphere-operator/PROJECT
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
domain: sphere-ex.com
domain: apache.org
layout:
- go.kubebuilder.io/v3
projectName: shardingsphere-operator
repo: sphere-ex.com/shardingsphere-operator
repo: apache.org/shardingsphere-operator
resources:
- api:
crdVersion: v1
namespaced: true
controller: true
domain: sphere-ex.com
domain: apache.org
group: shardingsphere
kind: ShardingSphereProxy
path: sphere-ex.com/shardingsphere-operator/api/v1alpha1
path: apache.org/shardingsphere-operator/api/v1alpha1
version: v1alpha1
webhooks:
defaulting: true
Expand All @@ -21,9 +21,9 @@ resources:
crdVersion: v1
namespaced: true
controller: true
domain: sphere-ex.com
domain: apache.org
group: shardingsphere
kind: ShardingSphereProxyServerConfig
path: sphere-ex.com/shardingsphere-operator/api/v1alpha1
path: apache.org/shardingsphere-operator/api/v1alpha1
version: v1alpha1
version: "3"
4 changes: 2 additions & 2 deletions shardingsphere-operator/api/v1alpha1/groupversion_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

// Package v1alpha1 contains API Schema definitions for the shardingsphere v1alpha1 API group
//+kubebuilder:object:generate=true
//+groupName=shardingsphere.sphere-ex.com
//+groupName=shardingsphere.apache.org
package v1alpha1

import (
Expand All @@ -27,7 +27,7 @@ import (

var (
// GroupVersion is group version used to register these objects
GroupVersion = schema.GroupVersion{Group: "shardingsphere.sphere-ex.com", Version: "v1alpha1"}
GroupVersion = schema.GroupVersion{Group: "shardingsphere.apache.org", Version: "v1alpha1"}

// SchemeBuilder is used to add go types to the GroupVersionKind scheme
SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}
Expand Down
8 changes: 4 additions & 4 deletions shardingsphere-operator/api/v1alpha1/proxy_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func (r *ShardingSphereProxy) SetupWebhookWithManager(mgr ctrl.Manager) error {
Complete()
}

//+kubebuilder:webhook:path=/apis/admission.shardingsphere.sphere-ex.com/v1alpha1/mutate-shardingsphere-sphere-ex-com-v1alpha1-proxy,mutating=true,failurePolicy=fail,sideEffects=None,groups=shardingsphere.sphere-ex.com,resources=shardingsphereproxies,verbs=create;update,versions=v1alpha1,name=mproxy.kb.io,admissionReviewVersions=v1
//+kubebuilder:webhook:path=/apis/admission.shardingsphere.apache.org/v1alpha1/mutate-shardingsphere-sphere-ex-com-v1alpha1-proxy,mutating=true,failurePolicy=fail,sideEffects=None,groups=shardingsphere.apache.org,resources=shardingsphereproxies,verbs=create;update,versions=v1alpha1,name=mproxy.kb.io,admissionReviewVersions=v1

var _ webhook.Defaulter = &ShardingSphereProxy{}

Expand Down Expand Up @@ -100,7 +100,7 @@ func (r *ShardingSphereProxy) Default() {
}
}

// +kubebuilder:webhook:path=/apis/admission.shardingsphere.sphere-ex.com/v1alpha1/validate-shardingsphere-sphere-ex-com-v1alpha1-proxy,mutating=false,failurePolicy=fail,sideEffects=None,groups=shardingsphere.sphere-ex.com,resources=proxies,verbs=create;update,versions=v1alpha1,name=vproxy.kb.io,admissionReviewVersions=v1
// +kubebuilder:webhook:path=/apis/admission.shardingsphere.apache.org/v1alpha1/validate-shardingsphere-sphere-ex-com-v1alpha1-proxy,mutating=false,failurePolicy=fail,sideEffects=None,groups=shardingsphere.apache.org,resources=proxies,verbs=create;update,versions=v1alpha1,name=vproxy.kb.io,admissionReviewVersions=v1

var _ webhook.Validator = &ShardingSphereProxy{}

Expand Down Expand Up @@ -142,7 +142,7 @@ func (r *ShardingSphereProxy) validateService() error {
if r.Spec.ServiceType.NodePort != 0 && r.Spec.ServiceType.Type != v1.ServiceTypeNodePort {
allErrs = append(allErrs, field.Invalid(field.NewPath("spec").Child("serviceType"), r.Spec.ServiceType, errors.New("nodePort: Forbidden: may not be used when `type` is 'ClusterIP'").Error()))
return apierrors.NewInvalid(schema.GroupKind{
Group: "shardingsphere.sphere-ex.com",
Group: "shardingsphere.apache.org",
Kind: "ShardingSphereProxy",
}, r.Name, allErrs)
}
Expand All @@ -154,7 +154,7 @@ func (r *ShardingSphereProxy) validateInstance() error {
if r.Spec.AutomaticScaling != nil && r.Spec.AutomaticScaling.MaxInstance < 1 {
allErrs = append(allErrs, field.Invalid(field.NewPath("spec").Child("MaxInstance"), r.Spec.ServiceType, errors.New("If automatic scaling is enabled, the number of instances must be filled in.").Error()))
return apierrors.NewInvalid(schema.GroupKind{
Group: "shardingsphere.sphere-ex.com",
Group: "shardingsphere.apache.org",
Kind: "ShardingSphereProxy",
}, r.Name, allErrs)
}
Expand Down
4 changes: 2 additions & 2 deletions shardingsphere-operator/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ module github.com/apache/shardingsphere-on-cloud/shardingsphere-operator
go 1.18

require (
github.com/onsi/ginkgo v1.16.5
github.com/onsi/gomega v1.20.0
github.com/pkg/errors v0.9.1
go.uber.org/zap v1.22.0
gopkg.in/yaml.v2 v2.4.0
Expand Down Expand Up @@ -52,6 +50,8 @@ require (
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/nxadm/tail v1.4.8 // indirect
github.com/onsi/ginkgo v1.16.5 // indirect
github.com/onsi/gomega v1.20.0 // indirect
github.com/prometheus/client_golang v1.12.1 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.32.1 // indirect
Expand Down
1 change: 0 additions & 1 deletion shardingsphere-operator/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,6 @@ github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108
github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY=
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
github.com/onsi/ginkgo/v2 v2.1.4 h1:GNapqRSid3zijZ9H77KrgVG4/8KqiyRsxcSxe+7ApXY=
github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
Expand Down
2 changes: 1 addition & 1 deletion shardingsphere-operator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func main() {
Port: webhookPort,
HealthProbeBindAddress: probeAddr,
LeaderElection: enableLeaderElection,
LeaderElectionID: "0e5175ce.sphere-ex.com",
LeaderElectionID: "0e5175ce.apache.org",
CertDir: "/etc/operator/certs",
})
if err != nil {
Expand Down
6 changes: 3 additions & 3 deletions shardingsphere-operator/pkg/controllers/proxy_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ type ProxyReconciler struct {
Scheme *runtime.Scheme
}

//+kubebuilder:rbac:groups=shardingsphere.sphere-ex.com,resources=proxies,verbs=get;list;watch;create;update;patch;delete
//+kubebuilder:rbac:groups=shardingsphere.sphere-ex.com,resources=proxies/status,verbs=get;update;patch
//+kubebuilder:rbac:groups=shardingsphere.sphere-ex.com,resources=proxies/finalizers,verbs=update
//+kubebuilder:rbac:groups=shardingsphere.apache.org,resources=proxies,verbs=get;list;watch;create;update;patch;delete
//+kubebuilder:rbac:groups=shardingsphere.apache.org,resources=proxies/status,verbs=get;update;patch
//+kubebuilder:rbac:groups=shardingsphere.apache.org,resources=proxies/finalizers,verbs=update
//+kubebuilder:rbac:groups=apps,resources=deployments,verbs=get;list;watch;create;update;patch;delete
//+kubebuilder:rbac:groups=apps,resources=deployment/status,verbs=get;list
//+kubebuilder:rbac:groups="",resources=pods,verbs=get;list;watch;create;update;patch;delete
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ type ProxyConfigReconciler struct {
Scheme *runtime.Scheme
}

//+kubebuilder:rbac:groups=shardingsphere.sphere-ex.com,resources=proxyconfigs,verbs=get;list;watch;create;update;patch;delete
//+kubebuilder:rbac:groups=shardingsphere.sphere-ex.com,resources=proxyconfigs/status,verbs=get;update;patch
//+kubebuilder:rbac:groups=shardingsphere.sphere-ex.com,resources=proxyconfigs/finalizers,verbs=update
//+kubebuilder:rbac:groups=shardingsphere.apache.org,resources=proxyconfigs,verbs=get;list;watch;create;update;patch;delete
//+kubebuilder:rbac:groups=shardingsphere.apache.org,resources=proxyconfigs/status,verbs=get;update;patch
//+kubebuilder:rbac:groups=shardingsphere.apache.org,resources=proxyconfigs/finalizers,verbs=update
//+kubebuilder:rbac:groups="",resources=configmap,verbs=get;list;watch;create;update;patch;delete

// Reconcile is part of the main kubernetes reconciliation loop which aims to
Expand Down
2 changes: 1 addition & 1 deletion shardingsphere-operator/pkg/webhook/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import (
var log = logf.Log.WithName("builder")

// Do additional hacks for apiService
const apiPath = "/apis/admission.shardingsphere.sphere-ex.com/v1alpha1"
const apiPath = "/apis/admission.shardingsphere.apache.org/v1alpha1"

// WebhookBuilder builds a Webhook.
type WebhookBuilder struct {
Expand Down

0 comments on commit b8f28e6

Please sign in to comment.