Deployment Config File Reference

The deployment config file is where you configure your app for deployment by Armory CD-as-a-Service. This config file includes application, deploymentConfig, targets, manifests, strategies, analysis, webhooks, and trafficManagement definitions.

Deployment config file example

Expand to see a skeleton config file for a deployment to Kubernetes. All all config options are listed for each section.

Click to view a skeleton deployment config file
---
version: v1
kind: kubernetes
application: <application-name>
targets:
  <targetName>:
    account: <account-name>
    namespace: <namespace-override>
    strategy: <strategy-name>
    constraints:
      dependsOn: ["<target-name>", "<target-name>"]
      beforeDeployment:
        - pause:
            untilApproved: true
            requiresRoles:
              - <role-name>
            approvalExpiration:
              duration: <integer>
              unit: <seconds|minutes|hours>
        - pause:
            duration: <integer>
            unit: <seconds|minutes|hours>
        - runWebhook:
            name: <webhook-name>
        - analysis:
            metricProviderName: <metric-provider-name>
            context:
              keyName: <value>
            interval: <integer>
            units: <seconds|minutes|hours>
            numberOfJudgmentRuns: <integer>
            rollBackMode: <manual|automatic>
            rollForwardMode: <manual|automatic>
            queries:
              - <queryName1>
              - <queryName2>
      afterDeployment:
        - pause:
            untilApproved: true
            requiresRoles:
              - <role-name>
            approvalExpiration:
              duration: <integer>
              unit: <seconds|minutes|hours>
        - pause:
            duration: <integer>
            unit: <seconds|minutes|hours>
        - runWebhook:
            name: <webhook-name>
        - analysis:
            metricProviderName: <metric-provider-name>
            context:
              keyName: <value>
            interval: <integer>
            units: <seconds|minutes|hours>
            numberOfJudgmentRuns: <integer>
            rollBackMode: <manual|automatic>
            rollForwardMode: <manual|automatic>
            queries:
              - <queryName1>
              - <queryName2>
manifests:
  - path: <path-to-manifest-or-directory>
  - path: <path-to-manifest-or-directory>
    targets:
      - <target-name>
strategies:
  myCanary:
    canary:
      steps:
        - setWeight:
            weight: <integer>
        - analysis:
            metricProviderName: <metric-provider-name>
            context:
              keyName1: <value>
              keyName2: <value>
            interval: <integer>
            units: <seconds|minutes|hours>
            numberOfJudgmentRuns: <integer>
            rollBackMode: <manual|automatic>
            rollForwardMode: <manual|automatic>
            queries:
              - <queryName1>
              - <queryName2>
        - runWebhook:
            name: <webhook-name>
        - pause:
            duration: <integer>
            unit: <seconds|minutes|hours>
        - setWeight:
            weight: <integer>
        - exposeServices:
            services:
              - <service-1>
              - <service-2>
              - <service-n>
            ttl:
              duration: <integer>
              unit: <seconds|minutes|hours>
        - analysis:
            metricProviderName: <metric-provider-name>
            context:
              keyName1: <value>
              keyName2: <value>
            interval: <integer>
            units: <seconds|minutes|hours>
            numberOfJudgmentRuns: <integer>
            rollBackMode: <manual|automatic>
            rollForwardMode: <manual|automatic>
            queries:
              - <queryName1>
              - <queryName2>
        - pause:
            untilApproved: true
            requiresRoles:
              - <role-name>
            approvalExpiration:
              duration: <integer>
              unit: <seconds|minutes|hours>
        - setWeight:
            weight: <integer>
  myBlueGreen:
    blueGreen:
      activeService: <active-service-name>
      previewService: <preview-service-name>
      redirectTrafficAfter:
        - runWebhook:
            name: CheckLogs
        - analysis:
            metricProviderName: <metric-provider-name>
            context:
              keyName1: <value>
              keyName2: <value>
            interval: <integer>
            units: <seconds|minutes|hours>
            numberOfJudgmentRuns: <integer>
            rollBackMode: <manual|automatic>
            rollForwardMode: <manual|automatic>
            queries:
              - <queryName1>
              - <queryName2>
        - pause:
            duration: <integer>
            unit: <seconds|minutes|hours>
        - exposeServices:
            services:
              - <service-1>
              - <service-2>
              - <service-n>
            ttl:
              duration: <integer>
              unit: <seconds|minutes|hours>
      shutDownOldVersionAfter:
        - pause:
            untilApproved: true
            approvalExpiration:
              duration: <integer>
              unit: <seconds|minutes|hours>
              requiresRoles:
                - <role-name>
        - pause:
            duration: <integer>
            unit: <seconds|minutes|hours>
        - analysis:
            metricProviderName: <metric-provider-name>
            context:
              keyName1: <value>
              keyName2: <value>
            interval: <integer>
            units: <seconds|minutes|hours>
            numberOfJudgmentRuns: <integer>
            rollBackMode: <manual|automatic>
            rollForwardMode: <manual|automatic>
            queries:
              - <queryName>
analysis:
  defaultMetricProviderName: <provider-name>
  queries:
    - name: <query-name>
      upperLimit: <integer>
      lowerLimit: <integer>
      queryTemplate: >-
                <query>
webhooks:
  - name: <webhook-name>
    method: <endpoint-method-type>
    uriTemplate: <endpoint-uri>
    networkMode: <network-mode>
    agentIdentifier: <remote-network-agent-id>
    headers:
      - key: Authorization
        value: <auth-type-and-value>
      - key: Content-Type
        value: application/json
    bodyTemplate:
      inline: >-
        {
          "event_type": "<event-type>",
          "client_payload": {
            "callbackUri": "{{armory.callbackUri}}/callback"
            }
        }        
    retryCount: <num-retries>
deploymentConfig:
  keepDeploymentObject: <true|false>
  timeout:
    unit: <seconds|minutes|hours>
    duration: <integer>
  ifDeploymentInProgress:
    strategy: <reject|enqueueOne>

Analysis Config

Declare the queries used to analyze a deployment for any analysis steps in your deployment strategies. Includes defaultMetricProviderName and queries (name, upperLimit, lowerLimit, queryTemplate).

Application Config

Define your app name.

Deployment Config

Customize your CD-as-a-Service deployment’s behavior deployment timeout, keepDeploymentObject, and deployment queue settings.

Manifests Config

Declare the path to the Kubernetes manifests to use for your deployment. You can deploy a manifest to all targets or declare specific targets per manifest.

Strategies Config

Declare your deployment strategies. You can use blue/green, canary, or both. Restrict by target environment. Add steps such as weight, manual or timed pauses, analysis, expose services, redirect traffic, and shut down old version.

Targets Config

Declare your deployment targets: account, namespace, and strategy to use. Configure target constraints such as dependsOn, beforeDeployment, and afterDeployment with pause, webhoook, and analysis conditions.

Traffic Management Config

Declare Istio or Linkerd traffic management for all or specific targets. Configure Istio settings such as virtual service and destination rule. Configure Linkerd settings like root service, canary service, active service, and traffic split.

Webhooks Config

Declare webhooks that call external automation for webhook-based approvals in your strategies.


Last modified October 26, 2023: (8182348)