helmt

command module
v0.9.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

README

helmt - A simple wrapper around helm template

Sometimes you only want to use helm to template Kubernetes manifests.

Usage:
  helmt <filename> [flags]

Flags:
      --config string     config file (default is $HOME/.helmt.yaml)
  -h, --help              help for helmt
  -p, --password string   optional password for chart repository
  -u, --username string   optional username for chart repository
  -v, --version           version for helmt

Flags, environment variables and config file

The following flags can also be set via environment variables. But command line parameters have always precedence.

Flag Environment variable
config HELMT_CONFIG
username HELMT_USERNAME
password HELMT_PASSWORD

The config is a simple yaml file with the names of the flags as keys. Example:

username: anonymous

Please note that environment variables and command line parameters overwrite these settings.

Example

All you need to do is to create a yaml file describing which chart you want to template:

chart: jenkins
version: 2.0.0
repository: https://kubernetes-charts.storage.googleapis.com
name: jenkins

or

chart: syncier-jenkins
version: 5.6.0
repository: https://hub.syncier.cloud/chartrepo/library/charts
namespace: jenkins
name: jenkins
values:
  - values1.yaml
  - values2.yaml

Then you can run helmt helm-charts.yaml and it will download the chart and render the contents using the parameters defined in the yaml file.

helm version
version.BuildInfo{Version:"v3.1.1", GitCommit:"afe70585407b420d0097d07b21c47dc511525ac8", GitTreeState:"clean", GoVersion:"go1.13.8"}
helm fetch https://kubernetes-charts.storage.googleapis.com/jenkins-2.0.0.tgz
helm template jenkins jenkins-2.0.0.tgz --output-dir .
wrote ./jenkins/templates/service-account.yaml
wrote ./jenkins/templates/secret.yaml
wrote ./jenkins/templates/config.yaml
wrote ./jenkins/templates/jcasc-config.yaml
wrote ./jenkins/templates/tests/test-config.yaml
wrote ./jenkins/templates/home-pvc.yaml
wrote ./jenkins/templates/rbac.yaml
wrote ./jenkins/templates/rbac.yaml
wrote ./jenkins/templates/rbac.yaml
wrote ./jenkins/templates/rbac.yaml
wrote ./jenkins/templates/jenkins-agent-svc.yaml
wrote ./jenkins/templates/jenkins-master-svc.yaml
wrote ./jenkins/templates/jenkins-master-deployment.yaml

If the chart repository needs authentication, provide credentials via --username and --password or environment variables.

Documentation

Overview

Copyright © 2020 Syncier GmbH <info@syncier.com>

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL