Container deployment reference

4 minute read

CloudBees container and Kubernetes deployment actions provide inputs for packaging, publishing, installing, and managing Helm charts, and for creating and configuring Kubernetes resources. Use this reference alongside Deploy with Helm and Deploy to Kubernetes.

Helm actions

Helm actions package, publish, install, and uninstall charts in OCI-compatible registries and Kubernetes clusters.

helm-package

The cloudbees-io/helm-package action packages a Helm chart directory into a versioned TGZ archive file.

Table 1. Input details
Input name Data type Required? Description

chart

String

Yes

The path of the Helm chart to be packaged.

destination

String

Yes

The path of the packaged Helm chart.

version

String

Yes

The Helm release version.

app-version

String

Yes

The application version.

verify

Boolean

No

Default is false. When value is true, the package is verified.

sign

Boolean

No

Default is false. When value is true, the package is signed.

sign-key

String

No

The signing key.

helm-push

The cloudbees-io/helm-push action publishes a packaged Helm chart to an OCI registry and registers the chart as a trackable artifact in CloudBees Unify.

Inputs

Table 2. Input details
Input name Data type Required? Description

artifact-name

String

No

The name of the artifact, used when registering the build artifact in CloudBees Unify. If not provided, the artifact name defaults to the name of the chart.

chart

String

Yes

The path of the Helm chart package to be published.

commit

String

No

The commit ID from the source repository, used when registering the build artifact in CloudBees Unify. Default is ${{ cloudbees.scm.sha }}.

component-id

String

No

The component ID associated with the artifact. If not provided, the artifact is registered with the component of the current workflow run. Default is ${{ cloudbees.component.id }}.

ref

String

No

The ref or branch of the source repository, used when registering the build artifact in CloudBees Unify. Default is ${{ cloudbees.scm.ref }}.

remote

String

Yes

The URL of the published Helm chart package.

repository-url

String

No

The clone URL of the source repository, used when registering the build artifact in CloudBees Unify. Default is ${{ cloudbees.scm.repositoryUrl }}.

Outputs

Table 3. Output details
Output name Data type Description

artifact-id

String

The unique identifier of the artifact reported to CloudBees Unify.

chart

String

The image reference pointing to the chart upload location.

version

String

The version of the uploaded Helm chart package.

helm-install

The cloudbees-io/helm-install action installs a Helm chart into a Kubernetes cluster.

This action does not support using Helm charts from traditional Helm repositories, because it does not expose a repository input.
Table 4. Input details
Input name Data type Required? Description

release-name

String

Yes

The Helm release name.

chart-location

String

Yes

The Helm chart location, which is one of the following:

  • An OCI-based chart URL.

  • A local chart in TGZ archive format.

  • An unpacked local chart directory.

helm-uninstall

The cloudbees-io/helm-uninstall action removes a Helm chart release from a Kubernetes cluster.

Table 5. Input details
Input name Data type Required? Description

release-name

String

Yes

The Helm chart release name.

namespace

String

Yes

The Kubernetes namespace.

Kubernetes actions

Kubernetes actions create and configure namespaces, resource files, and Kustomize deployments.

create-k8s-namespace

The cloudbees-io/create-k8s-namespace action creates a namespace that partitions a Kubernetes cluster into separate scopes.

Table 6. Input details
Input name Data type Required? Description

name

String

Yes

The namespace name.

sanitize-name

Boolean

No

Whether to sanitize the namespace name. Default is true. When value is true, the name value is truncated, suffixed with a hash, and validated.

labels

String

Yes

The YAML object of labels used to create the namespace.

kubernetes-create-resource

The cloudbees-io/kubernetes-create-resource action creates or updates a Kubernetes resource file that groups multiple application resources into a single YAML file.

Table 7. Input details
Input name Data type Required? Description

file-path

String

Yes

The path of the Kubernetes resource file to be created or updated.

environment-variables

JSON

No

Kubernetes environment variables, formatted as JSON data in key/value pairs.

environment-variables-path

String

Required only if environment-variables is not specified.

The path of the file that contains the environment variables.

namespace

String

No

The namespace where the created or updated Kubernetes resource file is located.

kustomize-deploy

The cloudbees-io/kustomize-deploy action customizes Kubernetes configurations using overlays, which modify base YAML manifests without directly editing them.

Kustomize ConfigMap literals and files are not encrypted, so store only non-confidential data with kustomize-configmap-literal and kustomize-configmap-file. To store data that must be encrypted, use kustomize-secret-file.
Table 8. Input details
Input name Data type Required? Description

kustomization-base-dir

String

Yes

Set the path to the Kustomize base directory.

kustomization-overlays-dir

String

Yes

Set the path to the Kustomize overlay directory.

kustomize-annotation

JSON

No

Add, update, or remove Kustomize annotations. Valid objects are add, set, and remove.

kustomize-label

JSON

No

Add, update, or remove Kustomize labels. Valid objects are add, set, and remove.

kustomize-configmap-literal

JSON

No

Refer to non-sensitive data as literals on a ConfigMap resource. Valid value is add.

kustomize-configmap-file

JSON

No

Refer to non-sensitive data as files on a ConfigMap resource. Valid value is add.

kustomize-secret-file

JSON

No

Refer to sensitive data as secrets files on a Secrets resource. Valid value is add.

kustomize-buildmetadata

JSON

No

Specify build information options in Kustomize labels and annotations. Valid options are originAnnotations, managedByLabel, and transformerAnnotations.

kustomize-image

JSON

No

Set container image names, tags, and/or digests without creating patches. Valid options are name, newName, and newTag.

kustomize-nameprefix

String

No

Add a prefix to names in defined YAML files.

kustomize-namesuffix

String

No

Add a suffix to names in defined YAML files. The suffix is appended before the content hash if the resource type is ConfigMap or Secret.

kustomize-namespace

String

No

Add a namespace, or override an existing namespace, on a resource.

kustomize-replicas

JSON

No

Set the number of replicas for a resource.