Skip to content

Commit cc7bcfc

Browse files
authored
helm: allow configuration of zap flags via helm values (#385)
* pass zap flags via helm values Signed-off-by: Lukas Hoehl <[email protected]> * bump chart Signed-off-by: Lukas Hoehl <[email protected]> * generate helm-docs Signed-off-by: Lukas Hoehl <[email protected]> * update helm docs Signed-off-by: Lukas Hoehl <[email protected]> --------- Signed-off-by: Lukas Hoehl <[email protected]>
1 parent 538bddc commit cc7bcfc

File tree

6 files changed

+35
-3
lines changed

6 files changed

+35
-3
lines changed

charts/yawol-controller/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ description: Helm chart for yawol-controller
33
name: yawol-controller
44
sources:
55
- https://github.com/stackitcloud/yawol
6-
version: "0.23.1"
6+
version: "0.23.1-1"
77
appVersion: v0.23.1

charts/yawol-controller/README.md

+14-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# yawol-controller
22

3-
![Version: 0.12.0](https://img.shields.io/badge/Version-0.12.0-informational?style=flat-square) ![AppVersion: v0.12.0](https://img.shields.io/badge/AppVersion-v0.12.0-informational?style=flat-square)
3+
![Version: 0.23.1-1](https://img.shields.io/badge/Version-0.23.1--1-informational?style=flat-square) ![AppVersion: v0.23.1](https://img.shields.io/badge/AppVersion-v0.23.1-informational?style=flat-square)
44

55
Helm chart for yawol-controller
66

@@ -13,6 +13,10 @@ Helm chart for yawol-controller
1313
| Key | Type | Default | Description |
1414
|-----|------|---------|-------------|
1515
| featureGates | object | `{}` | |
16+
| logging | object | `{"encoding":"console","level":"info","stacktraceLevel":"error"}` | values are passed as zap-flags to the containers. See https://pkg.go.dev/sigs.k8s.io/[email protected]/pkg/log/zap#Options.BindFlags for more information |
17+
| logging.encoding | string | `"console"` | log encoding (one of 'json' or 'console') |
18+
| logging.level | string | `"info"` | Level to configure the verbosity of logging. Can be one of 'debug', 'info', 'error' or any integer value > 0 which corresponds to custom debug levels of increasing verbosity |
19+
| logging.stacktraceLevel | string | `"error"` | level at and above which stacktraces are captured (one of 'info', 'error' or 'panic') |
1620
| namespace | string | `"kube-system"` | |
1721
| podAnnotations | object | `{}` | |
1822
| podLabels | object | `{}` | |
@@ -39,18 +43,26 @@ Helm chart for yawol-controller
3943
| vpa.yawolController.mode | string | `"Auto"` | |
4044
| yawolAPIHost | string | `nil` | |
4145
| yawolAvailabilityZone | string | `""` | |
46+
| yawolCloudController.additionalEnv | object | `{}` | |
4247
| yawolCloudController.clusterRoleEnabled | bool | `true` | |
4348
| yawolCloudController.enabled | bool | `true` | |
4449
| yawolCloudController.gardenerMonitoringEnabled | bool | `false` | |
4550
| yawolCloudController.image.repository | string | `"ghcr.io/stackitcloud/yawol/yawol-cloud-controller"` | |
4651
| yawolCloudController.image.tag | string | `""` | Allows you to override the yawol version in this chart. Use at your own risk. |
52+
| yawolCloudController.service.annotations | object | `{}` | |
53+
| yawolCloudController.service.labels | object | `{}` | |
54+
| yawolCloudController.serviceAccount | object | `{}` | |
55+
| yawolController.errorBackoffBaseDelay | string | `"5ms"` | |
56+
| yawolController.errorBackoffMaxDelay | string | `"1000s"` | |
4757
| yawolController.gardenerMonitoringEnabled | bool | `false` | |
4858
| yawolController.image.repository | string | `"ghcr.io/stackitcloud/yawol/yawol-controller"` | |
4959
| yawolController.image.tag | string | `""` | Allows you to override the yawol version in this chart. Use at your own risk. |
60+
| yawolController.service.annotations | object | `{}` | |
61+
| yawolController.service.labels | object | `{}` | |
5062
| yawolFlavorID | string | `nil` | |
5163
| yawolFloatingID | string | `nil` | |
5264
| yawolImageID | string | `nil` | |
5365
| yawolNetworkID | string | `nil` | |
54-
| yawolSubnetID | string | `nil` | |
5566
| yawolOSSecretName | string | `nil` | |
67+
| yawolSubnetID | string | `nil` | |
5668

Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
{{- define "deploymentversion" -}}
22
apps/v1
33
{{- end -}}
4+
5+
{{- define "logFlags" }}
6+
- -zap-stacktrace-level={{ .Values.logging.stacktraceLevel }}
7+
- -zap-log-level={{ .Values.logging.level }}
8+
- -zap-encoder={{ .Values.logging.encoding }}
9+
{{- end }}

charts/yawol-controller/templates/yawol-cloud-controller.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ spec:
4444
{{- if .Values.yawolClassName }}
4545
- -classname={{ .Values.yawolClassName }}
4646
{{- end }}
47+
{{- include "logFlags" . | indent 10 }}
4748
env:
4849
{{- if .Values.namespace }}
4950
- name: CLUSTER_NAMESPACE

charts/yawol-controller/templates/yawol-controller.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ spec:
4646
{{- if .Values.yawolController.errorBackoffMaxDelay }}
4747
- -error-backoff-max-delay={{ .Values.yawolController.errorBackoffMaxDelay }}
4848
{{- end }}
49+
{{- include "logFlags" . | indent 10 }}
4950
env:
5051
{{- if .Values.namespace }}
5152
- name: CLUSTER_NAMESPACE
@@ -76,6 +77,7 @@ spec:
7677
{{- if .Values.yawolController.errorBackoffMaxDelay }}
7778
- -error-backoff-max-delay={{ .Values.yawolController.errorBackoffMaxDelay }}
7879
{{- end }}
80+
{{- include "logFlags" . | indent 10 }}
7981
env:
8082
{{- if .Values.namespace }}
8183
- name: CLUSTER_NAMESPACE
@@ -112,6 +114,7 @@ spec:
112114
{{- if .Values.yawolController.errorBackoffMaxDelay }}
113115
- -error-backoff-max-delay={{ .Values.yawolController.errorBackoffMaxDelay }}
114116
{{- end }}
117+
{{- include "logFlags" . | indent 10 }}
115118
env:
116119
{{- if .Values.namespace }}
117120
- name: CLUSTER_NAMESPACE

charts/yawol-controller/values.yaml

+10
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,16 @@ yawolCloudController:
2828
serviceAccount: {}
2929
#imagePullSecret: "registry-credentials"
3030

31+
# -- values are passed as zap-flags to the containers. See https://pkg.go.dev/sigs.k8s.io/[email protected]/pkg/log/zap#Options.BindFlags for more information
32+
logging:
33+
# -- Level to configure the verbosity of logging. Can be one of 'debug', 'info', 'error' or any integer value > 0 which corresponds to custom debug levels of increasing verbosity
34+
level: info
35+
# -- log encoding (one of 'json' or 'console')
36+
encoding: console
37+
# -- level at and above which stacktraces are captured (one of 'info', 'error' or 'panic')
38+
stacktraceLevel: error
39+
40+
3141
yawolController:
3242
gardenerMonitoringEnabled: false
3343
errorBackoffBaseDelay: 5ms

0 commit comments

Comments
 (0)