背景
我们的项目是一个基于Kubernetes的云原生项目,会使用到Kubernets的一些组件和依赖。
最开始的项目依赖大概是这样的:
require ( git.woa.com/khaos/pkg v1.4.3-0.20220819031955-4ad837d439ef github.com/ClickHouse/clickhouse-go v1.4.8 github.com/gogf/gf/contrib/drivers/mysql/v2 v2.1.0 github.com/gogf/gf/v2 v2.1.4 github.com/golang/mock v1.4.3 github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 github.com/json-iterator/go v1.1.10 github.com/modern-go/reflect2 v1.0.1 github.com/olekukonko/tablewriter v0.0.5 github.com/opencontainers/go-digest v1.0.0 github.com/robfig/cron/v3 v3.0.1 github.com/sirupsen/logrus v1.7.0 github.com/smartystreets/assertions v1.0.1 github.com/smartystreets/goconvey v1.6.4 github.com/spf13/cobra v1.1.3 github.com/tencentyun/cos-go-sdk-v5 v0.7.35 github.com/tencentyun/tcecloud-sdk-go v3.0.8+incompatible go.opentelemetry.io/otel v1.7.0 go.starlark.net v0.0.0-20210602144842-1cdb82c9e17a golang.org/x/tools v0.1.11-0.20220504162446-54c7ba520b92 google.golang.org/grpc v1.33.1 google.golang.org/protobuf v1.27.1 gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/api v0.19.8 k8s.io/apimachinery v0.19.8 k8s.io/client-go v11.0.0+incompatible ) replace ( google.golang.org/grpc => google.golang.org/grpc v1.29.1 k8s.io/api => k8s.io/api v0.19.6 k8s.io/apimachinery => k8s.io/apimachinery v0.19.6 k8s.io/client-go => k8s.io/client-go v0.19.6 )
引入ArgoWorkflow服务依赖
随着项目的发展,业务上需要流程编排服务。当然作为大自然的代码搬运师,我们从github上找到了适合的贴合我们云原生理念的ArgoWorkflow服务,作为独立的服务运行,我们只需要在当前的项目中依赖其SDK即可