Skip to content

Commit

Permalink
Merge pull request #385 from hbelmiro/issue-319
Browse files Browse the repository at this point in the history
Added argument to configure log levels for the operator and defined `…
  • Loading branch information
openshift-ci[bot] authored Oct 9, 2023
2 parents 5e305f7 + c180c67 commit 2098860
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Data Science Pipeline stacks onto individual OCP namespaces.
2. [Cleanup Standalone Installation](#cleanup-standalone-installation)
6. [Run tests](#run-tests)
7. [Metrics](#metrics)
8. [Configuring Log Levels for the Operator](#configuring-log-levels-for-the-operator)

# Overview

Expand Down Expand Up @@ -479,6 +480,13 @@ They are as follows:
- `data_science_pipelines_application_scheduledworkflow_ready` - Gauge that indicates if the DSPA's ScheduledWorkflow manager is in a Ready state (1 => Ready, 0 => Not Ready)
- `data_science_pipelines_application_ready` - Gauge that indicates if the DSPA is in a fully Ready state (1 => Ready, 0 => Not Ready)

# Configuring Log Levels for the Operator

By default, the operator's log messages are set to `info` severity.
If you wish to adjust the log verbosity, you can do so by modifying the `ZAP_LOG_LEVEL` parameter in [params.env](config/base/params.env) file to your preferred severity level.

For a comprehensive list of available values, please consult the [Zap documentation](https://pkg.go.dev/go.uber.org/zap#pkg-constants).

[cluster admin]: https://docs.openshift.com/container-platform/4.12/authentication/using-rbac.html#creating-cluster-admin_using-rbac
[oc client]: https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/latest/openshift-client-linux.tar.gz
[OCP Pipelines Operator]: https://docs.openshift.com/container-platform/4.12/cicd/pipelines/installing-pipelines.html#op-installing-pipelines-operator-in-web-console_installing-pipelines
Expand Down
7 changes: 7 additions & 0 deletions config/base/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,5 +99,12 @@ vars:
apiVersion: v1
fieldref:
fieldpath: data.IMAGES_DSPO
- name: ZAP_LOG_LEVEL
objref:
kind: ConfigMap
name: dspo-parameters
apiVersion: v1
fieldref:
fieldpath: data.ZAP_LOG_LEVEL
configurations:
- params.yaml
1 change: 1 addition & 0 deletions config/base/params.env
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ IMAGES_CACHE=registry.access.redhat.com/ubi8/ubi-minimal:8.8
IMAGES_MOVERESULTSIMAGE=registry.access.redhat.com/ubi8/ubi-micro:8.8
IMAGES_MARIADB=registry.redhat.io/rhel8/mariadb-103:1
IMAGES_OAUTHPROXY=registry.redhat.io/openshift4/ose-oauth-proxy@sha256:ab112105ac37352a2a4916a39d6736f5db6ab4c29bad4467de8d613e80e9bb33
ZAP_LOG_LEVEL=info
3 changes: 3 additions & 0 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ spec:
- /manager
args:
- --leader-elect
- --zap-log-level=$(ZAP_LOG_LEVEL)
- --config
- /home/config
image: $(IMAGES_DSPO)
Expand Down Expand Up @@ -56,6 +57,8 @@ spec:
value: $(IMAGES_MLMDGRPC)
- name: IMAGES_MLMDWRITER
value: $(IMAGES_MLMDWRITER)
- name: ZAP_LOG_LEVEL
value: $(ZAP_LOG_LEVEL)
securityContext:
allowPrivilegeEscalation: false
capabilities:
Expand Down

0 comments on commit 2098860

Please sign in to comment.