Skip to content

[4.7.x] Add pod.labels support to all helm charts - #259

Open
kavindasr wants to merge 2 commits into
wso2:4.7.xfrom
kavindasr:port-pod-labels-4.7.x
Open

[4.7.x] Add pod.labels support to all helm charts#259
kavindasr wants to merge 2 commits into
wso2:4.7.xfrom
kavindasr:port-pod-labels-4.7.x

Conversation

@kavindasr

Copy link
Copy Markdown
Contributor

Purpose

Port of #174 (merged to 4.6.x) so that wso2.deployment.pod.labels is available on this branch too.

Goals

Add wso2.deployment.pod.labels configuration to all WSO2 APIM helm charts, enabling users to set custom labels for pod organization, monitoring, cost allocation, and policy enforcement.

Approach

Added pod.labels: {} to values.yaml and updated the deployment templates to merge custom labels with the default labels in all 5 charts:

  • all-in-one (2 instances)
  • distributed/control-plane (2 instances)
  • distributed/gateway
  • distributed/key-manager
  • distributed/traffic-manager (2 instances)

Implementation follows the existing pod.annotations pattern for consistency.

Template changes:

labels:
  deployment: {{ template "chart.fullname" . }}
  product: apim
  {{- if .Values.wso2.deployment.pod.labels }}
  {{- toYaml .Values.wso2.deployment.pod.labels | nindent 8 }}
  {{- end }}

Usage example:

wso2:
  deployment:
    pod:
      annotations:
        prometheus.io/scrape: "true"
      labels:
        team: platform
        environment: production
        cost-center: engineering

Release note

Added support for custom pod labels via wso2.deployment.pod.labels configuration in all helm charts.

Documentation

README.md files for all 5 charts regenerated with helm-docs (v1.14.2).

Automation tests

  • Unit tests: N/A (helm charts)
  • Integration tests: helm lint passes for all 5 charts; helm template verified with both default values (output identical to before) and custom pod.labels (labels correctly merged into the pod template).

Security checks

Related PRs

Migrations (if applicable)

N/A - Backward compatible. Default value is an empty map {}, producing identical output to previous versions.

Test environment

  • Helm 3.x
  • helm-docs 1.14.2

Port of wso2#174 (merged to 4.6.x).

Adds wso2.deployment.pod.labels to all five charts, allowing custom
labels to be merged into the pod template labels alongside the default
deployment/node/product labels. Follows the existing
wso2.deployment.pod.annotations pattern.

READMEs regenerated with helm-docs.
@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: b929d6cc-86f1-438d-b664-7d59581e071f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

- Note in each chart's values.yaml that the Deployment selector keys
  (`deployment`, plus `node` where the chart uses it) must not be
  overridden via wso2.deployment.pod.labels. READMEs regenerated with
  helm-docs.
- Add the wso2.deployment.pod block (annotations + labels) to all 14
  pattern values files under resources/, which had been out of sync
  with the charts since the pod.annotations refactor.
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.

1 participant