From c41111c27d880452992ec09d25e1295a3720d267 Mon Sep 17 00:00:00 2001 From: Andrew Ballman <35912177+aballman@users.noreply.github.com> Date: Thu, 16 Nov 2023 10:14:13 -0800 Subject: [PATCH 1/2] Fix http-add-on operator resources Signed-off-by: Andrew Ballman <35912177+aballman@users.noreply.github.com> --- http-add-on/README.md | 7 +++++ .../templates/interceptor/deployment.yaml | 3 +++ .../templates/operator/deployment.yaml | 2 +- http-add-on/templates/scaler/deployment.yaml | 3 +++ http-add-on/values.yaml | 26 +++++++++++++++++++ 5 files changed, 40 insertions(+), 1 deletion(-) diff --git a/http-add-on/README.md b/http-add-on/README.md index 83835430..2f2b73bf 100644 --- a/http-add-on/README.md +++ b/http-add-on/README.md @@ -92,6 +92,13 @@ their default values. | `images.operator` | string | `"ghcr.io/kedacore/http-add-on-operator"` | Image name for the operator image component | | `images.scaler` | string | `"ghcr.io/kedacore/http-add-on-scaler"` | Image name for the scaler image component | | `images.tag` | string | `""` | Image tag for the http add on. This tag is applied to the images listed in `images.operator`, `images.interceptor`, and `images.scaler`. Optional, given app version of Helm chart is used by default | +| `logging.interceptor.format` | string | `"console"` | Logging format for KEDA http-add-on Interceptor. allowed values: `json` or `console` | +| `logging.interceptor.level` | string | `"info"` | Logging level for KEDA http-add-on Interceptor. allowed values: `debug`, `info`, `error`, or an integer value greater than 0, specified as string | +| `logging.interceptor.timeEncoding` | string | `"rfc3339"` | Logging time encoding for KEDA http-add-on Interceptor. allowed values are `epoch`, `millis`, `nano`, `iso8601`, `rfc3339` or `rfc3339nano` | +| `logging.operator.level` | int | `0` | Logging level for Metrics Server. allowed values: `0` for info, `4` for debug, or an integer value greater than 0 | +| `logging.scaler.format` | string | `"console"` | Logging format for KEDA http-add-on Scaler. allowed values: `json` or `console` | +| `logging.scaler.level` | string | `"info"` | Logging level for KEDA http-add-on Scaler. allowed values: `debug`, `info`, `error`, or an integer value greater than 0, specified as string | +| `logging.scaler.timeEncoding` | string | `"rfc3339"` | Logging time encoding for KEDA http-add-on Scaler. allowed values are `epoch`, `millis`, `nano`, `iso8601`, `rfc3339` or `rfc3339nano` | | `podSecurityContext` | object | [See below](#KEDA-is-secure-by-default) | [Pod security context] for all pods | | `rbac.aggregateToDefaultRoles` | bool | `false` | Install aggregate roles for edit and view | | `securityContext` | object | [See below](#KEDA-is-secure-by-default) | [Security context] for all containers | diff --git a/http-add-on/templates/interceptor/deployment.yaml b/http-add-on/templates/interceptor/deployment.yaml index 20cd98b0..9090ed10 100644 --- a/http-add-on/templates/interceptor/deployment.yaml +++ b/http-add-on/templates/interceptor/deployment.yaml @@ -30,6 +30,9 @@ spec: {{- end }} containers: - args: + - "--zap-log-level={{ .Values.logging.interceptor.level }}" + - "--zap-encoder={{ .Values.logging.interceptor.format }}" + - "--zap-time-encoding={{ .Values.logging.interceptor.timeEncoding }}" image: "{{ .Values.images.interceptor }}:{{ .Values.images.tag | default .Chart.AppVersion }}" imagePullPolicy: '{{ .Values.interceptor.pullPolicy | default "Always" }}' name: "{{ .Chart.Name }}-interceptor" diff --git a/http-add-on/templates/operator/deployment.yaml b/http-add-on/templates/operator/deployment.yaml index 61b76b33..d3d1caff 100644 --- a/http-add-on/templates/operator/deployment.yaml +++ b/http-add-on/templates/operator/deployment.yaml @@ -33,7 +33,7 @@ spec: - --secure-listen-address=0.0.0.0:{{ .Values.operator.port | default 8443 }} - --upstream=http://127.0.0.1:8080/ - --logtostderr=true - - --v=10 + - --v={{ .Values.logging.operator.level }} image: "{{ .Values.images.kubeRbacProxy.name }}:{{ .Values.images.kubeRbacProxy.tag }}" name: kube-rbac-proxy resources: diff --git a/http-add-on/templates/scaler/deployment.yaml b/http-add-on/templates/scaler/deployment.yaml index 7414990e..03413d3d 100644 --- a/http-add-on/templates/scaler/deployment.yaml +++ b/http-add-on/templates/scaler/deployment.yaml @@ -30,6 +30,9 @@ spec: {{- end }} containers: - args: + - "--zap-log-level={{ .Values.logging.scaler.level }}" + - "--zap-encoder={{ .Values.logging.scaler.format }}" + - "--zap-time-encoding={{ .Values.logging.scaler.timeEncoding }}" image: "{{ .Values.images.scaler }}:{{ .Values.images.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.scaler.pullPolicy | default "Always" }} name: "{{ .Chart.Name }}-external-scaler" diff --git a/http-add-on/values.yaml b/http-add-on/values.yaml index adb45bc7..7628501f 100644 --- a/http-add-on/values.yaml +++ b/http-add-on/values.yaml @@ -5,6 +5,32 @@ crds: # -- Whether to install the `HTTPScaledObject` [`CustomResourceDefinition`](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/) install: true +logging: + operator: + # -- Logging level for Metrics Server. + # allowed values: `0` for info, `4` for debug, or an integer value greater than 0 + level: 0 + scaler: + # -- Logging level for KEDA http-add-on Scaler. + # allowed values: `debug`, `info`, `error`, or an integer value greater than 0, specified as string + level: info + # -- Logging format for KEDA http-add-on Scaler. + # allowed values: `json` or `console` + format: console + # -- Logging time encoding for KEDA http-add-on Scaler. + # allowed values are `epoch`, `millis`, `nano`, `iso8601`, `rfc3339` or `rfc3339nano` + timeEncoding: rfc3339 + interceptor: + # -- Logging level for KEDA http-add-on Interceptor. + # allowed values: `debug`, `info`, `error`, or an integer value greater than 0, specified as string + level: info + # -- Logging format for KEDA http-add-on Interceptor. + # allowed values: `json` or `console` + format: console + # -- Logging time encoding for KEDA http-add-on Interceptor. + # allowed values are `epoch`, `millis`, `nano`, `iso8601`, `rfc3339` or `rfc3339nano` + timeEncoding: rfc3339 + # operator-specific configuration values operator: # -- The image pull secrets for the operator component From 164fb4b03480107ede31c076fafa4ed5e56f0fa5 Mon Sep 17 00:00:00 2001 From: Andrew Ballman <35912177+aballman@users.noreply.github.com> Date: Tue, 28 Nov 2023 09:16:18 -0800 Subject: [PATCH 2/2] Address feedback items Signed-off-by: Andrew Ballman <35912177+aballman@users.noreply.github.com> --- http-add-on/README.md | 5 ++++- http-add-on/templates/operator/deployment.yaml | 5 ++++- http-add-on/values.yaml | 17 ++++++++++++++--- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/http-add-on/README.md b/http-add-on/README.md index 2f2b73bf..79cae94d 100644 --- a/http-add-on/README.md +++ b/http-add-on/README.md @@ -95,7 +95,10 @@ their default values. | `logging.interceptor.format` | string | `"console"` | Logging format for KEDA http-add-on Interceptor. allowed values: `json` or `console` | | `logging.interceptor.level` | string | `"info"` | Logging level for KEDA http-add-on Interceptor. allowed values: `debug`, `info`, `error`, or an integer value greater than 0, specified as string | | `logging.interceptor.timeEncoding` | string | `"rfc3339"` | Logging time encoding for KEDA http-add-on Interceptor. allowed values are `epoch`, `millis`, `nano`, `iso8601`, `rfc3339` or `rfc3339nano` | -| `logging.operator.level` | int | `0` | Logging level for Metrics Server. allowed values: `0` for info, `4` for debug, or an integer value greater than 0 | +| `logging.operator.format` | string | `"console"` | Logging format for KEDA http-add-on operator. allowed values: `json` or `console` | +| `logging.operator.kubeRbacProxy.level` | int | `10` | Logging level for KEDA http-add-on operator rbac proxy allowed values: `0` for info, `4` for debug, or an integer value greater than 0 | +| `logging.operator.level` | string | `"info"` | Logging level for KEDA http-add-on operator. allowed values: `debug`, `info`, `error`, or an integer value greater than 0, specified as string | +| `logging.operator.timeEncoding` | string | `"rfc3339"` | Logging time encoding for KEDA http-add-on operator. allowed values are `epoch`, `millis`, `nano`, `iso8601`, `rfc3339` or `rfc3339nano` | | `logging.scaler.format` | string | `"console"` | Logging format for KEDA http-add-on Scaler. allowed values: `json` or `console` | | `logging.scaler.level` | string | `"info"` | Logging level for KEDA http-add-on Scaler. allowed values: `debug`, `info`, `error`, or an integer value greater than 0, specified as string | | `logging.scaler.timeEncoding` | string | `"rfc3339"` | Logging time encoding for KEDA http-add-on Scaler. allowed values are `epoch`, `millis`, `nano`, `iso8601`, `rfc3339` or `rfc3339nano` | diff --git a/http-add-on/templates/operator/deployment.yaml b/http-add-on/templates/operator/deployment.yaml index d3d1caff..06e88f2d 100644 --- a/http-add-on/templates/operator/deployment.yaml +++ b/http-add-on/templates/operator/deployment.yaml @@ -33,7 +33,7 @@ spec: - --secure-listen-address=0.0.0.0:{{ .Values.operator.port | default 8443 }} - --upstream=http://127.0.0.1:8080/ - --logtostderr=true - - --v={{ .Values.logging.operator.level }} + - --v={{ .Values.logging.operator.kubeRbacProxy.level }} image: "{{ .Values.images.kubeRbacProxy.name }}:{{ .Values.images.kubeRbacProxy.tag }}" name: kube-rbac-proxy resources: @@ -53,6 +53,9 @@ spec: - args: - --metrics-bind-address=127.0.0.1:8080 - --leader-elect + - --zap-log-level={{ .Values.logging.operator.level }} + - --zap-time-encoding={{ .Values.logging.operator.timeEncoding }} + - --zap-encoder={{ .Values.logging.operator.format }} image: "{{ .Values.images.operator }}:{{ .Values.images.tag | default .Chart.AppVersion }}" imagePullPolicy: '{{ .Values.operator.pullPolicy | default "Always" }}' name: "{{ .Chart.Name }}-operator" diff --git a/http-add-on/values.yaml b/http-add-on/values.yaml index 7628501f..c4551fbb 100644 --- a/http-add-on/values.yaml +++ b/http-add-on/values.yaml @@ -7,9 +7,20 @@ crds: logging: operator: - # -- Logging level for Metrics Server. - # allowed values: `0` for info, `4` for debug, or an integer value greater than 0 - level: 0 + # -- Logging level for KEDA http-add-on operator. + # allowed values: `debug`, `info`, `error`, or an integer value greater than 0, specified as string + level: info + # -- Logging format for KEDA http-add-on operator. + # allowed values: `json` or `console` + format: console + # -- Logging time encoding for KEDA http-add-on operator. + # allowed values are `epoch`, `millis`, `nano`, `iso8601`, `rfc3339` or `rfc3339nano` + timeEncoding: rfc3339 + + kubeRbacProxy: + # -- Logging level for KEDA http-add-on operator rbac proxy + # allowed values: `0` for info, `4` for debug, or an integer value greater than 0 + level: 10 scaler: # -- Logging level for KEDA http-add-on Scaler. # allowed values: `debug`, `info`, `error`, or an integer value greater than 0, specified as string