This package provides a wrapper to invoke Helm v3 commands using PHP code.
Installing can be done through a variety of methods, although Composer is recommended.
Include the following snipped into the composer.json file.
"require": {
"processmaker/laravel-helm": "^1.0"
}or by using the composer require command:
composer require processmaker/laravel-helmReleases are available on Github.
In order to use the Laravel Helm package, Helm v3 binary must be installed on your system. It is required to setup the right path where the Helm binary is located on the server.
Laravel Helm uses the path /usr/bin/helm by default, but it can be configured using an environment variable defined into the .env
HELM_BINARY_PATH=/path/to/helm/binary# Set the internal `Process` timeout, default=3600
HELM_PROCESS_TIMEOUT=3600All Helm commands follow this pattern:
- Call a static factory method (e.g.,
Helm::install()) - Call
run()to execute the command - Check
isSuccessful()to verify execution - Use
getOutput()to get command output
The current version of the package implements the following commands:
- helm version
- helm install
- helm upgrade
- helm delete
- helm uninstall
Also implements a method rawCommand where any other command can be executed.
use ProcessMaker\LaravelHelm\Helm;
...
$helm = Helm::version();
$helm->run();
// Prints the command response for the command 'helm version'
$version = $helm->getOutput();
...Parameters:
- name: installation name (required)
- chart: helm chart (required)
- options: options array (optional)
- environments: environment variables array (optional)
use ProcessMaker\LaravelHelm\Helm;
...
$helm = Helm::install(
'releasename',
'oci://registry-1.docker.io/bitnamicharts/redis',
[
"--version" => '16.18.2'
]
);
$helm->run();
// To check the command was executed successfully
if ($helm->isSuccessful()) {
// HELM app installed
...
}
...Parameters:
- name: installation name (required)
- chart: helm chart (required)
- options: options array (optional)
- environments: environment variables array (optional)
use ProcessMaker\LaravelHelm\Helm;
...
$helm = Helm::upgrade(
'releasename',
'oci://registry-1.docker.io/bitnamicharts/redis',
[
"--version" => '16.18.2',
'--install'
]
);
$helm->run();
// To check the command was executed successfully
if ($helm->isSuccessful()) {
// HELM app upgraded
...
}
...Parameters:
- name: installation name (required)
- options: options array (optional)
- environments: environment variables array (optional)
use ProcessMaker\LaravelHelm\Helm;
...
$helm = Helm::delete('releasename');
$helm->run();
// To check the command was executed successfully
if ($helm->isSuccessful()) {
// HELM app uninstalled
...
}
...Parameters:
- name: installation name (required)
- options: options array (optional)
- environments: environment variables array (optional)
use ProcessMaker\LaravelHelm\Helm;
...
$helm = Helm::uninstall('releasename');
$helm->run();
// To check the command was executed successfully
if ($helm->isSuccessful()) {
// HELM app uninstalled
...
}
...Parameters:
- command: string command to be executed (required)
- options: options array (optional)
- environments: environment variables array (optional)
use ProcessMaker\LaravelHelm\Helm;
...
// Example using simple commands
$helm = Helm::rawCommand('list');
$helm->run();
// Example using commands with parameters
$helm = Helm::rawCommand('list --all');
$helm->run();
// Example combining with $options
$helm = Helm::rawCommand('list --output json', ['--all']);
$helm->run();
...The most of the methods for the Helm object uses the $options array. This is an example how the option are being parsed:
use ProcessMaker\LaravelHelm\Helm;
...
// Define options array
$options = [
'--version' => '1.0.0', // include parameters using --name=value
'--create-namespace', // include single --parameters
'app.host' => 'https://10.0.0.1', // values from values.yaml file
'-n' => 'default', // -name value parameters
'-A', // single - parameters
'dry-run' // fix invalid inputs
];
$helm = Helm::install(
'myredis',
'oci://registry-1.docker.io/bitnamicharts/redis',
$options
);
$helm->run();
// the command parsed will be:
// helm install myredis oci://registry-1.docker.io/bitnamicharts/redis --version=1.0.0
// --create-namespace --set app.host=https://10.0.0.1 -n default -A --dry-run
...If is required to include environment variables to the helm execution context, this can be done using the $environments array.
use ProcessMaker\LaravelHelm\Helm;
...
// List all helm applications pointing to a different cluster
$helm = Helm::rawCommand(
'list --all',
[],
[
'KUBECONFIG' => '/path/to/another/cluster/kubeconfig'
]
);
// Executing helm with the KUBECONFIG env vars enabled
$helm->run();
...Always check if the command was successful after execution:
use ProcessMaker\LaravelHelm\Helm;
...
$helm = Helm::install('myapp', 'chart/name');
$helm->run();
if (!$helm->isSuccessful()) {
$error = $helm->getErrorOutput();
// Handle error appropriately
...
}
...- Commands are lazy - they don't execute until
run()is called - The
Helminstance proxies methods to SymfonyProcess, so you can use any Process methods - Process timeout defaults to 3600 seconds (1 hour), configurable via
HELM_PROCESS_TIMEOUT - Default Helm binary path is
/usr/bin/helm, configurable viaHELM_BINARY_PATH - All methods return a
Helminstance, allowing method chaining
- Always check
isSuccessful()after running commands - Use
rawCommand()for commands not covered by specific methods - Use environment variables for multi-cluster scenarios
- Set appropriate timeouts for long-running operations
- Handle errors gracefully and log command outputs for debugging
In order to validate that the package is fully functional always we can run:
composer testLaravel Helm package is licensed under the Apache 2.0. See the LICENSE file for details. 2026
Issues can be opened directly in Github.