operator-lifecycle-manager icon indicating copy to clipboard operation
operator-lifecycle-manager copied to clipboard

Install.sh script prevents upgrade

Open kinihun opened this issue 2 years ago • 2 comments

When I run the install script twice using incremental versions, it fails. The script fails because it detects an existing OLM deployment without checking the image version. I think the check should include the image version. Secondly, this should not be an issue since the script is running kubectl apply -f and not kubectl create. It should be possible to upgrade OLM.

if kubectl get deployment olm-operator -n ${namespace} > /dev/null 2>&1; then
    echo "OLM is already installed in ${namespace} namespace. Exiting..."
    exit 1
fi

kubectl apply -f "${url}/crds.yaml"
kubectl wait --for=condition=Established -f "${url}/crds.yaml"
kubectl apply -f "${url}/olm.yaml"

kinihun avatar Mar 16 '22 17:03 kinihun

This makes sense, but it's not immediately clear whether install.sh is necessarily the right tool to upgrade OLM. We potentially want to think of a between-versions upgrade script that handles OLM upgrading between versions.

This is a very valid use-case of upgrading OLM and we don't currently have any documentation on best practices.

exdx avatar Mar 17 '22 19:03 exdx

I just created https://github.com/operator-framework/operator-lifecycle-manager/issues/2695 to track next steps here.

kevinrizza avatar Mar 17 '22 19:03 kevinrizza