Add support for ctl covert with List
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
This commit is contained in:
parent
55566c2e01
commit
1c9e955407
@ -34,7 +34,6 @@ import (
|
||||
"k8s.io/kubectl/pkg/util/i18n"
|
||||
"k8s.io/kubectl/pkg/util/templates"
|
||||
|
||||
cmapi "github.com/jetstack/cert-manager/pkg/apis/certmanager/v1"
|
||||
"github.com/jetstack/cert-manager/pkg/ctl"
|
||||
)
|
||||
|
||||
@ -127,7 +126,7 @@ func (o *Options) Run() error {
|
||||
builder := new(resource.Builder)
|
||||
|
||||
r := builder.
|
||||
WithScheme(scheme, schema.GroupVersion{Group: cmapi.SchemeGroupVersion.Group, Version: runtime.APIVersionInternal}).
|
||||
WithScheme(scheme).
|
||||
LocalParam(true).FilenameParam(false, &o.FilenameOptions).Flatten().Do()
|
||||
|
||||
if err := r.Err(); err != nil {
|
||||
|
||||
@ -48,8 +48,8 @@ func init() {
|
||||
metainstall.Install(Scheme)
|
||||
|
||||
// This is used to add the List object type
|
||||
coreGroupVersion := schema.GroupVersion{Group: "", Version: runtime.APIVersionInternal}
|
||||
Scheme.AddKnownTypes(coreGroupVersion, &metainternalversion.List{})
|
||||
listGroupVersion := schema.GroupVersionKind{Group: "", Version: runtime.APIVersionInternal, Kind: "List"}
|
||||
Scheme.AddKnownTypeWithName(listGroupVersion, &metainternalversion.List{})
|
||||
|
||||
metav1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"})
|
||||
utilruntime.Must(kscheme.AddToScheme(Scheme))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user