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

helm: allow configuration of zap flags via helm values #385

Merged
merged 4 commits into from
Aug 12, 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
2 changes: 1 addition & 1 deletion charts/yawol-controller/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
16 changes: 14 additions & 2 deletions charts/yawol-controller/README.md
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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"` | 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 | `{}` | |
| podLabels | object | `{}` | |
Expand All @@ -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` | |

6 changes: 6 additions & 0 deletions charts/yawol-controller/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -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 }}
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ spec:
{{- if .Values.yawolClassName }}
- -classname={{ .Values.yawolClassName }}
{{- end }}
{{- include "logFlags" . | indent 10 }}
env:
{{- if .Values.namespace }}
- name: CLUSTER_NAMESPACE
Expand Down
3 changes: 3 additions & 0 deletions charts/yawol-controller/templates/yawol-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
10 changes: 10 additions & 0 deletions charts/yawol-controller/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@ 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:
# -- 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
# -- level at and above which stacktraces are captured (one of 'info', 'error' or 'panic')
stacktraceLevel: error


yawolController:
gardenerMonitoringEnabled: false
errorBackoffBaseDelay: 5ms
Expand Down