-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[sn-platform][sn-platform-slim]feat: add logConfig support on sn-plat…
…form & sn-platform slim charts (#1067) * feat: add logConfig support on snp slim chart Signed-off-by: ericsyh <[email protected]> * feat: add logConfig support on charts Signed-off-by: ericsyh <[email protected]> * add examples Signed-off-by: ericsyh <[email protected]> * update examples Signed-off-by: ericsyh <[email protected]> * fix lint ci Signed-off-by: ericsyh <[email protected]> * Update examples/sn-platform/logConfig.yaml * revert my change * Update charts/sn-platform/values.yaml Co-authored-by: labuladong <[email protected]> * Update charts/sn-platform/values.yaml Co-authored-by: labuladong <[email protected]> * fix spaces Signed-off-by: ericsyh <[email protected]> --------- Signed-off-by: ericsyh <[email protected]> Co-authored-by: labuladong <[email protected]>
- Loading branch information
1 parent
db093dc
commit 8682018
Showing
13 changed files
with
264 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# | ||
# 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: pulsar.streamnative.io/v1alpha1 | ||
kind: PulsarBroker | ||
metadata: | ||
name: brokers | ||
namespace: default | ||
spec: | ||
image: streamnative/sn-platform-slim:2.10.4.3 | ||
# The field logConfig can be used to change the log level and log format of pods. | ||
# The logConfig field is optional. If it is not specified, the component will use the default log configuration /pulsar/conf/log4j2.yaml. | ||
# If it is specified will dynamically change the log level and log format of the component by changing the CR. | ||
logConfig: | ||
# The level field can be used to change the log level of the component. The value can be one of TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF. | ||
level: DEBUG | ||
# The format field can be used to change the log format of the component. The value can be one of json, text. | ||
format: json | ||
# The template field can totally change the log config of the component. The value is a string, which is the content of the log config file. | ||
template: | ||
Configuration: | ||
status: INFO | ||
monitorInterval: 30 | ||
name: pulsar | ||
packages: io.prometheus.client.log4j2 | ||
|
||
Properties: | ||
Property: | ||
- name: "pulsar.log.dir" | ||
value: "logs" | ||
- name: "pulsar.log.file" | ||
value: "pulsar.log" | ||
- name: "pulsar.log.immediateFlush" | ||
value: "false" | ||
- name: "pulsar.log.appender" | ||
value: "RoutingAppender" | ||
- name: "pulsar.log.root.level" | ||
value: "info" | ||
- name: "pulsar.log.level" | ||
value: "info" | ||
- name: "pulsar.routing.appender.default" | ||
value: "Console" | ||
|
||
pod: | ||
resources: | ||
requests: | ||
cpu: 200m | ||
memory: 512Mi | ||
securityContext: | ||
runAsNonRoot: true | ||
replicas: 2 | ||
zkServers: zookeepers-zk:2181 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# | ||
# 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. | ||
# | ||
|
||
broker: | ||
# The field logConfig can be used to change the log level and log format of pods. | ||
# The logConfig field is optional. If it is not specified, the component will use the default log configuration /pulsar/conf/log4j2.yaml. | ||
# If it is specified will dynamically change the log level and log format of the component by changing the CR. | ||
logConfig: | ||
# The level field can be used to change the log level of the component. The value can be one of TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF. | ||
level: "DEBUG" | ||
# The format field can be used to change the log format of the component. The value can be one of json, text. | ||
format: "json" | ||
# The template field can totally change the log config of the component. The value is a string, which is the content of the log config file. | ||
template: | ||
Configuration: | ||
status: INFO | ||
monitorInterval: 30 | ||
name: pulsar | ||
packages: io.prometheus.client.log4j2 | ||
|
||
Properties: | ||
Property: | ||
- name: "pulsar.log.dir" | ||
value: "logs" | ||
- name: "pulsar.log.file" | ||
value: "pulsar.log" | ||
- name: "pulsar.log.immediateFlush" | ||
value: "false" | ||
- name: "pulsar.log.appender" | ||
value: "RoutingAppender" | ||
- name: "pulsar.log.root.level" | ||
value: "info" | ||
- name: "pulsar.log.level" | ||
value: "info" | ||
- name: "pulsar.routing.appender.default" | ||
value: "Console" |