网站建设的具体过程seo管理系统创作
欢迎关注我的公众号:
目前刚开始写一个月,一共写了18篇原创文章,文章目录如下:
istio多集群探秘,部署了50次多集群后我得出的结论
istio多集群链路追踪,附实操视频
istio防故障利器,你知道几个,istio新手不要读,太难!
istio业务权限控制,原来可以这么玩
istio实现非侵入压缩,微服务之间如何实现压缩
不懂envoyfilter也敢说精通istio系列-http-rbac-不要只会用AuthorizationPolicy配置权限
不懂envoyfilter也敢说精通istio系列-02-http-corsFilter-不要只会vs
不懂envoyfilter也敢说精通istio系列-03-http-csrf filter-再也不用再代码里写csrf逻辑了
不懂envoyfilter也敢说精通istio系列http-jwt_authn-不要只会RequestAuthorization
不懂envoyfilter也敢说精通istio系列-05-fault-filter-故障注入不止是vs
不懂envoyfilter也敢说精通istio系列-06-http-match-配置路由不只是vs
不懂envoyfilter也敢说精通istio系列-07-负载均衡配置不止是dr
不懂envoyfilter也敢说精通istio系列-08-连接池和断路器
不懂envoyfilter也敢说精通istio系列-09-http-route filter
不懂envoyfilter也敢说精通istio系列-network filter-redis proxy
不懂envoyfilter也敢说精通istio系列-network filter-HttpConnectionManager
不懂envoyfilter也敢说精通istio系列-ratelimit-istio ratelimit完全手册
------------------------------------------------------------------------------------------------------------
func newDependencyBuildCmd(out io.Writer) *cobra.Command {//创建dependency build命令client := action.NewDependency()//初始化结构体cmd := &cobra.Command{//创建cobra命令Use: "build CHART",Short: "rebuild the charts/ directory based on the Chart.lock file",Long: dependencyBuildDesc,Args: require.MaximumNArgs(1),RunE: func(cmd *cobra.Command, args []string) error {chartpath := "."//设置chartpathif len(args) > 0 {//如果参数大于0个,则设置chartpath为第一个参数chartpath = filepath.Clean(args[0])}man := &downloader.Manager{//构造managerOut: out,ChartPath: chartpath,Keyring: client.Keyring,Getters: getter.All(settings),RepositoryConfig: settings.RepositoryConfig,RepositoryCache: settings.RepositoryCache,Debug: settings.Debug,}if client.Verify {//设置verifyman.Verify = downloader.VerifyIfPossible}return man.Build()//执行构造},}f := cmd.Flags()f.BoolVar(&client.Verify, "verify", false, "verify the packages against signatures")//verify选项f.StringVar(&client.Keyring, "keyring", defaultKeyring(), "keyring containing public keys")//keyring选项return cmd
}
func (m *Manager) Build() error {//执行构造c, err := m.loadChartDir()//加载chartif err != nil {return err}// If a lock file is found, run a build from that. Otherwise, just do// an update.lock := c.Lock//获取lockif lock == nil {//如果lock为空,执行更新return m.Update()}// Check that all of the repos we're dependent on actually exist.req := c.Metadata.Dependencies//获取依赖if _, err := m.resolveRepoNames(req); err != nil {//解析依赖仓库名称return err}if sum, err := resolver.HashReq(req, lock.Dependencies); err != nil || sum != lock.Digest {//判断hash是否相同// If lock digest differs and chart is apiVersion v1, it maybe because the lock was built// with Helm 2 and therefore should be checked with Helm v2 hash// Fix for: https://github.com/helm/helm/issues/7233if c.Metadata.APIVersion == chart.APIVersionV1 {//如果是v1版本apilog.Println("warning: a valid Helm v3 hash was not found. Checking against Helm v2 hash...")if sum, err := resolver.HashV2Req(req); err != nil || sum != lock.Digest {//检查v2版本hash是否相同return errors.New("the lock file (requirements.lock) is out of sync with the dependencies file (requirements.yaml). Please update the dependencies")//hash不同返回错误}} else {//如果是v3版本,返回错误return errors.New("the lock file (Chart.lock) is out of sync with the dependencies file (Chart.yaml). Please update the dependencies")}}// Check that all of the repos we're dependent on actually exist.if err := m.hasAllRepos(lock.Dependencies); err != nil {//判断依赖仓库是否都存在return err}if !m.SkipUpdate {//如果不跳过更新仓库// For each repo in the file, update the cached copy of that repoif err := m.UpdateRepositories(); err != nil {//更新仓库return err}}// Now we need to fetch every package here into charts/return m.downloadAll(lock.Dependencies)//下载依赖
}