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

please consider adding --context support for specific cluster targeting. #44

Open
caleyg opened this issue Oct 19, 2020 · 2 comments
Open

Comments

@caleyg
Copy link

caleyg commented Oct 19, 2020

Is your feature request related to a problem? Please describe.
When running the inspect tool against a target cluster, without splitting my kubeconfig files into many, which there are many clusters. I must run a kubectl --context target_cluster_alias api-resources or something similar so that my current context session is set correctly. And then I can run my inspection normally against my target cluster using my default kubeconfig kubectl advise-psp inspect -n test_namespace -g with expected results.

Describe the solution you'd like
The ability to use --context similar to how kubectl does.

@Kaizhe
Copy link
Contributor

Kaizhe commented Oct 22, 2020

@caleyg thank you for the suggestion. I think that makes a lot sense and will add it soon.

@Kaizhe
Copy link
Contributor

Kaizhe commented Sep 23, 2021

@caleyg

Usage:
  kube-psp-advisor inspect [flags]

Flags:
      --deny-by-default              (optional) OPA default rule: use this option if OPA default rule is Deny ALL
  -e, --exclude-namespaces strings   (optional) comma separated list of namespaces to exclude
  -g, --grant                        (optional) return with pod security policies, roles and rolebindings
  -h, --help                         help for inspect
      --kubeconfig string            (optional) absolute path to the kubeconfig file (default "/Users/Kaizhe/.kube/config")
  -n, --namespace string             (optional) namespace
  -p, --policy string                set policy type, valid policy types: psp and opa (default "psp")
  -r, --report                       (optional) return with detail report

Global Flags:
      --level string   Log level (default "info")

the --kubeconfig parameter should be able to help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants