diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 2ca618acb..b1ad3a164 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -30,4 +30,4 @@ jobs: hack/e2e-test/install.sh - name: fleet-clusters e2e test run: | - hack/e2e-test/fleet-clusters/e2e-run.sh + hack/e2e-test/run-e2e.sh diff --git a/e2e/attachedcluster_test.go b/e2e/attachedcluster_test.go new file mode 100644 index 000000000..4b2788484 --- /dev/null +++ b/e2e/attachedcluster_test.go @@ -0,0 +1,108 @@ +/* +Copyright Kurator Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package e2e + +import ( + "os" + "time" + + "github.com/onsi/ginkgo/v2" + "github.com/onsi/gomega" + corev1 "k8s.io/api/core/v1" + + "kurator.dev/kurator/e2e/resources" + clusterv1a1 "kurator.dev/kurator/pkg/apis/cluster/v1alpha1" +) + +var _ = ginkgo.Describe("[AttachedClusters] AttachedClusters testing", func() { + var ( + namespace string + fleetname string + memberClusterName1 string + memberClusterName2 string + kubeconfig1Path string + kubeconfig2Path string + secret1 *corev1.Secret + secret2 *corev1.Secret + attachedcluster1 *clusterv1a1.AttachedCluster + attachedcluster2 *clusterv1a1.AttachedCluster + ) + + ginkgo.BeforeEach(func() { + namespace = "default" + fleetname = "e2etest" + memberClusterName1 = "kurator-member1" + memberClusterName2 = "kurator-member2" + kubeconfig1Path = "/root/.kube/kurator-member1.config" + kubeconfig2Path = "/root/.kube/kurator-member2.config" + + // build two secrets + kubeconfig1, readfileErr1 := os.ReadFile(kubeconfig1Path) + gomega.Expect(readfileErr1).ShouldNot(gomega.HaveOccurred()) + data1 := make(map[string][]byte) + data1[memberClusterName1] = kubeconfig1 + secret1 = resources.NewSecret(namespace, memberClusterName1, data1) + + kubeconfig2, readfileErr2 := os.ReadFile(kubeconfig2Path) + gomega.Expect(readfileErr2).ShouldNot(gomega.HaveOccurred()) + data2 := make(map[string][]byte) + data2[memberClusterName2] = kubeconfig2 + secret2 = resources.NewSecret(namespace, memberClusterName2, data2) + + // build two attachedclusters + secretKeyRef1 := clusterv1a1.SecretKeyRef{ + Name: memberClusterName1, + Key: memberClusterName1, + } + secretKeyRef2 := clusterv1a1.SecretKeyRef{ + Name: memberClusterName2, + Key: memberClusterName2, + } + attachedcluster1 = resources.NewAttachedCluster(namespace, memberClusterName1, secretKeyRef1) + attachedcluster2 = resources.NewAttachedCluster(namespace, memberClusterName2, secretKeyRef2) + }) + + ginkgo.It("Create Fleet", func() { + // step 1.create secrets + secretCreateErr1 := resources.CreateSecret(kubeClient, secret1) + secretCreateErr2 := resources.CreateSecret(kubeClient, secret2) + gomega.Expect(secretCreateErr1).ShouldNot(gomega.HaveOccurred()) + gomega.Expect(secretCreateErr2).ShouldNot(gomega.HaveOccurred()) + + // step 2.create attachedclusters + attachedCreateErr1 := resources.CreateAttachedCluster(kuratorClient, attachedcluster1) + attachedCreateErr2 := resources.CreateAttachedCluster(kuratorClient, attachedcluster2) + gomega.Expect(attachedCreateErr1).ShouldNot(gomega.HaveOccurred()) + gomega.Expect(attachedCreateErr2).ShouldNot(gomega.HaveOccurred()) + + time.Sleep(5 * time.Second) + // step 3.create fleet + clusters := []*corev1.ObjectReference{ + { + Name: memberClusterName1, + Kind: "AttachedCluster", + }, + { + Name: memberClusterName2, + Kind: "AttachedCluster", + }, + } + fleet := resources.NewFleet(namespace, fleetname, clusters) + fleetCreateErr := resources.CreateFleet(kuratorClient, fleet) + gomega.Expect(fleetCreateErr).ShouldNot(gomega.HaveOccurred()) + }) +}) diff --git a/e2e/framework/cluster.go b/e2e/framework/cluster.go new file mode 100644 index 000000000..9f4efcb3a --- /dev/null +++ b/e2e/framework/cluster.go @@ -0,0 +1,44 @@ +/* +Copyright Kurator Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package framework + +import ( + "k8s.io/client-go/rest" + "k8s.io/client-go/tools/clientcmd" + "k8s.io/klog/v2" +) + +// LoadRESTClientConfig creates a rest.Config using the passed kubeconfig. If context is empty, current context in kubeconfig will be used. +func LoadRESTClientConfig(kubeconfig string, context string) (*rest.Config, error) { + loader := &clientcmd.ClientConfigLoadingRules{ExplicitPath: kubeconfig} + loadedConfig, err := loader.Load() + if err != nil { + return nil, err + } + + if context == "" { + context = loadedConfig.CurrentContext + } + klog.Infof("Use context %v", context) + + return clientcmd.NewNonInteractiveClientConfig( + *loadedConfig, + context, + &clientcmd.ConfigOverrides{}, + loader, + ).ClientConfig() +} diff --git a/e2e/resources/attachedcluster.go b/e2e/resources/attachedcluster.go new file mode 100644 index 000000000..2ed15d76a --- /dev/null +++ b/e2e/resources/attachedcluster.go @@ -0,0 +1,65 @@ +/* +Copyright Kurator Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package resources + +import ( + "context" + + apierrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + clusterv1a1 "kurator.dev/kurator/pkg/apis/cluster/v1alpha1" + kurator "kurator.dev/kurator/pkg/client-go/generated/clientset/versioned" +) + +func NewAttachedCluster(namespace string, name string, config clusterv1a1.SecretKeyRef) *clusterv1a1.AttachedCluster { + return &clusterv1a1.AttachedCluster{ + TypeMeta: metav1.TypeMeta{ + APIVersion: "cluster.kurator.dev/v1alpha1", + Kind: "AttachedCluster", + }, + ObjectMeta: metav1.ObjectMeta{ + Namespace: namespace, + Name: name, + }, + Spec: clusterv1a1.AttachedClusterSpec{ + Kubeconfig: config, + }, + } +} + +// CreateAttachedCluster create AttachedCluster. +func CreateAttachedCluster(client kurator.Interface, attachedCluster *clusterv1a1.AttachedCluster) error { + _, err := client.ClusterV1alpha1().AttachedClusters(attachedCluster.Namespace).Create(context.TODO(), attachedCluster, metav1.CreateOptions{}) + if err != nil { + if apierrors.IsAlreadyExists(err) { + return UpdateAttachedCluster(client, attachedCluster) + } else { + return err + } + } + return nil +} + +// UpdateAttachedCluster update AttachedCluster +func UpdateAttachedCluster(client kurator.Interface, attachedCluster *clusterv1a1.AttachedCluster) error { + _, err := client.ClusterV1alpha1().AttachedClusters(attachedCluster.Namespace).Update(context.TODO(), attachedCluster, metav1.UpdateOptions{}) + if err != nil { + return err + } + return nil +} diff --git a/e2e/resources/constant.go b/e2e/resources/constant.go new file mode 100644 index 000000000..374bd3921 --- /dev/null +++ b/e2e/resources/constant.go @@ -0,0 +1,28 @@ +/* +Copyright Kurator Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package resources + +import "time" + +const ( + // pollInterval defines the interval time for a poll operation. + pollInterval = 5 * time.Second + // pollTimeout defines the time after which the poll operation times out. + pollTimeout = 420 * time.Second + // metricsCreationDelay defines the maximum time metrics not yet available for pod. + metricsCreationDelay = 2 * time.Minute +) diff --git a/e2e/resources/fleet.go b/e2e/resources/fleet.go new file mode 100644 index 000000000..9ec314c88 --- /dev/null +++ b/e2e/resources/fleet.go @@ -0,0 +1,66 @@ +/* +Copyright Kurator Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package resources + +import ( + "context" + + corev1 "k8s.io/api/core/v1" + apierrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + fleetv1a1 "kurator.dev/kurator/pkg/apis/fleet/v1alpha1" + kurator "kurator.dev/kurator/pkg/client-go/generated/clientset/versioned" +) + +func NewFleet(namespace string, name string, clusters []*corev1.ObjectReference) *fleetv1a1.Fleet { + return &fleetv1a1.Fleet{ + TypeMeta: metav1.TypeMeta{ + APIVersion: "fleet.kurator.dev/v1alpha1", + Kind: "Fleet", + }, + ObjectMeta: metav1.ObjectMeta{ + Namespace: namespace, + Name: name, + }, + Spec: fleetv1a1.FleetSpec{ + Clusters: clusters, + }, + } +} + +// CreateAttachedCluster create AttachedCluster. +func CreateFleet(client kurator.Interface, fleet *fleetv1a1.Fleet) error { + _, err := client.FleetV1alpha1().Fleets(fleet.Namespace).Create(context.TODO(), fleet, metav1.CreateOptions{}) + if err != nil { + if apierrors.IsAlreadyExists(err) { + return UpdateFleet(client, fleet) + } else { + return err + } + } + return nil +} + +// UpdateAttachedCluster update AttachedCluster +func UpdateFleet(client kurator.Interface, fleet *fleetv1a1.Fleet) error { + _, err := client.FleetV1alpha1().Fleets(fleet.Namespace).Update(context.TODO(), fleet, metav1.UpdateOptions{}) + if err != nil { + return err + } + return nil +} diff --git a/e2e/resources/secret.go b/e2e/resources/secret.go new file mode 100644 index 000000000..742146baf --- /dev/null +++ b/e2e/resources/secret.go @@ -0,0 +1,63 @@ +/* +Copyright Kurator Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package resources + +import ( + "context" + + corev1 "k8s.io/api/core/v1" + apierrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/kubernetes" +) + +// NewSecret will build a secret object. +func NewSecret(namespace string, name string, data map[string][]byte) *corev1.Secret { + return &corev1.Secret{ + TypeMeta: metav1.TypeMeta{ + APIVersion: "v1", + Kind: "Secret", + }, + ObjectMeta: metav1.ObjectMeta{ + Namespace: namespace, + Name: name, + }, + Data: data, + } +} + +// CreateSecret create Secret. +func CreateSecret(client kubernetes.Interface, secret *corev1.Secret) error { + _, err := client.CoreV1().Secrets(secret.Namespace).Create(context.TODO(), secret, metav1.CreateOptions{}) + if err != nil { + if apierrors.IsAlreadyExists(err) { + return UpdateSecret(client, secret) + } else { + return err + } + } + return nil +} + +// UpdateSecret update Secret +func UpdateSecret(client kubernetes.Interface, secret *corev1.Secret) error { + _, err := client.CoreV1().Secrets(secret.Namespace).Update(context.TODO(), secret, metav1.UpdateOptions{}) + if err != nil { + return err + } + return nil +} diff --git a/e2e/suite_test.go b/e2e/suite_test.go new file mode 100644 index 000000000..d085943a9 --- /dev/null +++ b/e2e/suite_test.go @@ -0,0 +1,57 @@ +/* +Copyright Kurator Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package e2e + +import ( + "os" + "testing" + + "github.com/onsi/ginkgo/v2" + "github.com/onsi/gomega" + "k8s.io/client-go/kubernetes" + + "kurator.dev/kurator/e2e/framework" + kurator "kurator.dev/kurator/pkg/client-go/generated/clientset/versioned" +) + +var ( + kubeconfig string + kubeClient kubernetes.Interface + kuratorClient kurator.Interface + kuratorContext string +) + +func TestE2E(t *testing.T) { + gomega.RegisterFailHandler(ginkgo.Fail) + ginkgo.RunSpecs(t, "E2E Suite") +} + +var _ = ginkgo.SynchronizedBeforeSuite(func() []byte { + return nil +}, func(bytes []byte) { + kubeconfig = os.Getenv("KUBECONFIG") + gomega.Expect(kubeconfig).ShouldNot(gomega.BeEmpty()) + + rest, err := framework.LoadRESTClientConfig(kubeconfig, kuratorContext) + gomega.Expect(err).ShouldNot(gomega.HaveOccurred()) + + kubeClient, err = kubernetes.NewForConfig(rest) + gomega.Expect(err).ShouldNot(gomega.HaveOccurred()) + + kuratorClient, err = kurator.NewForConfig(rest) + gomega.Expect(err).ShouldNot(gomega.HaveOccurred()) +}) diff --git a/go.mod b/go.mod index efba8f9f8..726227de4 100644 --- a/go.mod +++ b/go.mod @@ -34,7 +34,8 @@ require ( github.com/gosuri/uitable v0.0.4 github.com/hashicorp/go-multierror v1.1.1 github.com/karmada-io/karmada v1.4.2 - github.com/onsi/gomega v1.27.10 + github.com/onsi/ginkgo/v2 v2.15.0 + github.com/onsi/gomega v1.30.0 github.com/pkg/errors v0.9.1 github.com/pkg/sftp v1.13.5 github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.61.1 @@ -133,6 +134,7 @@ require ( github.com/go-openapi/jsonpointer v0.20.0 // indirect github.com/go-openapi/jsonreference v0.20.2 // indirect github.com/go-openapi/swag v0.22.4 // indirect + github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/gobuffalo/flect v1.0.2 // indirect github.com/gobwas/glob v0.2.3 // indirect github.com/goccy/go-json v0.10.2 // indirect @@ -145,6 +147,7 @@ require ( github.com/google/gnostic v0.6.9 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/gofuzz v1.2.0 // indirect + github.com/google/pprof v0.0.0-20230705174524-200ffdc848b8 // indirect github.com/google/s2a-go v0.1.7 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/google/uuid v1.4.0 // indirect @@ -225,7 +228,7 @@ require ( go.uber.org/zap v1.26.0 // indirect go4.org v0.0.0-20201209231011-d4a079459e60 // indirect golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 // indirect - golang.org/x/mod v0.12.0 // indirect + golang.org/x/mod v0.14.0 // indirect golang.org/x/net v0.19.0 // indirect golang.org/x/oauth2 v0.15.0 // indirect golang.org/x/sync v0.5.0 // indirect @@ -233,7 +236,7 @@ require ( golang.org/x/term v0.15.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.13.0 // indirect + golang.org/x/tools v0.16.1 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/api v0.152.0 // indirect google.golang.org/appengine v1.6.8 // indirect diff --git a/go.sum b/go.sum index 774cb2b37..38749558e 100644 --- a/go.sum +++ b/go.sum @@ -369,6 +369,7 @@ github.com/go-resty/resty/v2 v2.7.0 h1:me+K9p3uhSmXtrBZ4k9jcEAfJmuC8IivWHwaLZwPr github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= github.com/go-zookeeper/zk v1.0.3 h1:7M2kwOsc//9VeeFiPtf+uSJlVpU66x9Ba5+8XK7/TDg= github.com/gobuffalo/flect v0.2.0/go.mod h1:W3K3X9ksuZfir8f/LrfVtWmCDQFfayuylOJ7sz/Fj80= github.com/gobuffalo/flect v1.0.2 h1:eqjPGSo2WmjgY2XlpGwo2NXgL3RucAKo4k4qQMNA5sA= @@ -465,6 +466,7 @@ github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20230705174524-200ffdc848b8 h1:n6vlPhxsA+BW/XsS5+uqi7GyzaLa5MH7qlSLBZtRdiA= +github.com/google/pprof v0.0.0-20230705174524-200ffdc848b8/go.mod h1:Jh3hGz2jkYak8qXPD19ryItVnUgpgeqzdkY/D0EaeuA= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= @@ -720,7 +722,8 @@ github.com/onsi/ginkgo/v2 v2.7.0/go.mod h1:yjiuMwPokqY1XauOgju45q3sJt6VzQ/Fict1L github.com/onsi/ginkgo/v2 v2.8.1/go.mod h1:N1/NbDngAFcSLdyZ+/aYTYGSlq9qMCS/cNKGJjy+csc= github.com/onsi/ginkgo/v2 v2.9.0/go.mod h1:4xkjoL/tZv4SMWeww56BU5kAt19mVB47gTWxmrTcxyk= github.com/onsi/ginkgo/v2 v2.9.1/go.mod h1:FEcmzVcCHl+4o9bQZVab+4dC9+j+91t2FHSzmGAPfuo= -github.com/onsi/ginkgo/v2 v2.12.1 h1:uHNEO1RP2SpuZApSkel9nEh1/Mu+hmQe7Q+Pepg5OYA= +github.com/onsi/ginkgo/v2 v2.15.0 h1:79HwNRBAZHOEwrczrgSOPy+eFTTlIGELKy5as+ClttY= +github.com/onsi/ginkgo/v2 v2.15.0/go.mod h1:HlxMHtYF57y6Dpf+mc5529KKmSq9h2FpCF+/ZkwUxKM= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.8.1/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= @@ -737,8 +740,8 @@ github.com/onsi/gomega v1.26.0/go.mod h1:r+zV744Re+DiYCIPRlYOTxn0YkOLcAnW8k1xXdM github.com/onsi/gomega v1.27.1/go.mod h1:aHX5xOykVYzWOV4WqQy0sy8BQptgukenXpCXfadcIAw= github.com/onsi/gomega v1.27.3/go.mod h1:5vG284IBtfDAmDyrK+eGyZmUgUlmi+Wngqo557cZ6Gw= github.com/onsi/gomega v1.27.4/go.mod h1:riYq/GJKh8hhoM01HN6Vmuy93AarCXCBGpvFDK3q3fQ= -github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= -github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= +github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8= +github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI= @@ -1037,8 +1040,9 @@ golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= +golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1316,8 +1320,8 @@ golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= golang.org/x/tools v0.12.0/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM= -golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= -golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= +golang.org/x/tools v0.16.1 h1:TLyB3WofjdOEepBHAU20JdNC1Zbg87elYofWYAY5oZA= +golang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/hack/e2e-test/fleet-clusters/attachedcluster.sh b/hack/e2e-test/fleet-clusters/attachedcluster.sh deleted file mode 100755 index 4dcd69160..000000000 --- a/hack/e2e-test/fleet-clusters/attachedcluster.sh +++ /dev/null @@ -1,76 +0,0 @@ -#!/usr/bin/env bash - -set -o errexit -set -o nounset -set -o pipefail - -KUBECONFIG_PATH=${KUBECONFIG_PATH:-"${HOME}/.kube"} -MAIN_KUBECONFIG=${MAIN_KUBECONFIG:-"${KUBECONFIG_PATH}/kurator-host.config"} -export KUBECONFIG=${MAIN_KUBECONFIG} - -kubectl create secret generic kurator-member1 --from-file=kurator-member1.config=${KUBECONFIG_PATH}/kurator-member1.config -kubectl create secret generic kurator-member2 --from-file=kurator-member2.config=${KUBECONFIG_PATH}/kurator-member2.config - -cat <