Skip to content

Comments

K8SPG-758 Documented pprof env variable.#359

Open
nastena1606 wants to merge 3 commits into2.0from
K8SPG-758-Doc-Pprof-binding
Open

K8SPG-758 Documented pprof env variable.#359
nastena1606 wants to merge 3 commits into2.0from
K8SPG-758-Doc-Pprof-binding

Conversation

@nastena1606
Copy link
Collaborator

Added a section how to use it for troubleshooting the Operator docs

This PR is based on K8SPG-760-Env-vars PR and must be merged after it.

  modified:   docs/env-var-operator.md
    modified:   docs/troubleshoot-operator.md

Added a section how to use it for troubleshooting the Operator docs

This PR is based on K8SPG-760-Env-vars PR and must be merged after it.

      modified:   docs/env-var-operator.md
        modified:   docs/troubleshoot-operator.md
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds comprehensive documentation for the Operator environment variables and introduces a new pprof profiling section for troubleshooting. The changes create a new reference page (env-var-operator.md) that documents all available environment variables for configuring the Percona Operator for PostgreSQL, and adds a troubleshooting section on how to use pprof for performance profiling.

Changes:

  • Added a complete reference guide for Operator environment variables including LOG_LEVEL, DISABLE_TELEMETRY, PGO_FEATURE_GATES, LOG_STRUCTURED, PGO_WORKERS, WATCH_NAMESPACE, PGO_NAMESPACE, and PPROF_BIND_ADDRESS
  • Added a new "Profiling the Operator with pprof" section to the troubleshooting documentation with step-by-step instructions for collecting CPU, memory, and goroutine profiles
  • Cross-linked the two documents for easy navigation between environment variable reference and usage instructions

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 7 comments.

File Description
docs/env-var-operator.md New comprehensive reference documentation for all Operator environment variables, including descriptions, default values, examples, and instructions for updating them via kubectl and Helm
docs/troubleshoot-operator.md Added new section on profiling the Operator with pprof, including setup, collection, and analysis instructions with appropriate security warnings

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


* For installations via `kubectl`, edit the Operator Deployment manifest `deploy/operator.yaml` or `deploy/cw-operator.yaml`. Alternatively you can modify the Deployment resource in `deploy/bundle.yaml`, or `deploy/cw-bundle.yaml` files.
* For Helm installations you can set environment variables through Helm values when you install the `percona/pg-operator` chart.
* For installations on OpenShift, you can edit the manifests and aplly them with the `oc apply` command. If you installed via the [Operator Lifecycle Manager (OLM)](openshift.md#install-the-operator-via-the-operator-lifecycle-manager-olm), you can configure environment variables through the OLM subscription.
Copy link

Copilot AI Feb 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spelling error: "aplly" should be "apply".

Suggested change
* For installations on OpenShift, you can edit the manifests and aplly them with the `oc apply` command. If you installed via the [Operator Lifecycle Manager (OLM)](openshift.md#install-the-operator-via-the-operator-lifecycle-manager-olm), you can configure environment variables through the OLM subscription.
* For installations on OpenShift, you can edit the manifests and apply them with the `oc apply` command. If you installed via the [Operator Lifecycle Manager (OLM)](openshift.md#install-the-operator-via-the-operator-lifecycle-manager-olm), you can configure environment variables through the OLM subscription.

Copilot uses AI. Check for mistakes.

### `LOG_STRUCTURED`

Controls whether the Operator outputs logs in a structured JSON format instead of the plain text. Structured logging is useful for log aggregation tools.
Copy link

Copilot AI Feb 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an extra space between "format" and "instead". It should be "JSON format instead of the plain text".

Suggested change
Controls whether the Operator outputs logs in a structured JSON format instead of the plain text. Structured logging is useful for log aggregation tools.
Controls whether the Operator outputs logs in a structured JSON format instead of the plain text. Structured logging is useful for log aggregation tools.

Copilot uses AI. Check for mistakes.

Specifies the Kubernetes namespace where the Operator itself is deployed and runs. The value is set automatically by Kubernetes from `metadata.namespace` via a downward API `fieldRef`.

This variable is used by the Operator to refer objects like Secrets for the normal functioning of the operator.
Copy link

Copilot AI Feb 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent capitalization: "operator" should be "Operator" to match the convention used throughout the rest of the document where "Operator" is capitalized when referring to the Percona Operator for PostgreSQL.

Suggested change
This variable is used by the Operator to refer objects like Secrets for the normal functioning of the operator.
This variable is used by the Operator to refer objects like Secrets for the normal functioning of the Operator.

Copilot uses AI. Check for mistakes.
Comment on lines 119 to 120
* If you set `PGO_WORKERS=4` but only have one PerconaPGCluster object, the operator still reconciles this object serially.
* If you set `PGO_WORKERS=4` and have two PerconaPGCluster objects (A and B), the operator uses two separate threads to reconcile each object in parallel; however, it always processes events for each individual object sequentially.
Copy link

Copilot AI Feb 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent capitalization: both instances of "operator" should be "Operator" to match the convention used throughout the document when referring to the Percona Operator for PostgreSQL.

Suggested change
* If you set `PGO_WORKERS=4` but only have one PerconaPGCluster object, the operator still reconciles this object serially.
* If you set `PGO_WORKERS=4` and have two PerconaPGCluster objects (A and B), the operator uses two separate threads to reconcile each object in parallel; however, it always processes events for each individual object sequentially.
* If you set `PGO_WORKERS=4` but only have one PerconaPGCluster object, the Operator still reconciles this object serially.
* If you set `PGO_WORKERS=4` and have two PerconaPGCluster objects (A and B), the Operator uses two separate threads to reconcile each object in parallel; however, it always processes events for each individual object sequentially.

Copilot uses AI. Check for mistakes.

### `LOG_LEVEL`

Controls the verbosity of the operator's logging output. This helps with debugging and monitoring the Operator behavior.
Copy link

Copilot AI Feb 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent capitalization: "operator's" should be "Operator's" to match the convention used throughout the document when referring to the Percona Operator for PostgreSQL.

Suggested change
Controls the verbosity of the operator's logging output. This helps with debugging and monitoring the Operator behavior.
Controls the verbosity of the Operator's logging output. This helps with debugging and monitoring the Operator behavior.

Copilot uses AI. Check for mistakes.

Enables experimental or advanced features in the Operator. Feature gates allow you to opt into specific functionality that may not be enabled by default.

The value needs to be a key-value with comma-separated list of feature gates. By default this variable is not set in the Operator.
Copy link

Copilot AI Feb 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awkward phrasing: "The value needs to be a key-value with comma-separated list" should be "The value is a comma-separated list of key-value pairs" or "The value is a comma-separated list of feature gate key-value pairs" for better clarity.

Suggested change
The value needs to be a key-value with comma-separated list of feature gates. By default this variable is not set in the Operator.
The value is a comma-separated list of feature gate key-value pairs. By default this variable is not set in the Operator.

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants