Skip to content

Commit

Permalink
[cherry-pick] fix: sidecar log issues (#316)
Browse files Browse the repository at this point in the history
* remove sidecar log level validation.

* disable Remote Logging SampledFraction.
  • Loading branch information
cybwan authored and reaver-flomesh committed Jul 26, 2024
1 parent a6deec8 commit 628b43e
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 19 deletions.
3 changes: 1 addition & 2 deletions charts/fsm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -476,13 +476,12 @@ The following table lists the configurable parameters of the fsm chart and their
| fsm.tracing.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms[0].matchExpressions[1].values[3] | string | `"s390x"` | |
| fsm.tracing.enable | bool | `false` | Toggles Sidecar's tracing functionality on/off for all sidecar proxies in the mesh |
| fsm.tracing.endpoint | string | `"/api/v2/spans"` | Tracing collector's API path where the spans will be sent to |
| fsm.tracing.image | object | `{"name":"all-in-one","registry":"jaegertracing","tag":"latest"}` | Image used for tracing |
| fsm.tracing.image | object | `{"name":"all-in-one","registry":"jaegertracing","tag":"latest"}` | Sampled Fraction |
| fsm.tracing.image.name | string | `"all-in-one"` | Tracing image name |
| fsm.tracing.image.registry | string | `"jaegertracing"` | Registry for Tracing image |
| fsm.tracing.image.tag | string | `"latest"` | Tracing image tag |
| fsm.tracing.nodeSelector | object | `{}` | |
| fsm.tracing.port | int | `9411` | Port of the tracing collector service |
| fsm.tracing.sampledFraction | string | `"1.0"` | Sampled Fraction |
| fsm.tracing.tolerations | list | `[]` | Node tolerations applied to control plane pods. The specified tolerations allow pods to schedule onto nodes with matching taints. |
| fsm.trafficInterceptionMode | string | `"iptables"` | Traffic interception mode in the mesh |
| fsm.trustDomain | string | `"cluster.local"` | The trust domain to use as part of the common name when requesting new certificates. |
Expand Down
2 changes: 0 additions & 2 deletions charts/fsm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -545,8 +545,6 @@ fsm:
# -- Tracing collector's API path where the spans will be sent to
endpoint: "/api/v2/spans"
# -- Sampled Fraction
sampledFraction: "1.0"
# -- Image used for tracing
image:
# -- Registry for Tracing image
registry: jaegertracing
Expand Down
9 changes: 0 additions & 9 deletions cmd/fsm-bootstrap/crds/config.flomesh.io_meshconfigs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2213,15 +2213,6 @@ spec:
description: LogLevel defines the logging level for the sidecar's
logs. Non developers should generally never set this value.
In production environments the LogLevel should be set to error.
enum:
- trace
- debug
- info
- warn
- error
- fatal
- panic
- disabled
type: string
maxDataPlaneConnections:
description: MaxDataPlaneConnections defines the maximum allowed
Expand Down
1 change: 0 additions & 1 deletion pkg/apis/config/v1alpha3/mesh_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ type SidecarSpec struct {
// EnablePrivilegedInitContainer defines a boolean indicating whether the init container for a meshed pod should run as privileged.
EnablePrivilegedInitContainer bool `json:"enablePrivilegedInitContainer"`

// +kubebuilder:validation:Enum=trace;debug;info;warn;error;fatal;panic;disabled
// LogLevel defines the logging level for the sidecar's logs. Non developers should generally never set this value. In production environments the LogLevel should be set to error.
LogLevel string `json:"logLevel,omitempty"`

Expand Down
10 changes: 5 additions & 5 deletions pkg/sidecar/providers/pipy/repo/policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ func (p *PipyConf) setObservabilityTracing(enable bool, conf *configurator.Confi
func (p *PipyConf) setObservabilityRemoteLogging(enable bool, conf *configurator.Configurator) {
if enable {
p.Spec.Observability.RemoteLogging = &RemoteLoggingSpec{
Level: (*conf).GetRemoteLoggingLevel(),
Address: fmt.Sprintf("%s:%d", (*conf).GetRemoteLoggingHost(), (*conf).GetRemoteLoggingPort()),
Endpoint: (*conf).GetRemoteLoggingEndpoint(),
Authorization: (*conf).GetRemoteLoggingAuthorization(),
SampledFraction: fmt.Sprintf("%0.2f", (*conf).GetRemoteLoggingSampledFraction()),
Level: (*conf).GetRemoteLoggingLevel(),
Address: fmt.Sprintf("%s:%d", (*conf).GetRemoteLoggingHost(), (*conf).GetRemoteLoggingPort()),
Endpoint: (*conf).GetRemoteLoggingEndpoint(),
Authorization: (*conf).GetRemoteLoggingAuthorization(),
//SampledFraction: fmt.Sprintf("%0.2f", (*conf).GetRemoteLoggingSampledFraction()),
}
} else {
p.Spec.Observability.RemoteLogging = nil
Expand Down

0 comments on commit 628b43e

Please sign in to comment.