DEV Community

Kenta Kozuka
Kenta Kozuka

Posted on

PipeCD v0.44.0 was released🎉

tl;dr

PipeCD v0.44.0, the latest version of PipeCD, was released on June 24, 2023. This article highlights the New Features and Notable Changes from the Release Notes.

New Features

Custom Sync Stage

Custom Sync allows executing arbitrary shell commands as a step in the deployment process. This feature is currently in alpha and only available for AWS Lambda.

To deploy Lambda using the SAM (Serverless Application Model) command, you can configure the pipeline as follows:

apiVersion: pipecd.dev/v1beta1
kind: LambdaApp
spec:
  name: sam-simple
  labels:
    env: example
    team: abc
  planner:
    # Must add this configuration to force use CUSTOM_SYNC stage.
    alwaysUsePipeline: true
  pipeline:
    stages:
      - name: CUSTOM_SYNC
        with:
          envs:
            AWS_PROFILE: "sample"
          run: |
            cd sam-app
            sam build
            echo y | sam deploy --profile $AWS_PROFILE  
Enter fullscreen mode Exit fullscreen mode

Please note that the commands executed in Custom Sync assume that they are already available in the execution environment of piped. Therefore, users need to create custom images instead of using the officially provided piped. Discussions are currently underway here on how to provide custom images while minimizing the user's burden. Your input is welcome if you are interested.

Manifest Attachment

Manifest Attachment enables using functionalities similar to Kubernetes ConfigMap in non-Kubernetes applications.

Let's take ECS as an example. Create a config.yaml as follows:

mysql:
  rootPassword: "test"
  database: "pipecd"
Enter fullscreen mode Exit fullscreen mode

In the app.pipecd.yaml file, configure it like this:

apiVersion: pipecd.dev/v1beta1
kind: ECSApp
spec:
  name: secret-management
    ...
  attachment:
    sources:
      config: config.yaml
    targets:
      - taskdef.yaml
Enter fullscreen mode Exit fullscreen mode

To reference the content of config.yaml in taskdef.yaml, use the following method:

...
containerDefinitions:
  - command: "echo {{ .attachment.config }}"
    image: nginx:1
    cpu: 100
    memory: 100
    name: web
...
Enter fullscreen mode Exit fullscreen mode

While this feature can be used independently, it can be more securely utilized when combined with Secret Management.

Terraform v1.5.0 Import Block Support

Support for the import block introduced in Terraform v1.5.0 is now available. When using Terraform v1.5.0 or later versions, the import operation will be displayed in addition to add, change, and destroy.

Deployment Metrics

Prometheus metrics for each deployment have been added, allowing detailed information about deployments to be retrieved. Examples of metrics

// Number of currently RUNNING deployments
count(count by (deployment) (deployment_status{status="DEPLOYMENT_RUNNING"}))

// Detect if there are any deployments in RUNNING status for over 1 hour
sum_over_time(deployment_status{status="DEPLOYMENT_RUNNING"}[1h:1m]) >= 60 and deployment_status{status="DEPLOYMENT_RUNNING"} == 1

// Number of completed deployments in the last 24 hours
sum(floor(increase(deployment_status{pipecd_component=\"piped\",status=~\"DEPLOYMENT_CANCELLED|DEPLOYMENT_SUCCESS|DEPLOYMENT_FAILURE\"}[24h])))
Enter fullscreen mode Exit fullscreen mode

These metrics are collected by piped and can be obtained from the piped's admin server. Therefore, teams using piped can now set up alerts for scenarios such as detecting deployments that do not finish for a long time.

kubectl Server-Side Apply Support

Support for Server-Side Apply, which became GA in Kubernetes v1.22, has been added. By adding the pipecd.dev/sync-by-replace annotation to a k8s workload, piped will add the --server-side flag to kubectl apply.

Notable Changes

Display of Platform Provider in Deployment Details Page

The Deployment details page now displays the Platform provider.
Platform provider in Deployment details

Slack API Support

Slack integration now supports Slack API in addition to webhooks.

Lambda Architecture Support

AWS Lambda architectures can now be specified.

Support for Log Level Configuration

Log levels can now be configured for both pipecd and piped:

ECS EnableExecuteCommand Support

Support for ECS enableExecuteCommand has been added.

Top comments (0)