Migrate from component version v0.1.0 to v1.x

Due to the nature of the fix for #24, migrating to the fixed version of the component requires a couple manual steps.

This document guides you through the migration.

While we give oc commands to manage the ArgoCD apps, you can also perform those steps through the ArgoCD UI, if you prefer.

Prerequisites

Procedure

  1. Setup port-forward to ArgoCD and login to ArgoCD with the CLI

    oc --as=cluster-admin -n syn port-forward svc/argocd-server 8080:80 & sleep 1
    argocd login --plaintext --username=admin --password=$(oc --as=cluster-admin -n syn get secret steward -ojsonpath='{.data.token}' |base64 -d) localhost:8080
  2. Disable auto sync for the ArgoCD apps root and openshift4-monitoring

    With argocd:

    argocd app set --sync-option=none root
    argocd app set --sync-option=none openshift4-monitoring

    With oc:

    oc --as=cluster-admin -n syn patch apps root --type=json \
      -p '[{"op":"replace", "path":"/spec/syncPolicy", "value": {}}]'
    oc --as=cluster-admin -n syn patch apps openshift4-monitoring --type=json \
      -p '[{"op":"replace", "path":"/spec/syncPolicy", "value": {}}]'
  3. Remove ArgoCD managed-by label from the openshift-monitoring namespace object

    oc --as=cluster-admin label ns openshift-monitoring argocd.argoproj.io/instance-
  4. Update cluster to use openshift4-monitoring v1.0.0. Add the following configuration in the cluster config:

    inventory/classes/<tenant-id>/<cluster-id>.yml
    parameters:
      components:
        openshift4_monitoring:
          version: v1.0.0
  5. Compile and push catalog

    commodore catalog compile --push -i <cluster-id>
  6. Trigger a hard refresh of openshift4-monitoring app

    argocd app get --hard-refresh openshift4-monitoring
    You can trigger a hard refresh via the ArgoCD UI instead of using the ArgoCD CLI command.
  7. Sync root app

    With argocd:

    argocd app sync root

    With oc:

    oc --as=cluster-admin -n syn patch apps root --type=json \
      -p '[{
        "op":"replace",
        "path":"/spec/syncPolicy",
        "value": {"automated": {"prune": true, "selfHeal": true}}
      }]'
    With oc we don’t directly trigger a sync, but instead re-enable auto sync in the app object.
  8. Terminate port-forward to ArgoCD

    kill %1