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

Use a public name strategy for volumes (#1892) #1903

Merged
merged 5 commits into from
Jul 12, 2023

Conversation

g-linville
Copy link
Contributor

@g-linville g-linville commented Jul 10, 2023

for #1892

This changes the apiserver strategy back to public names for volumes. Previously there was an issue where the public name would change when a volume was bound, which led to syncing issues in Manager. When I made the public name static, then it was possible to have duplicate volume names.

With this PR, the public names do not change when volumes get bound, and the controller performs the proper checks to make sure it is not going to create a volume with a duplicate public name.

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)

Signed-off-by: Grant Linville <grant@acorn.io>
@@ -99,7 +99,7 @@ metadata:
acorn.io/app-name: app-name
acorn.io/app-namespace: app-namespace
acorn.io/managed: "true"
acorn.io/public-name: app-name.foo
acorn.io/public-name: other-app.foo
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This expected value changed because public names are now static and will not change when a new app binds an old volume.

@@ -101,7 +101,7 @@ metadata:
acorn.io/app-name: app-name
acorn.io/app-namespace: app-namespace
acorn.io/managed: "true"
acorn.io/public-name: app-name.foo
acorn.io/public-name: other-app.foo
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This expected value changed because public names are now static and will not change when a new app binds an old volume.

Signed-off-by: Grant Linville <grant@acorn.io>
Signed-off-by: Grant Linville <grant@acorn.io>
Signed-off-by: Grant Linville <grant@acorn.io>
@g-linville g-linville changed the title Draft: Use a public name strategy for volumes Draft: Use a public name strategy for volumes (#1892) Jul 10, 2023
@g-linville g-linville changed the title Draft: Use a public name strategy for volumes (#1892) Use a public name strategy for volumes (#1892) Jul 10, 2023
@g-linville g-linville marked this pull request as ready for review July 10, 2023 16:56
Copy link
Contributor

Choose a reason for hiding this comment

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

Side thought - we should wire this up to the golden logic.

pkg/controller/appdefinition/volume.go Outdated Show resolved Hide resolved
Signed-off-by: Grant Linville <grant@acorn.io>
@g-linville g-linville merged commit b8e4feb into acorn-io:main Jul 12, 2023
2 checks passed
@g-linville g-linville deleted the volume-public-name branch July 12, 2023 02:44
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.

None yet

3 participants