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 the option to display the output in yaml/json format #24

Open
garethjevans opened this issue Oct 12, 2022 · 6 comments
Open

Add the option to display the output in yaml/json format #24

garethjevans opened this issue Oct 12, 2022 · 6 comments

Comments

@garethjevans
Copy link
Owner

this would allow this plugin to used in script

@garethjevans
Copy link
Owner Author

flags should follow kubectl standards e.g. -oyaml or --output=json

@cagiti
Copy link
Contributor

cagiti commented Nov 24, 2022

Assign this one to me if you want 😀

@cagiti
Copy link
Contributor

cagiti commented Nov 24, 2022

How would you want it to look? Something like this or flatter?

ServiceAccounts:
  sa-under-test:
    namespace: test-namespace
    ClusterRoleBindings:
      cluster-roles:
        ClusterRoles:
          cluster-level-role:
            apis:
              apps:
                deployments:
                  verbs:
                  - get
                  - watch
                  - list
                replicasets:
                  verbs:
                  - get
                  - watch
                  - list
    RoleBindings: ...

@garethjevans
Copy link
Owner Author

yeah, I like that. or...

serviceAccount: sa-under-test
  namespace: test-namespace
  clusterRoleBindings:
    - name: cluster-roles
      clusterRoles:
        - name: cluster-level-roles
          permissions:
            - apiGroups: apps
              resources:
                - deployments
                - replicasets
              verbs:
                - get
                - watch
                - list
            - apiGroups: core.k8s.io
              resources:
                - configmaps
                - pods
                - pods/log
                - services
              verbs:
                - get
                - watch
                - list
            - apiGroups: networking.k8s.io
              resources:
                - ingresses
              verbs:
                - get

@garethjevans
Copy link
Owner Author

Am wondering if we could reuse the existing k8s types to generate the output (or slightly modified versions)

@cagiti
Copy link
Contributor

cagiti commented Nov 25, 2022

Yeah, that would be nicer... just didn't know if you wanted the original names etc. But I'd prefer the k8s native output 👌

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