Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add support for --set-file flag in install, upgrade, and template commands #318

Description

@afalhambra-hivemq

Summary

This feature request adds support for Helm's --set-file flag to the Java client, allowing users to set chart values by reading their contents from files.

Motivation

The native Helm CLI supports the --set-file flag for install, upgrade, and template commands. This flag is useful when:

  • Chart values are too lengthy for command-line entry
  • Values are dynamically generated and stored in files
  • You need to pass file contents (like configuration files, scripts, or certificates) as chart values

Currently, the Helm Java client does not expose this functionality.

Proposed Changes

Add setFile(String key, Path file) method to:

  • InstallCommand
  • UpgradeCommand
  • TemplateCommand

Usage Example

// Install with file-based values
Path configFile = Paths.get("/path/to/config.txt");
Helm.install("my-chart")
  .withName("my-release")
  .setFile("configData", configFile)
  .call();

// Upgrade with file-based values
Helm.upgrade("my-chart")
  .withName("my-release")
  .setFile("script", Paths.get("/path/to/script.sh"))
  .call();

// Template with file-based values
String manifests = Helm.template("my-chart")
  .setFile("certificate", Paths.get("/path/to/cert.pem"))
  .call();

Implementation

Implementation requires changes across all layers:

  • Go native layer (InstallOptions, UpgradeOptions, TemplateOptions)
  • C bindings (FFI layer)
  • JNA bridge layer
  • Java API layer

Activity

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

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions