EKS deployment integration in k8s-pipeline-library

Tsvetan Dimitrov

Agenda

  • Why?

  • k8s-pipeline-library new features

    • New environment structure

    • Multiple Helm versions

    • New app config convention

    • App config filtering

    • App config validation

    • Build reporting

Why? / 1

  • Migration to EKS

  • Fully managed control plane

  • No CoreOS security upgrades

  • Sounds cool and buzz-wordy

New Pipeline Features

New Environment Structure / 1

  • Cluster -> DELIVERY
    • Environment -> STAGING
      • Region -> EU
      • Region -> US
    • Environment -> PROD
      • ...
  • Environment -> STAGING
    • Region -> US
    • Region -> EU
    • Clusters -> DELIVERY, PUBLISHING
  • Environment -> PROD
    • ...

OLD

NEW

New Environment Structure / 2

  • Available Cluster Types:

    • DELIVERY

    • PUBLISHING

    • PAC

New Environment Structure / 3

  • Available Environments:

    • dev (k8s is deprecated, but still compatible)

    • staging

    • prod

New Environment Structure / 4

  • Deprecated Environments

    • stagingpac

    • prodpac

    • test

Multiple Helm Versions / 1

  • Helm 3 vs Helm 2

  • Helm 3 has no Tiller and has slightly different commands

  • Helm 3 is used when interacting with our Helm repository

Multiple Helm Versions / 2

  • Helm 2 is used to deploy on Core OS clusters

  • Helm 3 is used to deploy on EKS clusters

  • Pipeline chooses correct Helm version based on cluster type and region

New app config convention / 1

  • Format for Core OS app configs:

    • <chart_name>_<cluster_type>_<environment>_<region>

New app config convention / 2

  • Format for EKS app configs:

    • <chart_name>_eks_<cluster_type>_<environment>_<region>
NOTE: The _eks_ part is mandatory in order to mark that the current deployment is intended for an EKS cluster

App config validation

  • Validates each app config name component and marks it as invalid

  • The listed app configs will be ignored and it is recommended that they should be renamed correctly or removed entirely

App config filtering

  • Filtering based on environment and/or cluster type

  • Filtering based on most specific app configs for the specified environment

Build Summary / 1

Deploy Status

Environment

Chart Version

Cluster Type

Region

Ignore Cause

Build Summary / 2

  • Summary of the entire build process

  • Lists deployed and ignored app configs

Developer How To Guide / 1

1. Remove invalid app configs

2. Add/Replace app configs according to new EKS app config convention

3. Execute builds and examine build logs and summary

Developer How To Guide / 2

  • Rename app configs containing "k8s" environment to "dev" environment

  • Remove entirely or rename "stagingpac" to "pac_staging" and "prodpac" to "pac_prod" according to the conventions

  • Prefer naming PUBLISHING cluster as "publishing" and not "publish" although both will work fine

Questions?

EKS deployment in k8s-pipeline-library

By Tsvetan Dimitrov

EKS deployment in k8s-pipeline-library

EKS deployment integration in k8s-pipeline-library

  • 132