Skip to content
This repository has been archived by the owner on Mar 16, 2024. It is now read-only.

Autoupgrade fixes #1845

Merged
merged 1 commit into from
Jul 6, 2023
Merged

Autoupgrade fixes #1845

merged 1 commit into from
Jul 6, 2023

Conversation

g-linville
Copy link
Contributor

@g-linville g-linville commented Jun 24, 2023

depends on #1823

This further prevents Docker Hub from being assumed for auto-upgrade apps. From the previous PR, some of the validation was done client-side, leading to the ability to deploy an auto-upgrade app with Docker Hub as the default registry if done by applying a YAML manifest directly to the cluster.

This PR also ensures that auto-upgrade apps will prefer remote images over local images, including on the initial deployment. (Prior to this there was a problem where an auto-upgrade app would prioritize local images at first, and then the daemon would prioritize remote images. This fixes that.)

Checklist

  • The title of this PR would make a good line in Acorn's Release Note's Changelog
  • The title of this PR ends with a link to the main issue being address in parentheses, like: This is a title (#1216). Here's an example
  • All relevant issues are referenced in the PR description. NOTE: don't use GitHub keywords that auto-close issues
  • Commits follow contributing guidance
  • Automated tests added to cover the changes. If tests couldn't be added, an explanation is provided in the Verification and Testing section
  • Changes to user-facing functionality, API, CLI, and upgrade impacts are clearly called out in PR description
  • PR has at least two approvals before merging (or a reasonable exception, like it's just a docs change)

@g-linville g-linville marked this pull request as draft June 24, 2023 18:50
@g-linville g-linville changed the title Draft: Autoupgrade fixes Autoupgrade fixes Jun 26, 2023
@g-linville g-linville marked this pull request as ready for review June 26, 2023 21:10
@g-linville g-linville force-pushed the autoupgrade-fixes branch from 508788a to 59514aa Compare July 3, 2023 13:36
@g-linville g-linville force-pushed the autoupgrade-fixes branch from 59514aa to 1738db8 Compare July 3, 2023 13:38
@g-linville
Copy link
Contributor Author

Squashed everything down to one commit to make it easier to rebase.

var (
_, autoUpgradeOn = autoupgrade.Mode(appInstance.Spec)
resolved string
err error
isLocal bool
)
if !appInstance.Status.AvailableAppImageRemote {
// Only attempt to resolve locally if auto-upgrade is not on, or if auto-upgrade is on but we know the image is not remote.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment makes code easier to understand 👍

t.Fatal("error while getting rest config:", err)
}
kclient := helper.MustReturn(kclient.Default)
project := helper.TempProject(t, kclient)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😄

@g-linville g-linville merged commit bc2a23d into acorn-io:main Jul 6, 2023
@g-linville g-linville deleted the autoupgrade-fixes branch July 6, 2023 20:54
cloudnautique pushed a commit to cloudnautique/runtime that referenced this pull request Sep 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants