/test-helm-repo

Chaos Custom Helm Charts

Primary LanguageSmarty

Chaos Custom Helm Charts

Repository for Chaos Custom Helm Charts.

Helm Logo

Steps to test charts manually

  • Lint Helm charts to ensure syntax integrity.
helm lint charts/<chart-name>
  • Test chart works by generating a template
helm template charts/<chart-name>
  • OPTIONAL Test chart deploys by running against a k8s cluster
helm upgrade --install <release-name> charts/<chart-name> --dry-run --debug
  • Package new chart version
    • The --d flag points the output .tgz file to target dir
helm package charts/<target-chart>/ -d charts/<target-chart>/packages
  • Tag new commit with chart version
git add .
git commit -m "some message"
git tag <chart-version>
git push
git push origin v0.0.0
  • Optionally for multiple tags in local repository
git push origin --tags

Securely packaging and signing charts

  • GPG Keys are needed ahead of time and imported in .gpg fmt within ~/.gnupg

  • Package and sign

helm package --sign --key mykey-gpg --keyring ~/.gnupg/secring.gpg charts/<chart-name>/ -d charts/<chart-name>/packages/
  • Verify package signature
helm verify charts/<chart-name>/packages/<chart-name>-0.0.0.tgz --keyring ~/.gnupg/secring.gpg
  • Index signed chart
helm repo index charts/<chart-name>/packages/
  • Install and verify chart
helm upgrade --install --verify --keyring ~/.gnupg/secring.gpg <release-name> chaos-charts/<chart-name>
  • Uninstall verified chart
helm uninstall <release-name>

Resources

Reference

  • Repository Commands
helm repo list 
helm repo update 
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo remove bitnami
  • Search Commands
helm search repo bitnami
helm search repo mysql
helm search repo database
helm search repo database --versions
  • Installation Commands
helm install mydb bitnami/mysql 
  • With Values
helm install mydb bitnami/mysql --values somepath/values.yaml
  • Install and reuse values
helm install mydb bitnami/mysql --reuse-values
helm upgrade --install mydb bitnami/mysql 
helm upgrade mydb bitnami/mysql 
helm uninstall mydb
  • Optionally to keep history
helm uninstall mydb --keep-history
  • Rollback Commands
helm rollback mydb bitnami/mysql 
  • Status Commands
helm status <some-release-name>
  • Template Commands
helm template mydb bitnami/mysql
  • Helm Get Commands
helm get all metallb-metallb -n flux-system
helm get values metallb-metallb -n flux-system
helm get manifest metallb-metallb -n flux-system
helm get manifest metallb-metallb -n flux-system --revision 2
  • Helm History Commands
helm history metallb-metallb -n flux-system
  • Helm Rollback Commands
helm rollback mywebserver 1
  • Helm Package Commands
helm package charts/jellyfin-nfs
  • Helm dependency Commands
    • Updates chart dependencies and downloads the list into charts dir next to templates dir. Necessary steps when adding chart dependecies
helm dependency update charts/getting-started/

Directory Structure

.
├── README.md
└── charts
    ├── cert-manager-certificates
    │   ├── Chart.yaml
    │   ├── README.md
    │   ├── templates
    │   │   ├── NOTES.txt
    │   │   ├── _helpers.tpl
    │   │   └── chaos-certificate.yaml
    │   └── values.yaml
    └── cert-manager-issuers
        ├── Chart.yaml
        ├── README.md
        ├── templates
        │   ├── NOTES.txt
        │   ├── _helpers.tpl
        │   └── cluster-issuers.yaml
        └── values.yaml

6 directories, 13 files