Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stat-receiver] Refactoring by styleguide #535

Merged
merged 2 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions charts/stat-receiver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,14 @@ helm upgrade stat-receiver 2gis-on-premise/stat-receiver -f values-stat-receiver
| `ingress.enabled` | If Ingress is enabled for the service. | `false` |
| `ingress.hosts[0].host` | Hostname for the Ingress service. | `stat-receiver.host` |

### stat-receiver parameters

| Name | Description | Value |
| -------------------------- | ----------------------------------------------------------- | ------- |
| `initializeTopics.enabled` | If true, topics will be created automatically. | `false` |
| `topicsPrefix` | Prefix for topics. | `""` |
| `logLevel` | Log level: `TRACE`, `DEBUG`, `INFO`, `WARN`, `ERROR`, `OFF` | `INFO` |


## Maintainers

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ schema-loader = {
v-3-schemas-path = "file:///app/schema/v3/0/"
}

initialize-topics = {{ required "A valid .Values.initializeTopics entry required" .Values.initializeTopics }}
initialize-topics = {{ required "A valid .Values.initializeTopics.enabled entry required" .Values.initializeTopics.enabled }}
topics-manager.prefix = {{ required "A valid .Values.topicsPrefix entry required" .Values.topicsPrefix }}

input-bss-topic = "{{ required "A valid .Values.topicsPrefix entry required" .Values.topicsPrefix }}input"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<logger name="org.http4s.blaze.channel" level="WARN" />

<root level="INFO">
<root level="{{ required "A valid .Values.logLevel entry required" .Values.logLevel }}">
<appender-ref ref="STDOUT" />
</root>
</configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ streams = {
v-3-schemas-path = "file:///app/schema/v3/0/"
}

initialize-topics = {{ required "A valid .Values.initializeTopics entry required" .Values.initializeTopics }}
initialize-topics = {{ required "A valid .Values.initializeTopics.enabled entry required" .Values.initializeTopics.enabled }}
topics-manager.prefix = {{ required "A valid .Values.topicsPrefix entry required" .Values.topicsPrefix }}

input-topics = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</encoder>
</appender>

<root level="INFO">
<root level="{{ required "A valid .Values.logLevel entry required" .Values.logLevel }}">
<appender-ref ref="STDOUT" />
</root>
</configuration>
3 changes: 1 addition & 2 deletions charts/stat-receiver/templates/api/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@ data:
application.conf: |-
{{- tpl (.Files.Get "configs/api/application.conf.template") . | nindent 4 }}
logback.xml: |-
{{- .Files.Get "configs/api/logback.xml" | nindent 4 }}

{{- tpl (.Files.Get "configs/api/logback.xml.template") . | nindent 4 }}
2 changes: 1 addition & 1 deletion charts/stat-receiver/templates/streams/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ data:
application.conf: |-
{{- tpl (.Files.Get "configs/streams/application.conf.template") . | nindent 4 }}
logback.xml: |-
{{- .Files.Get "configs/streams/logback.xml" | nindent 4 }}
{{- tpl (.Files.Get "configs/streams/logback.xml.template") . | nindent 4 }}
8 changes: 7 additions & 1 deletion charts/stat-receiver/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@
{ "$ref": "#/definitions/ip_or_host" }
]
},
"initializeTopics": { "type": "boolean" },
"initializeTopics": {
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": { "type": "boolean" }
}
},
"topicsPrefix": { "type": "string" },
"api": {
"type": "object",
Expand Down
11 changes: 11 additions & 0 deletions charts/stat-receiver/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -168,3 +168,14 @@ ingress:
enabled: false
hosts:
- host: stat-receiver.host

# @section stat-receiver parameters
# @param initializeTopics.enabled If true, topics will be created automatically.
# @param topicsPrefix Prefix for topics.

initializeTopics:
enabled: false
topicsPrefix: ''

# @param logLevel Log level: `TRACE`, `DEBUG`, `INFO`, `WARN`, `ERROR`, `OFF`
logLevel: INFO
Loading