项目作者: getporter

项目描述 :
Helm mixin for Porter
高级语言: Go
项目地址: git://github.com/getporter/helm-mixin.git
创建时间: 2018-12-07T22:45:06Z
项目社区:https://github.com/getporter/helm-mixin

开源协议:Apache License 2.0

下载


Helm v2 Mixin for Porter

Build Status

This is a Helm v2 mixin for Porter. It
executes the appropriate helm command based on which action it is included
within: install, upgrade, or delete.

🚨 Helm v2 is deprecated so
you should move to Helm v3 as soon as possible. After you migrate to Helm
3
, use the Helm 3
mixin
. 🚀

Install or Upgrade

  1. porter mixin install helm2

Mixin Configuration

Helm client version

  1. - helm2:
  2. clientVersion: v2.17.0

Add repositories

  1. - helm2:
  2. repositories:
  3. stable:
  4. url: "https://charts.helm.sh/stable

Mixin Syntax

Install

  1. install:
  2. - helm2:
  3. description: "Description of the command"
  4. name: RELEASE_NAME
  5. chart: STABLE_CHART_NAME
  6. version: CHART_VERSION
  7. namespace: NAMESPACE
  8. replace: BOOL
  9. devel: BOOL
  10. wait: BOOL # default true
  11. set:
  12. VAR1: VALUE1
  13. VAR2: VALUE2

Upgrade

  1. install:
  2. - helm2:
  3. description: "Description of the command"
  4. name: RELEASE_NAME
  5. chart: STABLE_CHART_NAME
  6. version: CHART_VERSION
  7. namespace: NAMESPACE
  8. resetValues: BOOL
  9. reuseValues: BOOL
  10. wait: BOOL # default true
  11. set:
  12. VAR1: VALUE1
  13. VAR2: VALUE2

Uninstall

  1. uninstall:
  2. - helm2:
  3. description: "Description of command"
  4. purge: BOOL
  5. releases:
  6. - RELEASE_NAME1
  7. - RELASE_NAME2

Outputs

The mixin supports saving secrets from Kuberentes as outputs.

  1. outputs:
  2. - name: NAME
  3. secret: SECRET_NAME
  4. key: SECRET_KEY

The mixin also supports extracting resource metadata from Kubernetes as outputs.

  1. outputs:
  2. - name: NAME
  3. resourceType: RESOURCE_TYPE
  4. resourceName: RESOURCE_TYPE_NAME
  5. namespace: NAMESPACE
  6. jsonPath: JSON_PATH_DEFINITION

Examples

Install

  1. install:
  2. - helm2:
  3. description: "Install MySQL"
  4. name: mydb
  5. chart: stable/mysql
  6. version: 0.10.2
  7. namespace: mydb
  8. replace: true
  9. set:
  10. mysqlDatabase: wordpress
  11. mysqlUser: wordpress
  12. outputs:
  13. - name: mysql-root-password
  14. secret: mydb-mysql
  15. key: mysql-root-password
  16. - name: mysql-password
  17. secret: mydb-mysql
  18. key: mysql-password
  19. - name: mysql-cluster-ip
  20. resourceType: service
  21. resourceName: porter-ci-mysql-service
  22. namespace: "default"
  23. jsonPath: "{.spec.clusterIP}"

Upgrade

  1. upgrade:
  2. - helm2:
  3. description: "Upgrade MySQL"
  4. name: porter-ci-mysql
  5. chart: stable/mysql
  6. version: 0.10.2
  7. wait: true
  8. resetValues: true
  9. reuseValues: false
  10. set:
  11. mysqlDatabase: mydb
  12. mysqlUser: myuser
  13. livenessProbe.initialDelaySeconds: 30
  14. persistence.enabled: true

Uninstall

  1. uninstall:
  2. - helm2:
  3. description: "Uninstall MySQL"
  4. purge: true
  5. releases:
  6. - mydb