Skip to content

Conversation

pjuarezd
Copy link
Member

Helm Chart Enhancement: YAML Configuration File Support

Summary

This PR enhances the Warp Helm chart to support full YAML configuration files, providing users with access to all Warp features while maintaining backward compatibility with the existing configuration method.

Key Changes

1. New Configuration Method (configFile)

  • Added support for complete YAML configuration files following Warp's native format
  • Users can now leverage all Warp features available in the YAML samples
  • Configuration file is automatically enhanced with warp-client property based on replicaCount
  • Takes precedence over legacy warpConfiguration when both are defined

2. Automatic warp-client Injection

  • The Helm chart automatically generates and injects the warp-client property
  • Format: <release-name>-{0...<replicaCount-1>}.<release-name>.<namespace>
  • Users don't need to manually configure distributed client addresses

3. Job Restart on Upgrade

  • New feature: Jobs can automatically restart on helm upgrade
  • Controlled via job.restartOnUpgrade setting (default: true)
  • When enabled, each upgrade creates a new job with revision suffix (e.g., warp-1, warp-2)
  • Previous job results remain available for debugging/analysis

4. Default Configuration Update

  • configFile is now the default configuration method
  • Legacy warpConfiguration and warpJobArgs are commented out by default
  • Includes working default configuration for immediate deployment

5. Enhanced User Experience

  • Added NOTES.txt with immediate log viewing instructions
  • Displays exact kubectl logs -f command after installation
  • Shows configuration summary and target hosts

Files Modified

Templates

  • templates/configmap.yaml - New template for YAML config management
  • templates/statefulset.yaml - Updated to support config file mounting
  • templates/job.yaml - Enhanced with config file support and restart behavior
  • templates/secret.yaml - Made conditional for legacy configuration only
  • templates/NOTES.txt - New file with post-installation instructions

Configuration

  • values.yaml - Updated with configFile as default, legacy options commented
  • values-configfile-example.yaml - New example file demonstrating advanced configuration
  • CONFIG.md - New comprehensive configuration guide

Documentation

  • k8s/README.md - Updated with new configuration examples
  • k8s/helm/README.md - Enhanced with configuration method descriptions

Backward Compatibility

Fully backward compatible - Existing deployments using warpConfiguration will continue to work without changes.

Migration Path

Users can migrate from legacy to new configuration by:

  1. Converting their warpConfiguration values to YAML format
  2. Setting the configFile value in their values.yaml
  3. Removing warpConfiguration and warpJobArgs sections

Benefits

  1. Full Feature Access: Access to all Warp YAML configuration options
  2. Simplified Configuration: Single YAML block instead of multiple scattered settings
  3. Better GitOps Support: Job restart on upgrade with unique naming
  4. Improved UX: Immediate log viewing instructions after installation
  5. Future-Proof: Aligned with Warp's native configuration format

Testing

All templates have been validated with:

  • helm lint - No errors or warnings
  • helm template - Correct rendering for both configuration methods
  • Various configuration scenarios tested

Example Usage

Quick Start (with defaults)

helm install warp ./k8s/helm
kubectl logs -f job/warp-1

Advanced Configuration

configFile: |
  warp:
    api: v1
    benchmark: mixed
    remote:
      access-key: 'minioadmin'
      secret-key: 'minioadmin'
      host:
        - 'minio-0.minio.default.svc.cluster.local:9000'
        - 'minio-1.minio.default.svc.cluster.local:9000'
      tls: true
      insecure: true
    params:
      duration: 10m
      concurrent: 32
      objects: 5000
      obj:
        size: 100MiB

Breaking Changes

None - All changes are additive or have sensible defaults.

Copy link

@Copilot 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 enhances the Warp Helm chart to support complete YAML configuration files, providing access to all Warp features while maintaining backward compatibility with the existing configuration method.

  • Introduces configFile option for complete YAML configuration support with automatic warp-client injection
  • Adds job restart capability on helm upgrade with unique naming
  • Provides comprehensive documentation and examples for both configuration methods

Reviewed Changes

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

Show a summary per file
File Description
k8s/helm/values.yaml Main helm values with configFile as default, legacy options commented
k8s/helm/values-configfile-example.yaml Complete example showing advanced YAML configuration options
k8s/helm/templates/secret.yaml Made conditional for legacy configuration only
k8s/helm/templates/job.yaml Enhanced with config file support and restart behavior
k8s/helm/templates/configmap.yaml New template for YAML config management with auto warp-client injection
k8s/helm/templates/NOTES.txt Post-installation instructions with log viewing commands
k8s/helm/README.md Updated with configuration method descriptions
k8s/helm/CONFIG.md Comprehensive configuration guide for both methods
k8s/README.md Enhanced with configuration examples and migration guidance

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

{{- include "warp.labels" . | nindent 4 }}
data:
warp-config.yml: |
{{- $config := .Values.configFile | fromYaml }}
Copy link

Copilot AI Sep 27, 2025

Choose a reason for hiding this comment

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

The variable $_ is used to discard the return value of set, but this creates an unused variable. Consider using a more explicit approach or add a comment explaining why the return value is discarded.

Suggested change
{{- $config := .Values.configFile | fromYaml }}
{{- $config := .Values.configFile | fromYaml }}
{{- /* Discarding the return value of set; only the mutation side effect is needed. */ -}}

Copilot uses AI. Check for mistakes.

@pjuarezd pjuarezd force-pushed the helm-chart-with-config-file branch from 792fd15 to 6eaf2a9 Compare September 27, 2025 04:06
pjuarezd and others added 2 commits September 30, 2025 14:01
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@pjuarezd pjuarezd force-pushed the helm-chart-with-config-file branch from e0f353c to 5bcfaaa Compare September 30, 2025 20:01
@harshavardhana harshavardhana merged commit 2fb0428 into master Oct 7, 2025
6 checks passed
@harshavardhana harshavardhana deleted the helm-chart-with-config-file branch October 7, 2025 15:06
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.

2 participants