Codefresh Steps: Reusable Code for Common Operations
This page provides code you can use to perform common operations in the Codefresh CI/CD platform.
762

Blue/green deployments for plain K8s k8s-blue-green-deployment

Perform a blue/green deployment using only Kubernetes manifests.

arguments

  • DEPLOYMENT_NAME - Name of the deployment
  • HEALTH_SECONDS - Number of seconds the mesure health
  • KUBE_CONTEXT - The name of your cluster (as found in the Codefresh Kubernetes dashboard).
  • NAMESPACE - The namespace in the cluster
  • NEW_VERSION - New version
  • SERVICE_NAME - Name of the service
    run:
  title: 'Deploying new version ${{CF_SHORT_REVISION}}'
  type: k8s-blue-green-deployment
  arguments:
    SERVICE_NAME: '${{SERVICE_NAME}}'
    DEPLOYMENT_NAME: '${{DEPLOYMENT_NAME}}'
    NEW_VERSION: '${{NEW_VERSION}}'
    HEALTH_SECONDS: '${{HEALTH_SECONDS}}'
    NAMESPACE: '${{NAMESPACE}}'
    KUBE_CONTEXT: '${{KUBE_CONTEXT}}'

  
github.com
Kostis Kapelonis
Jul 4, 2021