From 0a9a49e7d217d70d77f1cf3ef2750cf81a444f93 Mon Sep 17 00:00:00 2001 From: Lukas Hoehl Date: Thu, 8 Aug 2024 11:14:04 +0200 Subject: [PATCH 1/4] pass zap flags via helm values Signed-off-by: Lukas Hoehl --- charts/yawol-controller/templates/_helpers.tpl | 6 ++++++ .../yawol-controller/templates/yawol-cloud-controller.yaml | 1 + charts/yawol-controller/templates/yawol-controller.yaml | 3 +++ charts/yawol-controller/values.yaml | 6 ++++++ 4 files changed, 16 insertions(+) diff --git a/charts/yawol-controller/templates/_helpers.tpl b/charts/yawol-controller/templates/_helpers.tpl index f31adaf4..054a6452 100644 --- a/charts/yawol-controller/templates/_helpers.tpl +++ b/charts/yawol-controller/templates/_helpers.tpl @@ -1,3 +1,9 @@ {{- define "deploymentversion" -}} apps/v1 {{- end -}} + +{{- define "logFlags" }} +- -zap-stacktrace-level={{ .Values.logging.stacktraceLevel }} +- -zap-log-level={{ .Values.logging.level }} +- -zap-encoder={{ .Values.logging.encoding }} +{{- end }} diff --git a/charts/yawol-controller/templates/yawol-cloud-controller.yaml b/charts/yawol-controller/templates/yawol-cloud-controller.yaml index 1da48573..1a6565dc 100644 --- a/charts/yawol-controller/templates/yawol-cloud-controller.yaml +++ b/charts/yawol-controller/templates/yawol-cloud-controller.yaml @@ -44,6 +44,7 @@ spec: {{- if .Values.yawolClassName }} - -classname={{ .Values.yawolClassName }} {{- end }} + {{- include "logFlags" . | indent 10 }} env: {{- if .Values.namespace }} - name: CLUSTER_NAMESPACE diff --git a/charts/yawol-controller/templates/yawol-controller.yaml b/charts/yawol-controller/templates/yawol-controller.yaml index 4c369afe..b79bffa1 100644 --- a/charts/yawol-controller/templates/yawol-controller.yaml +++ b/charts/yawol-controller/templates/yawol-controller.yaml @@ -46,6 +46,7 @@ spec: {{- if .Values.yawolController.errorBackoffMaxDelay }} - -error-backoff-max-delay={{ .Values.yawolController.errorBackoffMaxDelay }} {{- end }} + {{- include "logFlags" . | indent 10 }} env: {{- if .Values.namespace }} - name: CLUSTER_NAMESPACE @@ -76,6 +77,7 @@ spec: {{- if .Values.yawolController.errorBackoffMaxDelay }} - -error-backoff-max-delay={{ .Values.yawolController.errorBackoffMaxDelay }} {{- end }} + {{- include "logFlags" . | indent 10 }} env: {{- if .Values.namespace }} - name: CLUSTER_NAMESPACE @@ -112,6 +114,7 @@ spec: {{- if .Values.yawolController.errorBackoffMaxDelay }} - -error-backoff-max-delay={{ .Values.yawolController.errorBackoffMaxDelay }} {{- end }} + {{- include "logFlags" . | indent 10 }} env: {{- if .Values.namespace }} - name: CLUSTER_NAMESPACE diff --git a/charts/yawol-controller/values.yaml b/charts/yawol-controller/values.yaml index 60ade61a..768ffd05 100644 --- a/charts/yawol-controller/values.yaml +++ b/charts/yawol-controller/values.yaml @@ -28,6 +28,12 @@ yawolCloudController: serviceAccount: {} #imagePullSecret: "registry-credentials" +logging: + level: info + encoding: console + stacktraceLevel: error + + yawolController: gardenerMonitoringEnabled: false errorBackoffBaseDelay: 5ms From de94a11bb2eb3672b82e838ea9f018d701d0a8cc Mon Sep 17 00:00:00 2001 From: Lukas Hoehl Date: Thu, 8 Aug 2024 11:16:09 +0200 Subject: [PATCH 2/4] bump chart Signed-off-by: Lukas Hoehl --- charts/yawol-controller/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/yawol-controller/Chart.yaml b/charts/yawol-controller/Chart.yaml index d05f0979..05fd8fef 100644 --- a/charts/yawol-controller/Chart.yaml +++ b/charts/yawol-controller/Chart.yaml @@ -3,5 +3,5 @@ description: Helm chart for yawol-controller name: yawol-controller sources: - https://github.com/stackitcloud/yawol -version: "0.23.1" +version: "0.23.1-1" appVersion: v0.23.1 From 92a8894131eddaad885248616551489e16834618 Mon Sep 17 00:00:00 2001 From: Lukas Hoehl Date: Thu, 8 Aug 2024 11:21:17 +0200 Subject: [PATCH 3/4] generate helm-docs Signed-off-by: Lukas Hoehl --- charts/yawol-controller/README.md | 16 ++++++++++++++-- charts/yawol-controller/values.yaml | 4 ++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/charts/yawol-controller/README.md b/charts/yawol-controller/README.md index 77e4e4cd..5e77025e 100644 --- a/charts/yawol-controller/README.md +++ b/charts/yawol-controller/README.md @@ -1,6 +1,6 @@ # yawol-controller -![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) +![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) Helm chart for yawol-controller @@ -13,6 +13,10 @@ Helm chart for yawol-controller | Key | Type | Default | Description | |-----|------|---------|-------------| | featureGates | object | `{}` | | +| 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/controller-runtime@v0.18.4/pkg/log/zap#Options.BindFlags for more information | +| logging.encoding | string | `"console"` | log encoding (one of 'json' or 'console') | +| logging.level | string | `"info"` | log-level to omit. Can be one of 'debug', 'info', 'error' or any integer value > 0 which corresponds to custom debug levels of increasing verbosity | +| logging.stacktraceLevel | string | `"error"` | level at and above which stacktraces are captured (one of 'info', 'error' or 'panic') | | namespace | string | `"kube-system"` | | | podAnnotations | object | `{}` | | | podLabels | object | `{}` | | @@ -39,18 +43,26 @@ Helm chart for yawol-controller | vpa.yawolController.mode | string | `"Auto"` | | | yawolAPIHost | string | `nil` | | | yawolAvailabilityZone | string | `""` | | +| yawolCloudController.additionalEnv | object | `{}` | | | yawolCloudController.clusterRoleEnabled | bool | `true` | | | yawolCloudController.enabled | bool | `true` | | | yawolCloudController.gardenerMonitoringEnabled | bool | `false` | | | yawolCloudController.image.repository | string | `"ghcr.io/stackitcloud/yawol/yawol-cloud-controller"` | | | yawolCloudController.image.tag | string | `""` | Allows you to override the yawol version in this chart. Use at your own risk. | +| yawolCloudController.service.annotations | object | `{}` | | +| yawolCloudController.service.labels | object | `{}` | | +| yawolCloudController.serviceAccount | object | `{}` | | +| yawolController.errorBackoffBaseDelay | string | `"5ms"` | | +| yawolController.errorBackoffMaxDelay | string | `"1000s"` | | | yawolController.gardenerMonitoringEnabled | bool | `false` | | | yawolController.image.repository | string | `"ghcr.io/stackitcloud/yawol/yawol-controller"` | | | yawolController.image.tag | string | `""` | Allows you to override the yawol version in this chart. Use at your own risk. | +| yawolController.service.annotations | object | `{}` | | +| yawolController.service.labels | object | `{}` | | | yawolFlavorID | string | `nil` | | | yawolFloatingID | string | `nil` | | | yawolImageID | string | `nil` | | | yawolNetworkID | string | `nil` | | -| yawolSubnetID | string | `nil` | | | yawolOSSecretName | string | `nil` | | +| yawolSubnetID | string | `nil` | | diff --git a/charts/yawol-controller/values.yaml b/charts/yawol-controller/values.yaml index 768ffd05..9bfa0190 100644 --- a/charts/yawol-controller/values.yaml +++ b/charts/yawol-controller/values.yaml @@ -28,9 +28,13 @@ yawolCloudController: serviceAccount: {} #imagePullSecret: "registry-credentials" +# -- values are passed as zap-flags to the containers. See https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.18.4/pkg/log/zap#Options.BindFlags for more information logging: + # -- log-level to omit. Can be one of 'debug', 'info', 'error' or any integer value > 0 which corresponds to custom debug levels of increasing verbosity level: info + # -- log encoding (one of 'json' or 'console') encoding: console + # -- level at and above which stacktraces are captured (one of 'info', 'error' or 'panic') stacktraceLevel: error From 8d6223f7cf5f4473d24f3b99317dc9df787319da Mon Sep 17 00:00:00 2001 From: Lukas Hoehl Date: Mon, 12 Aug 2024 10:26:04 +0200 Subject: [PATCH 4/4] update helm docs Signed-off-by: Lukas Hoehl --- charts/yawol-controller/README.md | 2 +- charts/yawol-controller/values.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/yawol-controller/README.md b/charts/yawol-controller/README.md index 5e77025e..06c2343f 100644 --- a/charts/yawol-controller/README.md +++ b/charts/yawol-controller/README.md @@ -15,7 +15,7 @@ Helm chart for yawol-controller | featureGates | object | `{}` | | | 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/controller-runtime@v0.18.4/pkg/log/zap#Options.BindFlags for more information | | logging.encoding | string | `"console"` | log encoding (one of 'json' or 'console') | -| logging.level | string | `"info"` | log-level to omit. Can be one of 'debug', 'info', 'error' or any integer value > 0 which corresponds to custom debug levels of increasing verbosity | +| 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 | | logging.stacktraceLevel | string | `"error"` | level at and above which stacktraces are captured (one of 'info', 'error' or 'panic') | | namespace | string | `"kube-system"` | | | podAnnotations | object | `{}` | | diff --git a/charts/yawol-controller/values.yaml b/charts/yawol-controller/values.yaml index 9bfa0190..b51333e6 100644 --- a/charts/yawol-controller/values.yaml +++ b/charts/yawol-controller/values.yaml @@ -30,7 +30,7 @@ yawolCloudController: # -- values are passed as zap-flags to the containers. See https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.18.4/pkg/log/zap#Options.BindFlags for more information logging: - # -- log-level to omit. Can be one of 'debug', 'info', 'error' or any integer value > 0 which corresponds to custom debug levels of increasing verbosity + # -- 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 level: info # -- log encoding (one of 'json' or 'console') encoding: console