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

Add filtering functionality to http api secrets list #11431

Merged
merged 1 commit into from
Sep 7, 2021

Conversation

jmguzik
Copy link
Contributor

@jmguzik jmguzik commented Sep 3, 2021

Filtering is missing in both compat API and libpod API, while docker
has filtering functinality. This commit enables filtering option using
name and id in both libpod and http API.

Signed-off-by: Jakub Guzik [email protected]

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 3, 2021
@jmguzik
Copy link
Contributor Author

jmguzik commented Sep 3, 2021

There are some things to do which I must put aside for the next PR or PRs:

  • Enable filters in cmd
  • Enable filters fully in bindings
  • Introduce 2 filters that are still missing.

The last one is tricky as in podman there is no support for labels in secrets. This should be added as a prerequisite. I will think about this.

That's being said, HTTP API filters should be ready right now, fully introduced by this commit

"github.com/pkg/errors"
)

func IfPassesSecretsFilter(s secrets.Secret, filters map[string][]string) (bool, error) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let me know if that file/function location is ok for you.

Filtering is missing in both compat API and libpod API, while docker
has filtering functinality. This commit enables filtering option using
name and id in both libpod and http API.

Signed-off-by: Jakub Guzik <[email protected]>
@jmguzik jmguzik marked this pull request as ready for review September 3, 2021 09:45
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 3, 2021
@jmguzik
Copy link
Contributor Author

jmguzik commented Sep 3, 2021

fails are not related to the PR

Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

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

LGTM

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 3, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jmguzik, Luap99

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 Sep 3, 2021
@jwhonce
Copy link
Member

jwhonce commented Sep 7, 2021

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Sep 7, 2021
@openshift-merge-robot openshift-merge-robot merged commit 536f23c into containers:main Sep 7, 2021
jmguzik added a commit to jmguzik/podman that referenced this pull request Dec 14, 2021
This PR is a follow-up of containers#11431. It adds possibility of filtering
secret list based on id and name.

Signed-off-by: Jakub Guzik <[email protected]>
@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 Sep 22, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 22, 2023
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants