Helm Action Pack (PCK.AUTOMIC_HELM)

This Action Pack allows you to install, upgrade, remove and inspect Helm releases from CDA.

HELM ACTION PACK v1.0.0

The actions that are contained in this action pack are preinstalled with Automic Continuous Delivery Automation.

Supported Platforms and Prerequisites

For more information about supported platforms, see Automic Compatibility Matrix

Workflow Template

The following workflow depicts how to assemble the Helm Actions to deploy a Helm Chart (for example, Wordpress application) to a Kubernetes cluster.

Common PromptSets

PromptSet: PCK.ITPA_SHARED.PRV.PROMPTSET.OVERWRITE_AGENT

Name

Type

Description

Overwrite Agent

&AGENT#

ComboElement

 

Overwrites the default agent.

Overwrite Login

&LOGIN#

ComboElement

 

Overwrites the default login.

This pack includes the following actions:

Helm Deploy Action

This action reads all dynamic properties of the Component in a given namespace, then creates temporary values in the config.yaml and runs the helm install command with the variables file.

Note: This Action can also run on a Linux system.

ClosedInput Values

Name

Type

Description

*Chart

&UC4RB_HELM_CHART#

TextElement

Chart reference

Release name

&UC4RB_HELM_RELEASE_NAME#

TextElement

Release name to be passed to the helm CLI

Kube context

&UC4RB__HELM_KUBE_CONTEXT#

TextElement

 

Flags

&UC4RB_HELM_FLAGS#

TextElement

Additional flags which can be passed to the helm install command.

Dynamic Property Namespace

&UC4RB_HELM_NAMESPACE#

TextElement

Namespace of Dynamic Properties containing the setting for Helm Install.

Helm Upgrade Action

This action reads all dynamic properties of the Component in a given namespace, then creates temporary values in the config.yaml and runs the helm upgrade command with the variables file

Note: This Action can also run on a Linux system.

ClosedInput Values

Name

Type

Description

*Chart location

&UC4RB_HELM_CHART_LOCATION#

TextElement

Chart reference

Release name

&UC4RB_HELM_RELEASE_NAME#

TextElement

Release name to be passes to the helm CLI

Kube context

&UC4RB_HELM_KUBE_CONTEXT#

TextElement

 

Additional flags

&UC4RB_HELM_FLAGS#

TextElement

Additional flags which can be passed to the helm install command.

Dynamic Property Namespace

&UC4RB_HELM_NAMESPACE#

TextElement

Namespace of Dynamic Properties containing the setting for Helm Install.

Helm Check Status Action

This Action checks the status of the pods related to the Helm release.

ClosedInput Values

Name

Type

Description

*Name

&UC4RB_HELM_RLS_NAME#

TextElement

Name of the Helm release.

Example: mouthy-tapir

Resource Kind

&UC4RB_HELM_RES_KIND#

TextElement

Kubernetes Resource Kind.

Example: v1/Pod

Resource items filter

&UC4RB_HELM_RES_NAME_FILTER#

TextElement

Resource items filter.

Example:mouthy-tapir-wordpress-*

Resource status column

&UC4RB_HELM_RES_STATUS_COLUMN#

TextElement

Resource status column index.

Default: 1

Additional flags

&UC4RB_HELM_ADDITIONAL_FLAGS#

TextElement

Additional flags which can be passed to the Helm status command.

Example:

LAST DEPLOYED: Tue Jan  8 18:38:23 2019
NAMESPACE: default
STATUS: DEPLOYED

RESOURCES:
==> v1/Secret
NAME                    AGE
mouthy-tapir-mariadb    16h
mouthy-tapir-wordpress  16h

==> v1/ConfigMap
mouthy-tapir-mariadb        16h
mouthy-tapir-mariadb-tests  16h

==> v1/PersistentVolumeClaim
mouthy-tapir-wordpress  16h

==> v1/Service
mouthy-tapir-mariadb    16h
mouthy-tapir-wordpress  16h

==> v1beta1/Deployment
mouthy-tapir-wordpress  16h

==> v1beta1/StatefulSet
mouthy-tapir-mariadb  16h

==> v1/Pod(related)

NAME                                     READY  STATUS   RESTARTS  AGE
mouthy-tapir-wordpress-68f444cb8f-qvllx  1/1    Running  2         16h
mouthy-tapir-wordpress-68f444cb8f-abkzt  1/1    Running  2         16h
mouthy-tapir-mariadb-0                   1/1    Running  1         16h


NOTES:
1. Get the WordPress URL:

  NOTE: It may take a few minutes for the LoadBalancer IP to be available.
        Watch the status with: 'kubectl get svc --namespace default -w mouthy-tapir-wordpress'
  export SERVICE_IP=$(kubectl get svc --namespace default mouthy-tapir-wordpress --template "{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}")
  echo "WordPress URL: http://$SERVICE_IP/"
  echo "WordPress Admin URL: http://$SERVICE_IP/admin"

2. Login with the following credentials to see your blog

  echo Username: user
  echo Password: $(kubectl get secret --namespace default mouthy-tapir-wordpress -o jsonpath="{.data.wordpress-password}" | base64 --decode)

ClosedOutput Values

Name

Description

&UC4RB_HELM_RLS_LAST_DEPLOYED#

Date and time of the latest release deployed.

Example: Tue Jan 8 18:38:23 2019

&UC4RB_HELM_RLS_NAMESPACE#

Namespace

&UC4RB_HELM_RLS_STATUS#

Release status

&UC4RB_HELM_RES_STATUS#

Status of the selected resource in selected column.

Example: [Running,Running]

Helm Delete Action

This Action deletes a Helm release if it has the status "failed".

ClosedInput Values

Name

Type

Description

*Release name

&UC4RB_HELM_RELEASE_NAME#

TextElement Name of the release to be deleted.

Timeout

&UC4RB_HELM_TIMEOUT#

TextElement A value in seconds to wait for Kubernetes commands to complete.

Additional flags

&UC4RB_HELM_ADDITIONAL_FLAGS#

TextElement

Additional flags which can be passed to the Helm delete command.