diff --git a/charts/sn-console/Chart.yaml b/charts/sn-console/Chart.yaml index 97ea3e44..e17f1459 100644 --- a/charts/sn-console/Chart.yaml +++ b/charts/sn-console/Chart.yaml @@ -21,7 +21,7 @@ apiVersion: v1 appVersion: "1.13" description: StreamNative Console Chart name: sn-console -version: 1.13 +version: 1.13.0 home: https://streamnative.io sources: - https://github.com/streamnative/charts/tree/master/charts/sn-console diff --git a/charts/sn-platform-slim/templates/bookkeeper/bookkeeper-cluster.yaml b/charts/sn-platform-slim/templates/bookkeeper/bookkeeper-cluster.yaml index b9864b38..bcab0af8 100644 --- a/charts/sn-platform-slim/templates/bookkeeper/bookkeeper-cluster.yaml +++ b/charts/sn-platform-slim/templates/bookkeeper/bookkeeper-cluster.yaml @@ -45,6 +45,13 @@ spec: replicas: {{ .Values.bookkeeper.replicaCount }} image: "{{ .Values.images.bookie.repository }}:{{ .Values.images.bookie.tag }}" imagePullPolicy: {{ .Values.images.bookie.pullPolicy }} + logConfig: + level: {{ .Values.bookkeeper.logConfig.level }} + format: {{ .Values.bookkeeper.logConfig.format }} + {{- with .Values.bookkeeper.logConfig.template }} + template: | + {{- toYaml . | nindent 6 -}} + {{- end }} pod: {{- with .Values.bookkeeper.topologySpreadConstraints }} topologySpreadConstraints: diff --git a/charts/sn-platform-slim/templates/broker/broker-cluster.yaml b/charts/sn-platform-slim/templates/broker/broker-cluster.yaml index 8e519d71..a0f73f73 100644 --- a/charts/sn-platform-slim/templates/broker/broker-cluster.yaml +++ b/charts/sn-platform-slim/templates/broker/broker-cluster.yaml @@ -47,6 +47,13 @@ spec: replicas: {{ .Values.broker.replicaCount }} image: "{{ .Values.images.broker.repository }}:{{ .Values.images.broker.tag }}" imagePullPolicy: {{ .Values.images.broker.pullPolicy }} + logConfig: + level: {{ .Values.broker.logConfig.level }} + format: {{ .Values.broker.logConfig.format }} + {{- with .Values.broker.logConfig.template }} + template: | + {{- toYaml . | nindent 6 -}} + {{- end }} pod: {{- with .Values.broker.topologySpreadConstraints }} topologySpreadConstraints: diff --git a/charts/sn-platform-slim/templates/proxy/proxy-cluster.yaml b/charts/sn-platform-slim/templates/proxy/proxy-cluster.yaml index 174dbb97..b8b6c9ab 100644 --- a/charts/sn-platform-slim/templates/proxy/proxy-cluster.yaml +++ b/charts/sn-platform-slim/templates/proxy/proxy-cluster.yaml @@ -43,6 +43,13 @@ spec: replicas: {{ .Values.proxy.replicaCount }} image: "{{ .Values.images.proxy.repository }}:{{ .Values.images.proxy.tag }}" imagePullPolicy: {{ .Values.images.proxy.pullPolicy }} + logConfig: + level: {{ .Values.proxy.logConfig.level }} + format: {{ .Values.proxy.logConfig.format }} + {{- with .Values.proxy.logConfig.template }} + template: | + {{- toYaml . | nindent 6 -}} + {{- end }} pod: {{- with .Values.proxy.topologySpreadConstraints }} topologySpreadConstraints: diff --git a/charts/sn-platform-slim/templates/zookeeper/zookeeper-cluster.yaml b/charts/sn-platform-slim/templates/zookeeper/zookeeper-cluster.yaml index 3c644d30..bf97589d 100644 --- a/charts/sn-platform-slim/templates/zookeeper/zookeeper-cluster.yaml +++ b/charts/sn-platform-slim/templates/zookeeper/zookeeper-cluster.yaml @@ -41,6 +41,13 @@ metadata: spec: replicas: {{ .Values.zookeeper.replicaCount }} image: "{{ .Values.images.zookeeper.repository }}:{{ .Values.images.zookeeper.tag }}" + logConfig: + level: {{ .Values.zookeeper.logConfig.level }} + format: {{ .Values.zookeeper.logConfig.format }} + {{- with .Values.zookeeper.logConfig.template }} + template: | + {{- toYaml . | nindent 6 -}} + {{- end }} pod: {{- with .Values.zookeeper.topologySpreadConstraints }} topologySpreadConstraints: diff --git a/charts/sn-platform-slim/values.yaml b/charts/sn-platform-slim/values.yaml index d728ecf7..becd0be6 100644 --- a/charts/sn-platform-slim/values.yaml +++ b/charts/sn-platform-slim/values.yaml @@ -545,6 +545,17 @@ zookeeper: # annotations that will be added on the ZooKeeperCluster CR only. annotations: {} + # 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: "INFO" + # The format field can be used to change the log format of the component. The value can be one of json, text. + format: "text" + # 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: {} + # use a component name that matches your grafana configuration # so the metrics are correctly rendered in grafana dashboard component: zookeeper @@ -770,6 +781,17 @@ bookkeeper: # annotations that will be added on the BookKeeperCluster CR only. annotations: {} + # 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. + # f 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: "INFO" + # The format field can be used to change the log format of the component. The value can be one of json, text. + format: "text" + # 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: {} + # use a component name that matches your grafana configuration # so the metrics are correctly rendered in grafana dashboard component: bookie @@ -990,6 +1012,17 @@ broker: # annotations that will be added on the PulsarBroker CR only. annotations: {} + # 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: "INFO" + # The format field can be used to change the log format of the component. The value can be one of json, text. + format: "text" + # 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: {} + # use a component name that matches your grafana configuration # so the metrics are correctly rendered in grafana dashboard component: broker @@ -1369,6 +1402,17 @@ proxy: # annotations that will be added on the PulsarProxy CR only. annotations: {} + # 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: "INFO" + # The format field can be used to change the log format of the component. The value can be one of json, text. + format: "text" + # 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: {} + # use a component name that matches your grafana configuration # so the metrics are correctly rendered in grafana dashboard component: proxy diff --git a/charts/sn-platform/templates/bookkeeper/bookkeeper-cluster.yaml b/charts/sn-platform/templates/bookkeeper/bookkeeper-cluster.yaml index b9864b38..bcab0af8 100644 --- a/charts/sn-platform/templates/bookkeeper/bookkeeper-cluster.yaml +++ b/charts/sn-platform/templates/bookkeeper/bookkeeper-cluster.yaml @@ -45,6 +45,13 @@ spec: replicas: {{ .Values.bookkeeper.replicaCount }} image: "{{ .Values.images.bookie.repository }}:{{ .Values.images.bookie.tag }}" imagePullPolicy: {{ .Values.images.bookie.pullPolicy }} + logConfig: + level: {{ .Values.bookkeeper.logConfig.level }} + format: {{ .Values.bookkeeper.logConfig.format }} + {{- with .Values.bookkeeper.logConfig.template }} + template: | + {{- toYaml . | nindent 6 -}} + {{- end }} pod: {{- with .Values.bookkeeper.topologySpreadConstraints }} topologySpreadConstraints: diff --git a/charts/sn-platform/templates/broker/broker-cluster.yaml b/charts/sn-platform/templates/broker/broker-cluster.yaml index e700fdb8..0b253e52 100644 --- a/charts/sn-platform/templates/broker/broker-cluster.yaml +++ b/charts/sn-platform/templates/broker/broker-cluster.yaml @@ -47,6 +47,13 @@ spec: replicas: {{ .Values.broker.replicaCount }} image: "{{ .Values.images.broker.repository }}:{{ .Values.images.broker.tag }}" imagePullPolicy: {{ .Values.images.broker.pullPolicy }} + logConfig: + level: {{ .Values.broker.logConfig.level }} + format: {{ .Values.broker.logConfig.format }} + {{- with .Values.broker.logConfig.template }} + template: | + {{- toYaml . | nindent 6 -}} + {{- end }} pod: {{- with .Values.broker.topologySpreadConstraints }} topologySpreadConstraints: diff --git a/charts/sn-platform/templates/proxy/proxy-cluster.yaml b/charts/sn-platform/templates/proxy/proxy-cluster.yaml index 4b4351db..e45b7958 100644 --- a/charts/sn-platform/templates/proxy/proxy-cluster.yaml +++ b/charts/sn-platform/templates/proxy/proxy-cluster.yaml @@ -43,6 +43,13 @@ spec: replicas: {{ .Values.proxy.replicaCount }} image: "{{ .Values.images.proxy.repository }}:{{ .Values.images.proxy.tag }}" imagePullPolicy: {{ .Values.images.proxy.pullPolicy }} + logConfig: + level: {{ .Values.proxy.logConfig.level }} + format: {{ .Values.proxy.logConfig.format }} + {{- with .Values.proxy.logConfig.template }} + template: | + {{- toYaml . | nindent 6 -}} + {{- end }} pod: {{- with .Values.proxy.topologySpreadConstraints }} topologySpreadConstraints: diff --git a/charts/sn-platform/templates/zookeeper/zookeeper-cluster.yaml b/charts/sn-platform/templates/zookeeper/zookeeper-cluster.yaml index 3c644d30..bf97589d 100644 --- a/charts/sn-platform/templates/zookeeper/zookeeper-cluster.yaml +++ b/charts/sn-platform/templates/zookeeper/zookeeper-cluster.yaml @@ -41,6 +41,13 @@ metadata: spec: replicas: {{ .Values.zookeeper.replicaCount }} image: "{{ .Values.images.zookeeper.repository }}:{{ .Values.images.zookeeper.tag }}" + logConfig: + level: {{ .Values.zookeeper.logConfig.level }} + format: {{ .Values.zookeeper.logConfig.format }} + {{- with .Values.zookeeper.logConfig.template }} + template: | + {{- toYaml . | nindent 6 -}} + {{- end }} pod: {{- with .Values.zookeeper.topologySpreadConstraints }} topologySpreadConstraints: diff --git a/charts/sn-platform/values.yaml b/charts/sn-platform/values.yaml index 9ce5fb27..9d9afe1e 100644 --- a/charts/sn-platform/values.yaml +++ b/charts/sn-platform/values.yaml @@ -620,6 +620,17 @@ zookeeper: # annotations that will be added on the ZooKeeperCluster CR only. annotations: {} + # 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: "INFO" + # The format field can be used to change the log format of the component. The value can be one of json, text. + format: "text" + # 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: {} + # use a component name that matches your grafana configuration # so the metrics are correctly rendered in grafana dashboard component: zookeeper @@ -845,6 +856,17 @@ bookkeeper: # annotations that will be added on the BookKeeperCluster CR only. annotations: {} + # 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: "INFO" + # The format field can be used to change the log format of the component. The value can be one of json, text. + format: "text" + # 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: {} + # use a component name that matches your grafana configuration # so the metrics are correctly rendered in grafana dashboard component: bookie @@ -1065,6 +1087,17 @@ broker: # annotations that will be added on the PulsarBroker CR only. annotations: {} + # 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: "INFO" + # The format field can be used to change the log format of the component. The value can be one of json, text. + format: "text" + # 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: {} + # use a component name that matches your grafana configuration # so the metrics are correctly rendered in grafana dashboard component: broker @@ -1444,6 +1477,17 @@ proxy: # annotations that will be added on the PulsarProxy CR only. annotations: {} + # 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: "INFO" + # The format field can be used to change the log format of the component. The value can be one of json, text. + format: "text" + # 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: {} + # use a component name that matches your grafana configuration # so the metrics are correctly rendered in grafana dashboard component: proxy diff --git a/examples/pulsar-operators/logConfig.yaml b/examples/pulsar-operators/logConfig.yaml new file mode 100644 index 00000000..91042c29 --- /dev/null +++ b/examples/pulsar-operators/logConfig.yaml @@ -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 \ No newline at end of file diff --git a/examples/sn-platform/logConfig.yaml b/examples/sn-platform/logConfig.yaml new file mode 100644 index 00000000..eee11d62 --- /dev/null +++ b/examples/sn-platform/logConfig.yaml @@ -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" \ No newline at end of file