Skip to content

fix(topology): support unique helm values per worker cluster#86

Open
ani1609 wants to merge 1 commit intokubeslice:masterfrom
ani1609:bugfix/topology-per-worker-helm-values-68
Open

fix(topology): support unique helm values per worker cluster#86
ani1609 wants to merge 1 commit intokubeslice:masterfrom
ani1609:bugfix/topology-per-worker-helm-values-68

Conversation

@ani1609
Copy link

@ani1609 ani1609 commented Aug 2, 2025

Description

Implements per-worker helm values feature allowing individual worker clusters to have custom helm chart configurations while maintaining full backward compatibility.

Overview

This enhancement enables users to specify custom helm chart values for individual worker clusters, providing greater flexibility in configuring worker-specific settings while preserving the existing global configuration approach.

Key Changes

Core Implementation

  • Added HelmValues field to Cluster struct (pkg/internal/bootstrap-configuration.go)
  • Implemented value merging logic in CreateWorkerSpecificHelmChart() (pkg/internal/worker.go)
  • Updated worker installation to use merged per-worker values

Value Merging Behavior

  1. Global values serve as defaults for all workers
  2. Per-worker values override/extend global values
  3. Workers without helm_values use global values only (backward compatible)

Example Usage

# Global defaults
helm_chart_configuration:
  worker_chart:
    values:
      resources.limits.cpu: "500m"
      resources.limits.memory: "512Mi"

# Per-worker overrides
workers:
  - name: high-perf-worker
    helm_values:
      resources.limits.cpu: "2000m"    # Override
      resources.limits.memory: "4Gi"   # Override
      nodeSelector.performance: "high" # New value

Fixes #68

How Has This Been Tested?

Test cases:

  • Backward compatibility: Workers without helm_values use global configuration
  • Value merging: Per-worker values correctly override global values
  • New values: Per-worker specific values are properly added
  • Edge cases: Empty helm_values fields are handled gracefully
  • Integration: End-to-end worker deployment with custom values

Test configuration:

  • Multiple worker clusters with varying helm value configurations
  • Mixed scenarios with some workers having custom values and others using defaults
  • Verification of actual deployed helm chart values in Kubernetes clusters

Checklist:

  • The title of the PR states what changed and the related issues number (used for the release note).
  • Does this PR requires documentation updates?
  • I've updated documentation as required by this PR.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have tested it for all user roles.
  • I have added all the required unit test cases.

Does this PR introduce a breaking change?


@ani1609 ani1609 marked this pull request as draft August 2, 2025 11:28
Signed-off-by: Ankit Kr Chowdhury <rakesh856100@gmail.com>
@ani1609 ani1609 force-pushed the bugfix/topology-per-worker-helm-values-68 branch from acd717d to cdda734 Compare August 2, 2025 11:29
@ani1609 ani1609 marked this pull request as ready for review August 2, 2025 11:32
@ani1609
Copy link
Author

ani1609 commented Aug 2, 2025

hey @narmidm, mind taking a quick look at this when you get a chance?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant