PHP K8s
Github Repo
master
master
  • ๐ŸšขIntroduction
  • ๐ŸŽ‰Support
  • โซUpgrading to 3.x
  • Getting Started
    • ๐Ÿš€Installation
    • ๐Ÿ™ŒShowcase
    • ๐Ÿ”’Authentication
    • โ™ป๏ธActive Development
      • ๐Ÿ“—Default Versions
      • ๐Ÿง™Supported Kubernetes versions
      • ๐Ÿ—ณ๏ธPackage versioning
  • Cluster Interaction
    • ๐ŸงญGetting Started
    • ๐ŸŽญCRUD Operations
    • ๐Ÿ“ฆImport from YAML
    • ๐Ÿ‘€Watching Resources
  • Resources
    • ๐Ÿ‘“Base Resource
      • Attributes Methods
      • Metadata Methods
      • Custom Callers
    • ๐Ÿง‘Namespace
    • ๐Ÿ–ฅ๏ธNode
    • ๐Ÿ“กEvent
    • ๐Ÿ“ฆWorkloads
      • Pod
      • Deployment
      • StatefulSet
      • DaemonSet
      • Job
      • CronJob
    • ๐ŸงตConfigurations
      • ConfigMap
      • Secret
    • ๐Ÿ“€Storage
      • StorageClass
      • PersistentVolume
      • PersistentVolumeClaim
    • ๐Ÿ“ถNetworking
      • Service
      • Ingress
    • โ†”๏ธScaling & Availability
      • HorizontalPodAutoscaler
      • PodDisruptionBudget
    • ๐Ÿ”‘RBAC
      • ClusterRole
      • ClusterRoleBinding
      • Role
      • RoleBinding
      • ServiceAccount
  • Instances
    • Affinity
    • Container
    • Container Probes
    • Expressions
    • Resource Metrics
    • RBAC Rules
    • Volumes
  • Advanced
    • ๐ŸฐMacros
    • โœจCreate classes for CRDs
      • ๐ŸŽ‡Getting started
      • ๐ŸฐMacros
      • ๐Ÿ‘€Watchable Resources
      • โ†”๏ธScalable Resources
      • ๐Ÿ’ŠPodable Resources
      • ๐Ÿ“„Loggable Resources
      • ๐Ÿš’Helper Traits
  • Frameworks
    • Laravel
    • PHP Helm
Powered by GitBook
On this page
  • ๐Ÿš€ Installation
  • ๐Ÿ™Œ Usage
  • Flags & Environment Variables
  • Add Repo
  • Install/Upgrade Release
  • Specifying Binary Path

Was this helpful?

Edit on GitHub
  1. Frameworks

PHP Helm

PHP Helm Processor is a process wrapper for Kubernetes' Helm v3 CLI. You can run programmatically Helm v3 commands, directly from PHP, with a simple syntax.

PreviousLaravel

Last updated 3 years ago

Was this helpful?

PHP Helm Processor is a process wrapper for Kubernetes' Helm v3 CLI. You can run programmatically Helm v3 commands, directly from PHP, with a simple syntax.

๐Ÿš€ Installation

You can install the package via composer:

composer require renoki-co/php-helm

For Laravel, you may Publish the config:

php artisan vendor:publish --provider="RenokiCo\PhpHelm\PhpHelmServiceProvider" --tag="config"

๐Ÿ™Œ Usage

use RenokiCo\PhpHelm\Helm;

$helm = Helm::repoAdd(
    'add',
    'stable',
    'https://charts.helm.sh/stable'
);

$helm->run();

// The process is based on symfony/process
echo $helm->getOutput();

Flags & Environment Variables

You might want to pass flags to the commands:

use RenokiCo\PhpHelm\Helm;

$helm = Helm::repoAdd(
    'stable',
    'https://charts.helm.sh/stable',
    ['--no-update' => true]
);

$helm->run();

A third parameter is used for envs:

use RenokiCo\PhpHelm\Helm;

$helm = Helm::repoAdd(
    'stable',
    'https://charts.helm.sh/stable',
    ['--no-update' => true],
    ['SOME_ENV' => '1234']
);

$helm->run();

Add Repo

use RenokiCo\PhpHelm\Helm;

$helm = Helm::addRepo('stable', 'https://charts.helm.sh/stable', [
    '--no-update' => true,
    '--debug' => true,
]);

$helm->run();

Install/Upgrade Release

use RenokiCo\PhpHelm\Helm;

$helm = Helm::install('my-release', 'stable/postgres');

$helm->run();
use RenokiCo\PhpHelm\Helm;

$helm = Helm::upgrade('my-release', 'stable/postgres');

$helm->run();

Specifying Binary Path

You can call it once to set the path to the binary to the helm cli:

use RenokiCo\PhpHelm\Helm;

Helm::setHelmPath('/usr/bin/my-path/helm');

For Laravel, you might simply publish the config and set the HELM_PATH env variable:

HELM_PATH=/usr/bin/my-path/helm
CI
StyleCI
License
Latest Stable Version
Total Downloads
Monthly Downloads
codecov