operator-lifecycle-manager
operator-lifecycle-manager copied to clipboard
Install.sh script prevents upgrade
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"
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.
I just created https://github.com/operator-framework/operator-lifecycle-manager/issues/2695 to track next steps here.