Manage Operator

Manage, upgrade, or uninstall the Armory Operator.

This guide is for both the Armory Operator and the Spinnaker Operator. Armory Continuous Deployment and Spinnaker configuration is the same except for features only in Armory Continuous Deployment. Those features are marked Proprietary.

Upgrade the Operator

Do not manually change Docker image tags in your existing manifest files. Operator computes the compatible Halyard version, so manually updating image tags is an unsupported upgrade method and may cause issues.

Use the kubectl replace command to replace your Operator deployment. See the kubectl replace docs for an explanation of this command.

  1. Download the Operator version you want to upgrade to:

    In the following command, replace <version> with the specific version or “latest” for the most recent version.

    bash -c 'curl -L<version>/manifests.tgz | tar -xz'
  2. Update CRDs across the cluster:

    kubectl replace -f deploy/crds/
  3. Update the Operator:

    kubectl -n spinnaker-operator replace -f deploy/operator/cluster

Uninstall the Operator

Uninstalling the Operator involves deleting its deployment and SpinnakerService CRD. When you delete the Operator CRD, Kubernetes deletes any installation created by Operator. This occurs because the CRD is set as the owner of the resources, so they get garbage collected.

You can remove this ownership relationship so that Armory Enterprise is not deleted when deleting the Operator by removing Operator ownership of resources.

Remove Operator ownership of Armory Enterprise resources

Run the following script to remove ownership of Armory resources, where NAMESPACE is the namespace where Armory Enterprise is installed:

#! /usr/bin/env bash
for rtype in deployment service
    for r in $(kubectl -n $NAMESPACE get $rtype --selector=app=spin -o jsonpath='{.items[*]}')
        kubectl -n $NAMESPACE patch $rtype $r --type json -p='[{"op": "remove", "path": "/metadata/ownerReferences"}]'

After the script completes, delete the Operator and its CRDs from the Kubernetes cluster:

kubectl delete -n <namespace> -f deploy/operator/<installation type>
kubectl delete -f deploy/crds/

Help resources

Last modified December 9, 2022: (77a2e50)