mirror of
https://github.com/siderolabs/talos.git
synced 2025-10-25 22:41:10 +02:00
chore: update hydrophone library
My PR https://github.com/kubernetes-sigs/hydrophone/pull/198 got merged upstream, so drop local workaround. Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
This commit is contained in:
parent
1f28726d46
commit
3d35e54683
4
go.mod
4
go.mod
@ -176,7 +176,7 @@ require (
|
||||
gopkg.in/yaml.v3 v3.0.1
|
||||
k8s.io/klog/v2 v2.130.1
|
||||
kernel.org/pub/linux/libs/security/libcap/cap v1.2.70
|
||||
sigs.k8s.io/hydrophone v0.6.1-0.20240611183045-ec6fa911eb8b
|
||||
sigs.k8s.io/hydrophone v0.6.1-0.20240705095313-91065c9fe3a5
|
||||
sigs.k8s.io/yaml v1.4.0
|
||||
)
|
||||
|
||||
@ -341,7 +341,7 @@ require (
|
||||
gopkg.in/inf.v0 v0.9.1 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
k8s.io/cli-runtime v0.30.2 // indirect
|
||||
k8s.io/kube-openapi v0.0.0-20240521193020-835d969ad83a // indirect
|
||||
k8s.io/kube-openapi v0.0.0-20240703190633-0aa61b46e8c2 // indirect
|
||||
k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 // indirect
|
||||
kernel.org/pub/linux/libs/security/libcap/psx v1.2.70 // indirect
|
||||
rsc.io/qr v0.2.0 // indirect
|
||||
|
||||
8
go.sum
8
go.sum
@ -1227,8 +1227,8 @@ k8s.io/cri-api v0.31.0-alpha.0.0.20240529224029-3a66d9d86654 h1:REcqRW1lajhGkr+R
|
||||
k8s.io/cri-api v0.31.0-alpha.0.0.20240529224029-3a66d9d86654/go.mod h1:8SzLKTnltnWXG9FMIL4SHWcAnnPGssi5viN/SMMMf4k=
|
||||
k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk=
|
||||
k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
|
||||
k8s.io/kube-openapi v0.0.0-20240521193020-835d969ad83a h1:zD1uj3Jf+mD4zmA7W+goE5TxDkI7OGJjBNBzq5fJtLA=
|
||||
k8s.io/kube-openapi v0.0.0-20240521193020-835d969ad83a/go.mod h1:UxDHUPsUwTOOxSU+oXURfFBcAS6JwiRXTYqYwfuGowc=
|
||||
k8s.io/kube-openapi v0.0.0-20240703190633-0aa61b46e8c2 h1:T5TEV4a+pEjc+j9Xui3MGGeoDLIN6uzZrx8NYotFMgQ=
|
||||
k8s.io/kube-openapi v0.0.0-20240703190633-0aa61b46e8c2/go.mod h1:UxDHUPsUwTOOxSU+oXURfFBcAS6JwiRXTYqYwfuGowc=
|
||||
k8s.io/kube-scheduler v0.30.2 h1:2uR6qVkAV4ySzAQws5XDTWu62mRCxwm2m9oS0EIhAQI=
|
||||
k8s.io/kube-scheduler v0.30.2/go.mod h1:ft17TR1cD7ZgLC5m3xkpvU4wK2X5ccbsg/b+a3HdR2Y=
|
||||
k8s.io/kubectl v0.30.2 h1:cgKNIvsOiufgcs4yjvgkK0+aPCfa8pUwzXdJtkbhsH8=
|
||||
@ -1248,8 +1248,8 @@ rsc.io/qr v0.2.0 h1:6vBLea5/NRMVTz8V66gipeLycZMl/+UlFmk8DvqQ6WY=
|
||||
rsc.io/qr v0.2.0/go.mod h1:IF+uZjkb9fqyeF/4tlBoynqmQxUoPfWEKh921coOuXs=
|
||||
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
|
||||
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
|
||||
sigs.k8s.io/hydrophone v0.6.1-0.20240611183045-ec6fa911eb8b h1:LfLpWELAT27q8w8z1npuQmRSaD5L8rnK8d7Q7e/j0VM=
|
||||
sigs.k8s.io/hydrophone v0.6.1-0.20240611183045-ec6fa911eb8b/go.mod h1:T7UFPXu5+RM5lniW6dQWvgD1UEqPosFzvr0zRoZrbOU=
|
||||
sigs.k8s.io/hydrophone v0.6.1-0.20240705095313-91065c9fe3a5 h1:Fd61lc0AJDPXIl/15te670jVsHM2KF/HPQZXi1vycxw=
|
||||
sigs.k8s.io/hydrophone v0.6.1-0.20240705095313-91065c9fe3a5/go.mod h1:G+i45evb/pXdMUemC5oDipsebI3QGlz8vXDhdKfPUjE=
|
||||
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo=
|
||||
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0=
|
||||
sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3 h1:XX3Ajgzov2RKUdc5jW3t5jwY7Bo7dcRm+tFxT+NfgY0=
|
||||
|
||||
@ -15,11 +15,6 @@ import (
|
||||
|
||||
"github.com/blang/semver/v4"
|
||||
yaml "gopkg.in/yaml.v3"
|
||||
apierrors "k8s.io/apimachinery/pkg/api/errors"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/fields"
|
||||
"k8s.io/apimachinery/pkg/watch"
|
||||
"k8s.io/client-go/kubernetes"
|
||||
"sigs.k8s.io/hydrophone/pkg/common"
|
||||
"sigs.k8s.io/hydrophone/pkg/conformance"
|
||||
"sigs.k8s.io/hydrophone/pkg/conformance/client"
|
||||
@ -127,44 +122,6 @@ func CertifiedConformance(ctx context.Context, cluster cluster.K8sProvider) erro
|
||||
return Run(ctx, cluster, &options)
|
||||
}
|
||||
|
||||
func ensureNamespaceDeleted(ctx context.Context, clientset *kubernetes.Clientset, namespace string, timeout time.Duration) error {
|
||||
ctx, cancel := context.WithTimeout(ctx, timeout)
|
||||
defer cancel()
|
||||
|
||||
watcher, err := clientset.CoreV1().Namespaces().Watch(ctx, metav1.ListOptions{
|
||||
FieldSelector: fields.OneTermEqualSelector("metadata.name", namespace).String(),
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
defer watcher.Stop()
|
||||
|
||||
_, err = clientset.CoreV1().Namespaces().Get(ctx, namespace, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
if apierrors.IsNotFound(err) {
|
||||
return nil // already deleted
|
||||
}
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
for {
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
return ctx.Err()
|
||||
case event := <-watcher.ResultChan():
|
||||
if event.Type == watch.Error {
|
||||
return fmt.Errorf("error watching pod: %v", event.Object)
|
||||
}
|
||||
|
||||
if event.Type == watch.Deleted {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Run the e2e test against cluster with provided options.
|
||||
//
|
||||
//nolint:gocyclo
|
||||
@ -198,10 +155,6 @@ func Run(ctx context.Context, cluster cluster.K8sProvider, options *Options) err
|
||||
return fmt.Errorf("failed to cleanup: %w", err)
|
||||
}
|
||||
|
||||
if err := ensureNamespaceDeleted(ctx, clientset, config.Namespace, options.DeleteTimeout); err != nil {
|
||||
return fmt.Errorf("failed to delete namespace: %w", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user