diff --git a/go.mod b/go.mod index 61d88565..e66f2ea3 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,6 @@ require ( github.com/RocketChat/Rocket.Chat.Go.SDK v0.0.0-20210112200207-10ab4d695d60 github.com/antonmedv/expr v1.12.5 github.com/bradleyfalzon/ghinstallation/v2 v2.1.0 - github.com/ghodss/yaml v1.0.0 github.com/go-telegram-bot-api/telegram-bot-api/v5 v5.5.1 github.com/golang/mock v1.6.0 github.com/google/go-github/v41 v41.0.0 @@ -26,6 +25,7 @@ require ( k8s.io/api v0.23.3 k8s.io/apimachinery v0.23.3 k8s.io/client-go v0.23.3 + sigs.k8s.io/yaml v1.3.0 ) require ( @@ -85,7 +85,6 @@ require ( k8s.io/utils v0.0.0-20211116205334-6203023598ed // indirect sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 // indirect sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect - sigs.k8s.io/yaml v1.2.0 // indirect ) replace github.com/prometheus/client_golang => github.com/prometheus/client_golang v1.14.0 diff --git a/go.sum b/go.sum index acf361d3..2298bb4f 100644 --- a/go.sum +++ b/go.sum @@ -128,7 +128,6 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= -github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -896,5 +895,6 @@ sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK sigs.k8s.io/structured-merge-diff/v4 v4.2.1 h1:bKCqE9GvQ5tiVHn5rfn1r+yao3aLQEaLzkkmAkf+A6Y= sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= -sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= +sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= +sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/pkg/api/config.go b/pkg/api/config.go index 95892791..eefc41db 100644 --- a/pkg/api/config.go +++ b/pkg/api/config.go @@ -9,11 +9,11 @@ import ( "github.com/argoproj/notifications-engine/pkg/subscriptions" "github.com/argoproj/notifications-engine/pkg/triggers" - "github.com/ghodss/yaml" log "github.com/sirupsen/logrus" yaml3 "gopkg.in/yaml.v3" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/fields" + "sigs.k8s.io/yaml" ) type ServiceFactory func() (services.NotificationService, error) diff --git a/pkg/cmd/context.go b/pkg/cmd/context.go index 7bad9df7..c8ee688e 100644 --- a/pkg/cmd/context.go +++ b/pkg/cmd/context.go @@ -9,7 +9,6 @@ import ( "os" "time" - "github.com/ghodss/yaml" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" @@ -20,6 +19,7 @@ import ( informersv1 "k8s.io/client-go/informers/core/v1" "k8s.io/client-go/kubernetes" "k8s.io/client-go/tools/cache" + "sigs.k8s.io/yaml" "github.com/argoproj/notifications-engine/pkg/api" ) diff --git a/pkg/cmd/trigger_test.go b/pkg/cmd/trigger_test.go index 37e655b1..a185bbd5 100644 --- a/pkg/cmd/trigger_test.go +++ b/pkg/cmd/trigger_test.go @@ -11,7 +11,6 @@ import ( "github.com/argoproj/notifications-engine/pkg/api" "github.com/argoproj/notifications-engine/pkg/services" - "github.com/ghodss/yaml" "github.com/stretchr/testify/assert" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -20,6 +19,7 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" dynamicfake "k8s.io/client-go/dynamic/fake" "k8s.io/client-go/kubernetes/fake" + "sigs.k8s.io/yaml" ) func newTestResource(name string) *unstructured.Unstructured { diff --git a/pkg/services/googlechat.go b/pkg/services/googlechat.go index a137072f..a574a7e9 100644 --- a/pkg/services/googlechat.go +++ b/pkg/services/googlechat.go @@ -9,8 +9,8 @@ import ( "net/url" texttemplate "text/template" - "github.com/ghodss/yaml" log "github.com/sirupsen/logrus" + "sigs.k8s.io/yaml" httputil "github.com/argoproj/notifications-engine/pkg/util/http" ) diff --git a/pkg/services/services.go b/pkg/services/services.go index 85482481..ced22bbe 100644 --- a/pkg/services/services.go +++ b/pkg/services/services.go @@ -8,7 +8,7 @@ import ( texttemplate "text/template" _ "time/tzdata" - "github.com/ghodss/yaml" + "sigs.k8s.io/yaml" ) type Notification struct { diff --git a/pkg/subscriptions/annotations.go b/pkg/subscriptions/annotations.go index 312e68c7..ecedac2e 100644 --- a/pkg/subscriptions/annotations.go +++ b/pkg/subscriptions/annotations.go @@ -4,8 +4,8 @@ import ( "fmt" "strings" - "github.com/ghodss/yaml" log "github.com/sirupsen/logrus" + "sigs.k8s.io/yaml" "github.com/argoproj/notifications-engine/pkg/services" ) diff --git a/pkg/util/misc/misc.go b/pkg/util/misc/misc.go index f7850764..e4fcf928 100644 --- a/pkg/util/misc/misc.go +++ b/pkg/util/misc/misc.go @@ -7,7 +7,7 @@ import ( "reflect" "sort" - "github.com/ghodss/yaml" + "sigs.k8s.io/yaml" ) func PrintFormatted(input interface{}, output string, out io.Writer) error {