-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Quadlet - add support for keys that may refer to other Quadlet units in .pod
files
#20887
Quadlet - add support for keys that may refer to other Quadlet units in .pod
files
#20887
Conversation
Using replaceExtension breaks when the service name has a dot Just add .service Signed-off-by: Ygal Blum <[email protected]>
Add e2e tests Update documentation Signed-off-by: Ygal Blum <[email protected]>
Add e2e tests Update documentation Signed-off-by: Ygal Blum <[email protected]>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ygalblum The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@@ -1253,7 +1254,7 @@ func GetPodServiceName(podUnit *parser.UnitFile) string { | |||
return replaceExtension(podUnit.Filename, "", "", "-pod") | |||
} | |||
|
|||
func ConvertPod(podUnit *parser.UnitFile, name string, podsInfoMap map[string]*PodInfo) (*parser.UnitFile, error) { | |||
func ConvertPod(podUnit *parser.UnitFile, name string, podsInfoMap map[string]*PodInfo, names map[string]string) (*parser.UnitFile, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you change the variable name to networkNames?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's incorrect. The map is called names
(here and in other methods) because it hold a mapping between Quadlet unit files and the name of the entity they create (Netowork, Volume or Image). You can see that the same map is passed on to both addNetworks
and addVolumes
LGTM other then one variable name change. |
/lgtm |
Add support for Network and Volume keys in
.pod
filesAdd e2e tests
Update man page
Fix service file naming when the service name includes a
.
Does this PR introduce a user-facing change?
Yes
Resolves: #20851