@@ -14,7 +14,8 @@ import (
14
14
log "github.com/sirupsen/logrus"
15
15
"github.com/spf13/cobra"
16
16
"github.com/spf13/pflag"
17
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
17
+ corev1 "k8s.io/api/core/v1"
18
+ metaV1 "k8s.io/apimachinery/pkg/apis/meta/v1"
18
19
"k8s.io/apimachinery/pkg/runtime"
19
20
runtimeUtil "k8s.io/apimachinery/pkg/util/runtime"
20
21
"k8s.io/client-go/dynamic"
@@ -128,7 +129,7 @@ func (c *forwardRepoClientset) NewRepoServerClient() (io.Closer, repoapiclient.R
128
129
}
129
130
repoServerName := c .repoServerName
130
131
repoServererviceLabelSelector := common .LabelKeyComponentRepoServer + "=" + common .LabelValueComponentRepoServer
131
- repoServerServices , err := c .kubeClientset .CoreV1 ().Services (c .namespace ).List (context .Background (), v1 .ListOptions {LabelSelector : repoServererviceLabelSelector })
132
+ repoServerServices , err := c .kubeClientset .CoreV1 ().Services (c .namespace ).List (context .Background (), metaV1 .ListOptions {LabelSelector : repoServererviceLabelSelector })
132
133
if err != nil {
133
134
c .err = err
134
135
return
@@ -243,6 +244,10 @@ func MaybeStartLocalServer(ctx context.Context, clientOpts *apiclient.ClientOpti
243
244
if err != nil {
244
245
return fmt .Errorf ("error adding argo resources to scheme: %w" , err )
245
246
}
247
+ err = corev1 .AddToScheme (scheme )
248
+ if err != nil {
249
+ return fmt .Errorf ("error adding corev1 resources to scheme: %w" , err )
250
+ }
246
251
controllerClientset , err := client .New (restConfig , client.Options {
247
252
Scheme : scheme ,
248
253
})
0 commit comments