Closed jordigilh closed 2 years ago
@jordigilh we might be able to omit the need for a job by using this configuration in the resourceCustomizations
section of the ArgoCD
resource
operators.coreos.com/Subscription:
health.lua: |
hs = {}
if obj.status ~= nil then
if obj.status.currentCSV ~= nil and (obj.status.state == "AtLatestKnown" or obj.status.state == "UpgradeAvailable" or obj.status.state == "UpgradePending") then
hs.status = "Healthy"
hs.message = "Subcription installed"
return hs
end
end
hs.status = "Progressing"
hs.message = "Waiting for Subscription to complete."
return hs
@jordigilh we might be able to omit the need for a job by using this configuration in the
resourceCustomizations
section of theArgoCD
resourceoperators.coreos.com/Subscription: health.lua: | hs = {} if obj.status ~= nil then if obj.status.currentCSV ~= nil and (obj.status.state == "AtLatestKnown" or obj.status.state == "UpgradeAvailable" or obj.status.state == "UpgradePending") then hs.status = "Healthy" hs.message = "Subcription installed" return hs end end hs.status = "Progressing" hs.message = "Waiting for Subscription to complete." return hs
Works great! thanks!. I've removed the job and it's resources and updated the argocd.yaml file to include the resourceCustomizations
.
I've tested it without the helm pre-hooks and works fine as well. So they're gone :smile:
@jordigilh This is really exciting! It worked great. we most likely want to add retries, but that can come later. a few small minor changes
Combines the CNV subscription and hyperconverged CR into a single chart. The chart contains a job whose responsibility is to delay the deployment of the hyperconverged CR until the CSV has reached the Successful state. This is to avoid the situation where the CR is created before the CRD.
@sabre1041 @nasx please review at your discretion.