Skip to content
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

Merged

Conversation

ygalblum
Copy link
Contributor

@ygalblum ygalblum commented Dec 3, 2023

Add support for Network and Volume keys in .pod files
Add e2e tests
Update man page
Fix service file naming when the service name includes a .

Does this PR introduce a user-facing change?

Yes

Quadlet - Add support for Network and Volume keys in .pod files

Resolves: #20851

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]>
Copy link
Contributor

openshift-ci bot commented Dec 3, 2023

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 3, 2023
@@ -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) {
Copy link
Member

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?

Copy link
Contributor Author

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

@rhatdan
Copy link
Member

rhatdan commented Dec 3, 2023

LGTM other then one variable name change.

@umohnani8
Copy link
Member

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 4, 2023
@openshift-merge-bot openshift-merge-bot bot merged commit 093868b into containers:main Dec 4, 2023
93 checks passed
@ygalblum ygalblum deleted the quadlet-pod-quadlet-based-keys branch December 4, 2023 14:01
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Mar 4, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. release-note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Quadlet: support for [Pod] Network
3 participants