chore: pkg imported more than once (#5779)

Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
This commit is contained in:
guangwu
2023-06-25 16:13:34 +08:00
committed by GitHub
parent 903a43b990
commit 5304a1234c
2 changed files with 3 additions and 5 deletions

View File

@@ -26,7 +26,6 @@ import (
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/util/diff"
"k8s.io/client-go/informers"
kubeinformers "k8s.io/client-go/informers"
k8sfake "k8s.io/client-go/kubernetes/fake"
core "k8s.io/client-go/testing"
@@ -134,7 +133,7 @@ func checkAction(expected, actual core.Action, t *testing.T) {
}
}
func (f *fixture) newController() (*JobController, informers.SharedInformerFactory) {
func (f *fixture) newController() (*JobController, kubeinformers.SharedInformerFactory) {
f.kubeclient = k8sfake.NewSimpleClientset(f.kubeobjects...)
k8sI := kubeinformers.NewSharedInformerFactory(f.kubeclient, noResyncPeriodFunc())

View File

@@ -20,7 +20,6 @@ import (
"sigs.k8s.io/kustomize/api/krusty"
"sigs.k8s.io/kustomize/api/resmap"
"sigs.k8s.io/kustomize/api/types"
kustypes "sigs.k8s.io/kustomize/api/types"
"sigs.k8s.io/kustomize/kyaml/filesys"
)
@@ -64,10 +63,10 @@ func writeFile(fs filesys.FileSystem, path string, content *bytes.Buffer) error
func (k *postRendererKustomize) Run(renderedManifests *bytes.Buffer) (modifiedManifests *bytes.Buffer, err error) {
fs := filesys.MakeFsInMemory()
input := "./.local-helm-output.yaml"
cfg := types.Kustomization{
cfg := kustypes.Kustomization{
Resources: []string{input},
CommonAnnotations: k.annotations, // add extra annotations to output
Labels: []types.Label{{Pairs: k.labels}}, // Labels to add to all objects but not selectors.
Labels: []kustypes.Label{{Pairs: k.labels}}, // Labels to add to all objects but not selectors.
}
cfg.APIVersion = kustypes.KustomizationVersion
cfg.Kind = kustypes.KustomizationKind