Skip to content

Commit ad4c4d5

Browse files
feat: add logging.development config option for manager
1 parent b70681c commit ad4c4d5

File tree

4 files changed

+30
-1
lines changed

4 files changed

+30
-1
lines changed

charts/k6-operator/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Kubernetes: `>=1.16.0-0`
3232
| global.image.pullSecrets | list | `[]` | Optional set of global image pull secrets |
3333
| global.image.registry | string | `""` | Global image registry to use if it needs to be overridden for some specific use cases (e.g local registries, custom images, ...) |
3434
| installCRDs | bool | `true` | Installs CRDs as part of the release |
35-
| manager | object | `{"containerSecurityContext":{},"env":[],"envFrom":[],"image":{"pullPolicy":"IfNotPresent","registry":"ghcr.io","repository":"grafana/k6-operator","tag":"controller-v0.0.23"},"livenessProbe":{"httpGet":{"path":"/healthz","port":8081},"initialDelaySeconds":15,"periodSeconds":20},"podSecurityContext":{},"readinessProbe":{"httpGet":{"path":"/healthz","port":8081},"initialDelaySeconds":5,"periodSeconds":10},"replicas":1,"resources":{"limits":{"cpu":"100m","memory":"100Mi"},"requests":{"cpu":"100m","memory":"50Mi"}},"serviceAccount":{"create":true,"name":"k6-operator-controller"}}` | controller-manager configuration |
35+
| manager | object | `{"containerSecurityContext":{},"env":[],"envFrom":[],"image":{"pullPolicy":"IfNotPresent","registry":"ghcr.io","repository":"grafana/k6-operator","tag":"controller-v0.0.23"},"livenessProbe":{"httpGet":{"path":"/healthz","port":8081},"initialDelaySeconds":15,"periodSeconds":20},"logging":{"development":true},"podSecurityContext":{},"readinessProbe":{"httpGet":{"path":"/healthz","port":8081},"initialDelaySeconds":5,"periodSeconds":10},"replicas":1,"resources":{"limits":{"cpu":"100m","memory":"100Mi"},"requests":{"cpu":"100m","memory":"50Mi"}},"serviceAccount":{"create":true,"name":"k6-operator-controller"}}` | controller-manager configuration |
3636
| manager.containerSecurityContext | object | `{}` | A security context defines privileges and access control settings for the container. |
3737
| manager.env | list | `[]` | List of environment variables to set in the controller |
3838
| manager.envFrom | list | `[]` | List of sources to populate environment variables in the controller |
@@ -42,6 +42,8 @@ Kubernetes: `>=1.16.0-0`
4242
| manager.image.tag | string | `"controller-v0.0.23"` | controller-manager image tag |
4343
| manager.livenessProbe | object | `{"httpGet":{"path":"/healthz","port":8081},"initialDelaySeconds":15,"periodSeconds":20}` | Liveness probe in Probe format |
4444
| manager.livenessProbe.httpGet | object | `{"path":"/healthz","port":8081}` | HTTP liveness probe |
45+
| manager.logging | object | `{"development":true}` | controller-manager logging configuration |
46+
| manager.logging.development | bool | `true` | Set to true to enable development mode logging (human-readable console format). Set to false for production mode logging (JSON format). |
4547
| manager.podSecurityContext | object | `{}` | A security context defines privileges and access control settings for a pod. |
4648
| manager.readinessProbe | object | `{"httpGet":{"path":"/healthz","port":8081},"initialDelaySeconds":5,"periodSeconds":10}` | Readiness probe in Probe format |
4749
| manager.readinessProbe.httpGet | object | `{"path":"/healthz","port":8081}` | HTTP readiness probe |

charts/k6-operator/templates/deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ spec:
6464
- --leader-elect
6565
{{- end }}
6666
- --metrics-bind-address=:8443
67+
- --zap-devel={{ if hasKey .Values.manager.logging "development" }}{{ .Values.manager.logging.development | toString }}{{ else }}true{{ end }}
6768
ports:
6869
- containerPort: 8443
6970
name: {{ .Values.service.portName }}

charts/k6-operator/values.schema.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,20 @@
154154
"periodSeconds"
155155
]
156156
},
157+
"logging": {
158+
"additionalProperties": false,
159+
"properties": {
160+
"development": {
161+
"default": true,
162+
"description": "manager.logging.development -- Set to true to enable development mode logging (human-readable console format). Set to false for production mode logging (JSON format).",
163+
"title": "development",
164+
"type": "boolean"
165+
}
166+
},
167+
"description": "manager.logging -- controller-manager logging configuration",
168+
"title": "logging",
169+
"type": "object"
170+
},
157171
"podSecurityContext": {
158172
"additionalProperties": true,
159173
"description": "manager.podSecurityContext -- A security context defines privileges and access control settings for a pod.",

charts/k6-operator/values.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,18 @@ service:
248248
manager:
249249
# @schema
250250
# required: false
251+
# type: object
252+
# @schema
253+
# manager.logging -- controller-manager logging configuration
254+
logging:
255+
# @schema
256+
# required: false
257+
# type: boolean
258+
# @schema
259+
# manager.logging.development -- Set to true to enable development mode logging (human-readable console format). Set to false for production mode logging (JSON format).
260+
development: true
261+
# @schema
262+
# required: false
251263
# type: integer
252264
# @schema
253265
# manager.replicas -- number of controller-manager replicas (default: 1)

0 commit comments

Comments
 (0)