How to update components?

    Introduction

    This document explains how to upgrade a particular component in lokoctl. This includes steps to pull config from upstream.

    Find updates

    To figure out which component is out dated run the following command in the root of this repository:

    ./scripts/find-updates.sh
    

    Etcd

    Find the old version and newer version from the ./scripts/find-updates.sh script and export it accordingly.

    export OLD_VERSION="<old version>"
    export NEW_VERSION="<new version>"
    

    Now run the following commands in the root of this repository:

    sed -i "s|$OLD_VERSION|$NEW_VERSION|g" assets/terraform-modules/*/flatcar-linux/kubernetes/cl/controller.yaml.tmpl
    make update-assets
    

    Calico

    To update Calico update the image tags in following files:

    • assets/charts/control-plane/calico/values.yaml
    • assets/terraform-modules/bootkube/variables.tf

    If there are changes necessary in the helm chart, make them in assets/charts/control-plane/calico.

    Cert Manager

    Run the following commands in the root of this repository:

    cd assets/components/cert-manager
    helm repo add jetstack https://charts.jetstack.io
    helm repo update
    
    rm -rf manifests
    helm fetch --untar --untardir ./ jetstack/cert-manager
    mv cert-manager manifests
    
    git checkout ./manifests/templates/letsencrypt-clusterissuer-prod.yaml
    git checkout ./manifests/templates/letsencrypt-clusterissuer-staging.yaml
    git checkout ./manifests/templates/namespace.yaml
    

    Metrics Server

    Run the following commands in the root of this repository:

    cd assets/components
    rm -rf metrics-server
    helm fetch --untar --untardir ./ stable/metrics-server
    

    OpenEBS

    Run the following commands in the root of this repository:

    cd assets/components
    rm -rf openebs
    helm repo add openebs https://openebs.github.io/charts
    helm repo update
    helm fetch --untar --untardir ./ openebs/openebs
    git checkout openebs/crds/storagepoolclaims.yaml