You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by mi...@apache.org on 2023/03/13 07:21:36 UTC

[shardingsphere-on-cloud] branch main updated: refactor(operator): update ComputeNode agent config. (#265)

This is an automated email from the ASF dual-hosted git repository.

miaoliyao pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/shardingsphere-on-cloud.git


The following commit(s) were added to refs/heads/main by this push:
     new c500401  refactor(operator): update ComputeNode agent config. (#265)
c500401 is described below

commit c500401936ea8faadbc37b9eb959d91b01984a36
Author: Xu-Wentao <cu...@yahoo.com>
AuthorDate: Mon Mar 13 15:21:31 2023 +0800

    refactor(operator): update ComputeNode agent config. (#265)
---
 .../shardingsphere.apache.org_computenodes.yaml    |  38 +-----
 .../api/v1alpha1/compute_node_types.go             |  28 +----
 .../api/v1alpha1/zz_generated.deepcopy.go          | 138 +++++++--------------
 3 files changed, 54 insertions(+), 150 deletions(-)

diff --git a/charts/apache-shardingsphere-operator-charts/crds/shardingsphere.apache.org_computenodes.yaml b/charts/apache-shardingsphere-operator-charts/crds/shardingsphere.apache.org_computenodes.yaml
index aee16b2..e39107e 100644
--- a/charts/apache-shardingsphere-operator-charts/crds/shardingsphere.apache.org_computenodes.yaml
+++ b/charts/apache-shardingsphere-operator-charts/crds/shardingsphere.apache.org_computenodes.yaml
@@ -82,7 +82,7 @@ spec:
                           logging:
                             description: PluginLogging defines the plugin for logging
                             properties:
-                              baseLogging:
+                              file:
                                 properties:
                                   props:
                                     additionalProperties:
@@ -114,21 +114,12 @@ spec:
                           tracing:
                             description: PluginTracing defines the plugin for tracing
                             properties:
-                              jaeger:
+                              openTracing:
                                 properties:
-                                  host:
-                                    type: string
-                                  port:
-                                    format: int32
-                                    type: integer
                                   props:
                                     additionalProperties:
                                       type: string
                                     type: object
-                                    x-kubernetes-preserve-unknown-fields: true
-                                required:
-                                  - host
-                                  - port
                                 type: object
                               openTelemetry:
                                 properties:
@@ -136,31 +127,6 @@ spec:
                                     additionalProperties:
                                       type: string
                                     type: object
-                                    x-kubernetes-preserve-unknown-fields: true
-                                type: object
-                              skyWalking:
-                                properties:
-                                  props:
-                                    additionalProperties:
-                                      type: string
-                                    type: object
-                                    x-kubernetes-preserve-unknown-fields: true
-                                type: object
-                              zipkin:
-                                properties:
-                                  host:
-                                    type: string
-                                  port:
-                                    format: int32
-                                    type: integer
-                                  props:
-                                    additionalProperties:
-                                      type: string
-                                    type: object
-                                    x-kubernetes-preserve-unknown-fields: true
-                                required:
-                                  - host
-                                  - port
                                 type: object
                             type: object
                         type: object
diff --git a/shardingsphere-operator/api/v1alpha1/compute_node_types.go b/shardingsphere-operator/api/v1alpha1/compute_node_types.go
index ec4879a..7e9a550 100644
--- a/shardingsphere-operator/api/v1alpha1/compute_node_types.go
+++ b/shardingsphere-operator/api/v1alpha1/compute_node_types.go
@@ -123,13 +123,13 @@ type LogbackConfig string
 // +kubebuilder:pruning:PreserveUnknownFields
 type Properties map[string]string
 
-type BaseLogging struct {
+type LoggingFile struct {
 	Props Properties `json:"props,omitempty"`
 }
 
 // PluginLogging defines the plugin for logging
 type PluginLogging struct {
-	BaseLogging BaseLogging `json:"baseLogging,omitempty" yaml:"BaseLogging"`
+	File LoggingFile `json:"file,omitempty" yaml:"File"`
 }
 
 type Prometheus struct {
@@ -143,36 +143,20 @@ type PluginMetrics struct {
 	Prometheus Prometheus `json:"prometheus,omitempty" yaml:"Prometheus"`
 }
 
-type JaegerTracing struct {
-	Host  string     `json:"host"`
-	Port  int32      `json:"port"`
-	Props Properties `json:"props,omitempty"`
-}
-
-type ZipkinTracing struct {
-	Host  string     `json:"host"`
-	Port  int32      `json:"port"`
-	Props Properties `json:"props,omitempty"`
-}
-
-type SkyWalkingTracing struct {
+type OpenTelemetry struct {
 	Props Properties `json:"props,omitempty"`
 }
 
-type OpenTelemetryTracing struct {
+type OpenTracing struct {
 	Props Properties `json:"props,omitempty"`
 }
 
 // PluginTracing defines the plugin for tracing
 type PluginTracing struct {
 	// +optional
-	Jaeger JaegerTracing `json:"jaeger,omitempty" yaml:"Jaeger"`
-	// +optional
-	Zipkin ZipkinTracing `json:"zipkin,omitempty" yaml:"Zipkin"`
-	// +optional
-	SkyWalking SkyWalkingTracing `json:"skyWalking,omitempty" yaml:"SkyWalking"`
+	OpenTracing OpenTracing `json:"openTracing,omitempty" yaml:"OpenTracing"`
 	// +optional
-	OpenTelemetry OpenTelemetryTracing `json:"openTelemetry,omitempty" yaml:"OpenTelemetry"`
+	OpenTelemetry OpenTelemetry `json:"openTelemetry,omitempty" yaml:"OpenTelemetry"`
 }
 
 // AgentPlugin defines a set of plugins for ShardingSphere Agent
diff --git a/shardingsphere-operator/api/v1alpha1/zz_generated.deepcopy.go b/shardingsphere-operator/api/v1alpha1/zz_generated.deepcopy.go
index 2bdb71c..d4987e6 100644
--- a/shardingsphere-operator/api/v1alpha1/zz_generated.deepcopy.go
+++ b/shardingsphere-operator/api/v1alpha1/zz_generated.deepcopy.go
@@ -121,28 +121,6 @@ func (in *AutomaticScaling) DeepCopy() *AutomaticScaling {
 	return out
 }
 
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *BaseLogging) DeepCopyInto(out *BaseLogging) {
-	*out = *in
-	if in.Props != nil {
-		in, out := &in.Props, &out.Props
-		*out = make(Properties, len(*in))
-		for key, val := range *in {
-			(*out)[key] = val
-		}
-	}
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BaseLogging.
-func (in *BaseLogging) DeepCopy() *BaseLogging {
-	if in == nil {
-		return nil
-	}
-	out := new(BaseLogging)
-	in.DeepCopyInto(out)
-	return out
-}
-
 // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 func (in *BootstrapConfig) DeepCopyInto(out *BootstrapConfig) {
 	*out = *in
@@ -464,45 +442,45 @@ func (in Conditions) DeepCopy() Conditions {
 }
 
 // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *JaegerTracing) DeepCopyInto(out *JaegerTracing) {
+func (in *LoadBalancerStatus) DeepCopyInto(out *LoadBalancerStatus) {
 	*out = *in
-	if in.Props != nil {
-		in, out := &in.Props, &out.Props
-		*out = make(Properties, len(*in))
-		for key, val := range *in {
-			(*out)[key] = val
+	if in.Ingress != nil {
+		in, out := &in.Ingress, &out.Ingress
+		*out = make([]v1.LoadBalancerIngress, len(*in))
+		for i := range *in {
+			(*in)[i].DeepCopyInto(&(*out)[i])
 		}
 	}
 }
 
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JaegerTracing.
-func (in *JaegerTracing) DeepCopy() *JaegerTracing {
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoadBalancerStatus.
+func (in *LoadBalancerStatus) DeepCopy() *LoadBalancerStatus {
 	if in == nil {
 		return nil
 	}
-	out := new(JaegerTracing)
+	out := new(LoadBalancerStatus)
 	in.DeepCopyInto(out)
 	return out
 }
 
 // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *LoadBalancerStatus) DeepCopyInto(out *LoadBalancerStatus) {
+func (in *LoggingFile) DeepCopyInto(out *LoggingFile) {
 	*out = *in
-	if in.Ingress != nil {
-		in, out := &in.Ingress, &out.Ingress
-		*out = make([]v1.LoadBalancerIngress, len(*in))
-		for i := range *in {
-			(*in)[i].DeepCopyInto(&(*out)[i])
+	if in.Props != nil {
+		in, out := &in.Props, &out.Props
+		*out = make(Properties, len(*in))
+		for key, val := range *in {
+			(*out)[key] = val
 		}
 	}
 }
 
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoadBalancerStatus.
-func (in *LoadBalancerStatus) DeepCopy() *LoadBalancerStatus {
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoggingFile.
+func (in *LoggingFile) DeepCopy() *LoggingFile {
 	if in == nil {
 		return nil
 	}
-	out := new(LoadBalancerStatus)
+	out := new(LoggingFile)
 	in.DeepCopyInto(out)
 	return out
 }
@@ -523,7 +501,29 @@ func (in *MySQLDriver) DeepCopy() *MySQLDriver {
 }
 
 // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *OpenTelemetryTracing) DeepCopyInto(out *OpenTelemetryTracing) {
+func (in *OpenTelemetry) DeepCopyInto(out *OpenTelemetry) {
+	*out = *in
+	if in.Props != nil {
+		in, out := &in.Props, &out.Props
+		*out = make(Properties, len(*in))
+		for key, val := range *in {
+			(*out)[key] = val
+		}
+	}
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetry.
+func (in *OpenTelemetry) DeepCopy() *OpenTelemetry {
+	if in == nil {
+		return nil
+	}
+	out := new(OpenTelemetry)
+	in.DeepCopyInto(out)
+	return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *OpenTracing) DeepCopyInto(out *OpenTracing) {
 	*out = *in
 	if in.Props != nil {
 		in, out := &in.Props, &out.Props
@@ -534,12 +534,12 @@ func (in *OpenTelemetryTracing) DeepCopyInto(out *OpenTelemetryTracing) {
 	}
 }
 
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryTracing.
-func (in *OpenTelemetryTracing) DeepCopy() *OpenTelemetryTracing {
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTracing.
+func (in *OpenTracing) DeepCopy() *OpenTracing {
 	if in == nil {
 		return nil
 	}
-	out := new(OpenTelemetryTracing)
+	out := new(OpenTracing)
 	in.DeepCopyInto(out)
 	return out
 }
@@ -547,7 +547,7 @@ func (in *OpenTelemetryTracing) DeepCopy() *OpenTelemetryTracing {
 // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 func (in *PluginLogging) DeepCopyInto(out *PluginLogging) {
 	*out = *in
-	in.BaseLogging.DeepCopyInto(&out.BaseLogging)
+	in.File.DeepCopyInto(&out.File)
 }
 
 // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PluginLogging.
@@ -579,9 +579,7 @@ func (in *PluginMetrics) DeepCopy() *PluginMetrics {
 // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 func (in *PluginTracing) DeepCopyInto(out *PluginTracing) {
 	*out = *in
-	in.Jaeger.DeepCopyInto(&out.Jaeger)
-	in.Zipkin.DeepCopyInto(&out.Zipkin)
-	in.SkyWalking.DeepCopyInto(&out.SkyWalking)
+	in.OpenTracing.DeepCopyInto(&out.OpenTracing)
 	in.OpenTelemetry.DeepCopyInto(&out.OpenTelemetry)
 }
 
@@ -1036,28 +1034,6 @@ func (in *ShardingSphereProxyServerConfigList) DeepCopyObject() runtime.Object {
 	return nil
 }
 
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *SkyWalkingTracing) DeepCopyInto(out *SkyWalkingTracing) {
-	*out = *in
-	if in.Props != nil {
-		in, out := &in.Props, &out.Props
-		*out = make(Properties, len(*in))
-		for key, val := range *in {
-			(*out)[key] = val
-		}
-	}
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SkyWalkingTracing.
-func (in *SkyWalkingTracing) DeepCopy() *SkyWalkingTracing {
-	if in == nil {
-		return nil
-	}
-	out := new(SkyWalkingTracing)
-	in.DeepCopyInto(out)
-	return out
-}
-
 // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
 func (in *StorageNodeConnector) DeepCopyInto(out *StorageNodeConnector) {
 	*out = *in
@@ -1087,25 +1063,3 @@ func (in *User) DeepCopy() *User {
 	in.DeepCopyInto(out)
 	return out
 }
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ZipkinTracing) DeepCopyInto(out *ZipkinTracing) {
-	*out = *in
-	if in.Props != nil {
-		in, out := &in.Props, &out.Props
-		*out = make(Properties, len(*in))
-		for key, val := range *in {
-			(*out)[key] = val
-		}
-	}
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ZipkinTracing.
-func (in *ZipkinTracing) DeepCopy() *ZipkinTracing {
-	if in == nil {
-		return nil
-	}
-	out := new(ZipkinTracing)
-	in.DeepCopyInto(out)
-	return out
-}