Deployment template input variables


regionRequiredRegion name for cluster
repositoryRequiredEnter Full container URL without tag
tagRequiredTagged container will deploy
allowUnauthenticatedRequiredBoolean to allow Unauthenticated traffic
domainRequiredCreates a domain mapping provided the domain has been already verified with the GCP project
containerPortRequiredRequests will be sent to the container on this port, default is 8080
job_typeRequiredThis is to deploy or undeploy application
vpcConnectorRequiredName of the VPC Connector


The template contains a series of steps executed during the deployment process. Here's a summary of the main steps:

If the job_type is set to "deploy":
Add secrets to the secret manager by creating and deleting secrets using the gcloud command.
Create a Cloud Run application by generating a configuration file (app.yaml) based on the provided inputs.
Replace the existing Cloud Run service with the updated configuration using the gcloud command.
If a custom domain is provided, create a domain mapping using the gcloud command.
If allowUnauthenticated is set to true, allow public access by setting IAM policy using the gcloud command.
If the job_type is set to "undeploy":
Delete the Cloud Run application using the gcloud command.
Delete the associated secrets from the secret manager.
The template also includes various variable assignments and configurations for different parameters used in the deployment process.

Please note that the template contains specific instructions and commands tailored for GCP and Cloud Run deployments.


clusterRequiredCluster name in which the deployment will happen.
regionRequiredRegion name for the cluster.
portsOptionalPorts used in services.


This deployment template is used to deploy an application using Helm in a Google Cloud Platform (GCP) environment. Here is a summary of the key steps and actions performed:

  1. Set up the environment variables and paths required for the deployment.
  2. Retrieve credentials for the GCP Kubernetes cluster specified.
  3. Install Helm by cloning the cloud-builders-community repository and building the Docker image.
  4. If the job type is "deploy," set up the Helm values for the deployment:
    • Copy files from a Google Cloud Storage bucket and decrypt them if necessary.
    • Generate the values.yaml file with the deployment configuration, including application name, environment, project, replica count, health checks, image details, service configuration, resource quotas, lifecycle commands, and environment variables.
    • Read environment variable and secret values from .env and .secret.env files, respectively, and add them to values.yaml.
  5. Install or upgrade the application using Helm:
    • Upgrade the Helm release with the generated values.yaml file.
    • Restart and check the deployment's status using kubectl commands.
  6. Retrieve the service URL and add it as an output if available.
  7. If the job type is not "deploy," uninstall the application using Helm.

Overall, this template sets up the necessary environment, installs Helm, prepares the deployment configuration, deploys or uninstalls the application, and retrieves relevant information about the deployed service.


clusterRequiredCluster name in which the deployment will happen.
regionRequiredRegion name for the cluster.
istioInjectionOptionalEnable Istio injection in namespace.
serviceAccountEnabledOptionalUse GCP Service Account.
manageCertificateOptionalUse GCP to procure Certificates.
negEnabledOptionalExpose GCP Network Endpoint Group.
projectNameOptionalCodePipes Project Name.
domainsOptionalDomain Names for Ingress/Certificates.
virtualServiceOptionalIstio Virtual Service.
deploymentOptionalCreate Deployment.
service_portOptionalService port.
ingressIPOptionalGKE Ingress IP.
ingressIPNameOptionalGKE Ingress IP Name.
deployment_timeoutOptionalDeployment Timeout.
autoscalingEnabledOptionalEnable Autoscaling.
minReplicasOptionalMinimum number of Replicas.
maxReplicasOptionalMaximum number of Replicas.
targetCPUUtilizationPercentageOptionalTarget CPU Utilization to scale replicas.

| memoryRequest

| Optional | Memory Request for the pods. |
| cpuLimit | Optional | CPU Limit for the pods. |
| memoryLimit | Optional | Memory Limit for the pods. |
| cpuRequest | Optional | CPU Request for the pods. |
| replicaCount | Optional | Replica Count. |
| maxUnavail | Optional | Maximum Unavailable Percentage or absolute value for Pods. |
| maxSurge | Optional | Maximum Surge Percentage or absolute value for Pods. |
| terminationGracePeriodSeconds | Optional | Grace Period before terminating pod in seconds. |
| liveFailThreshold | Optional | Successive Fail Threshold for Liveliness Probe. |
| liveSuccThreshold | Optional | Successive Success Threshold for Liveliness Probe. |
| readFailThreshold | Optional | Successive Fail Threshold for Readiness Probe. |
| readSuccThreshold | Optional | Successive Success Threshold for Readiness Probe. |
| probeDelay | Optional | Delay in seconds between probes. |
| probePeriod | Optional | Probe Period in seconds. |
| probeTimeout | Optional | Probe Timeout in seconds. |

You can retrieve some of these required parameter values from the output obtained after deploying the environment. For example, if you have a Kubernetes cluster name provided as an output in Terraform, you can map it to a deployment template input variable using the following syntax: cluster_name=${terraform.cluster_name.value}.

This deployment template is used to deploy an application using Helm in a Google Cloud Platform (GCP) environment. The template includes the following steps:

  1. "gcloud container setup": Retrieves credentials for the GCP container cluster.
  2. "Install helm": Builds a Docker image for Helm.
  3. "Setup helm values": Sets up the Helm values for the deployment, including environment variables, image repository details, ports, resource quotas, lifecycle settings, and more.
  4. "Install Application": Upgrades or installs the application using Helm, specifying the values defined in the previous step.
  5. "Extract summary vars": Retrieves the IP address of the ingress load balancer and adds it as an output variable.

Additionally, there is a step for uninstalling the application if the job type is not "deploy."

The template uses variables for various configuration parameters such as workspace, pipeline environment file, pipeline secret file, Helm chart path, service name, project name, application name, environment, Istio injection, service account, certificate management, deployment settings, image details, ports, service type, domains, virtual service, ingress IP, autoscaling, resource quotas, resources, lifecycle, artifacts, environment variables, secrets, deployment timeout, and more.

For more information, you can refer to the Code Pipes documentation on deployments.