Skip to content

feat: add helm global values#315

Open
krishnaGajabi wants to merge 1 commit intoopenebs:developfrom
krishnaGajabi:develop
Open

feat: add helm global values#315
krishnaGajabi wants to merge 1 commit intoopenebs:developfrom
krishnaGajabi:develop

Conversation

@krishnaGajabi
Copy link
Copy Markdown

@krishnaGajabi krishnaGajabi commented Mar 18, 2026

Why is this PR required? What issue does it fix?

Currently, the Helm charts do not provide global variables for configuring common parameters such as the image registry, image pull secrets, image pull policy, and analytics settings.

When deploying the OpenEBS Helm charts, users often need to override these values across multiple subcharts and components. This makes it difficult to locate and configure all the required fields consistently. Providing global variables simplifies configuration and improves the user experience.

What does this PR do?

This PR introduces the following global configuration variables:

global:
  # Global override for container image registry (when `globalImageRegistryOverride` is set to true)
  imageRegistry: "docker.io"
  # Global image pull secrets (merged with local imagePullSecrets and not overridden)
  # - secret
  imagePullSecrets: []
  # Global override for image pull policy
  imagePullPolicy: ""
  analytics:
    # Global override for analytics
    enabled:
# When set to true, the value of `global.imageRegistry` will override all image registry settings defined at local level
globalImageRegistryOverride: false

These variables allow users to configure common settings in a single place, which will then be applied across the chart components.

Does this PR require any upgrade changes?

No.

Verification

The changes were verified using the following scenarios:

Rendered the templates using helm template to confirm correct value substitution.

Deployed the chart on a Kubernetes cluster with 3 worker nodes (kubeadm-based setup).

Verified that the global values are rendered and applied correctly across the components.

@krishnaGajabi krishnaGajabi requested a review from a team as a code owner March 18, 2026 08:31
@krishnaGajabi krishnaGajabi force-pushed the develop branch 3 times, most recently from c7d4afc to 9dfb7c1 Compare March 18, 2026 09:00
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 54.00%. Comparing base (0c375ea) to head (f14db5d).
⚠️ Report is 4 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #315   +/-   ##
========================================
  Coverage    54.00%   54.00%           
========================================
  Files            1        1           
  Lines          474      474           
========================================
  Hits           256      256           
  Misses         209      209           
  Partials         9        9           
Flag Coverage Δ
integrationtests 54.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread deploy/helm/charts/templates/_helpers.tpl Outdated
Comment thread deploy/helm/charts/templates/_helpers.tpl Outdated
Comment thread deploy/helm/charts/templates/_helpers.tpl Outdated
Comment thread deploy/helm/charts/templates/_helpers.tpl Outdated
Copy link
Copy Markdown

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

Adds chart-wide (“global”) Helm values to simplify configuring shared settings (image registry/pull secrets/pull policy and analytics) across the OpenEBS LocalPV chart, and updates templates to consume those globals via shared helpers.

Changes:

  • Introduces new global.* values (image registry, pull secrets, pull policy, analytics) plus a globalOverride switch.
  • Refactors Deployment/DaemonSet templates to use new helper templates for image and pull-secret rendering.
  • Updates README configuration table to document the new values.

Reviewed changes

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

Show a summary per file
File Description
deploy/helm/charts/values.yaml Adds new global.* values and globalOverride knob.
deploy/helm/charts/templates/deployment.yaml Uses shared helpers for image/pull secrets and attempts to add global analytics/pull policy support.
deploy/helm/charts/templates/daemonset.yaml Uses shared helpers for image/pull secrets and adds global analytics handling.
deploy/helm/charts/templates/_helpers.tpl Adds helper templates for building image strings and merging pull secrets.
deploy/helm/charts/README.md Documents the new global values (but needs cleanup to avoid conflicts).

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

Comment thread deploy/helm/charts/templates/deployment.yaml Outdated
Comment thread deploy/helm/charts/values.yaml
Comment thread deploy/helm/charts/values.yaml Outdated
Comment thread deploy/helm/charts/README.md Outdated
Comment thread deploy/helm/charts/README.md Outdated
@krishnaGajabi krishnaGajabi force-pushed the develop branch 6 times, most recently from f383839 to edd4f1c Compare April 16, 2026 08:14
Copy link
Copy Markdown
Member

@niladrih niladrih left a comment

Choose a reason for hiding this comment

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

globalOverride is meant to affect all of the .global keys, i.e. imageRegistry, imagePullSecrets (this will be merge behaviour, so no real change maybe), imagePullPolicy, analytics.enabled.

@krishnaGajabi
Copy link
Copy Markdown
Author

globalOverride is meant to affect all of the .global keys, i.e. imageRegistry, imagePullSecrets (this will be merge behaviour, so no real change maybe), imagePullPolicy, analytics.enabled.
Got it.

just fyi, globalOverride is by default set to false, hence we to unset related values in local variable. (default values are always set and given value(overriden) is kept empty so that user can override the default value)
example:

global:
  # Global override for container image registry (when `globalOverride` is set to true)
  imageRegistry: "docker.io"  // here
  # Global image pull secrets (merged with local imagePullSecrets and not overridden)
  # - secret
  imagePullSecrets: []
  # Global override for image pull policy (when `globalOverride` is set to true)
  imagePullPolicy: "IfNotPresent". //here
  analytics:
    # Global override for analytics (when `globalOverride` is set to true)
    enabled: true  //here

all related local values have to be unset
example:

localpv:
  name: localpv-provisioner
  enabled: true
  image:
    registry: ""  //here
    repository: openebs/provisioner-localpv
    tag: 4.5.0-develop
    pullPolicy: "" //here
helperPod:
  image:
    registry: ""   //here
    repository: openebs/linux-utils
    pullPolicy: "" //here
analytics:
  enabled:     //here

@krishnaGajabi krishnaGajabi force-pushed the develop branch 2 times, most recently from 3bb8469 to b3ea0b4 Compare April 20, 2026 12:52
@krishnaGajabi
Copy link
Copy Markdown
Author

globalOverride is meant to affect all of the .global keys, i.e. imageRegistry, imagePullSecrets (this will be merge behaviour, so no real change maybe), imagePullPolicy, analytics.enabled.

globalOverride is meant to affect all of the .global keys, i.e. imageRegistry, imagePullSecrets (this will be merge behaviour, so no real change maybe), imagePullPolicy, analytics.enabled.

Done

Comment thread deploy/helm/charts/templates/deployment.yaml
@krishnaGajabi
Copy link
Copy Markdown
Author

@tiagolobocastro / @niladrih , I've pushed the requested changes, PTAL

Comment thread deploy/helm/charts/README.md Outdated
Signed-off-by: krishnaGajabi <[email protected]>
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.

5 participants