sigstore / k8s-manifest-sigstore

kubectl plugin for signing Kubernetes manifest YAML files with sigstore
Apache License 2.0
79 stars 21 forks source link

support pattern based multiple resource specification in verify-resource #5

Closed hirokuni-kitahara closed 3 years ago

hirokuni-kitahara commented 3 years ago

Description Users may consider specifying multiple resources for the command kubectl sigstore verify-resource by using pattern based argument as well as kubectl get command.

To support this kind of input argument, several features like the following will be added to verify-resource command as an enhancement.

Features

Expected

$ kubectl sigstore verify-resource cm -n sample-ns -i some-manifest-image:latest
NAME               INSCOPE   VERIFIED   SIGNER                    ERROR                                       AGE
signed-cm-a        true      true       sample-signer@gmail.com                                               2h
signed-cm-b        true      true       sample-signer@gmail.com                                               3h
kube-root-ca.crt   true      false                                YAML manifest not found for this resource   17d
# enable JSON output
$ kubectl sigstore verify-resource cm -n sample-ns -i some-manifest-image:latest --output json
{
    "results":
        [
            {
                "object": { ... },
                "result": { ... },
                "error": { ... }
            },
            { ... },
            { ... }
        ]
}
hirokuni-kitahara commented 3 years ago

Close this issue and will create some more intuitive issues.