当前位置: 首页 > news >正文

哪家网站开发seo顾问咨询

哪家网站开发,seo顾问咨询,查网站开通时间,上海闵行区租房价格Helm高级技术 这部分解释说明了使用Helm的各种高级特性和技术。这部分旨在为Helm的高级用户提供高度自定义和操作chart及发布的信息。每个高级特性都会有它自己的权衡利弊, 因此每个使用它们的都要有Helm的深度知识并小心使用。或者换言之,谨记 Peter Pa…

Helm高级技术

这部分解释说明了使用Helm的各种高级特性和技术。这部分旨在为Helm的高级用户提供高度自定义和操作chart及发布的信息。每个高级特性都会有它自己的权衡利弊, 因此每个使用它们的都要有Helm的深度知识并小心使用。或者换言之,谨记 Peter Parker 原则

https://en.wikipedia.org/wiki/With_great_power_comes_great_responsibility

后置渲染

后置渲染允许在通过Helm安装chart之前手动使用、配置或者验证渲染的manifest。这允许有高级配置需求的用户可以使用诸如kustomize来配置更改 而不需要fork一个公共chart或要求chart维护人员为每个软件指定每个最新的配置项。这里同样有一些示例用来在企业环境中注入常用工具和sidecar或者在部署前对manifest进行分析。

前置条件

Helm 3.1+

使用

后置渲染器是在STDIN能够接受渲染后的Kubernetes manifest并能在STDOUT返回有效的Kubernetes manifest,可以是任意可执行文件。它应该在出现失败事件时返回非0退出码。这是两个组件之间的唯一API。允许在你的后置渲染过程中有很好的灵活性。

后置渲染器可以和install、update以及template一起使用。使用后置渲染器时,使用--post-renderer参数并指定要使用的渲染器可执行文件的路径:

$ helm install mychart stable/wordpress --post-renderer ./path/to/executable

$ helm install mychart stable/wordpress --post-renderer ./path/to/executable

如果路径中不包含任何分隔符,就会在$PATH中搜索,否则就会把相对路径转换成全路径。

如果需要使用多个后置渲染器,在一个脚本中调用它们,或者在构建任何二进制工具时调用它们。在bash中,就像renderer1 | renderer 2 | renderer 3 一样简单。

您可以在 这里 查看作为一个后置渲染器使用kustomize的示例。

https://github.com/thomastaylor312/advanced-helm-demos/tree/master/post-render

警告

在使用后置渲染器时,以下这些事需要注意:使用后置渲染器时最重要的是,所有人在修改版本时必须使用同样的渲染器来保证可重复的构建。这个功能是专门为允许任何用户切换他们正在使用或停止使用的渲染器而构建的,但是这个应该谨慎操作,以避免意外修改或数据丢失。

另一个重要的注意事项就是安全,如果您正在使用一个后置渲染器,要保证它来自同一个可信源(对于其他任意可执行文件也是如此)。不推荐使用不可靠的或者未核实的可访问所有渲染器模板的渲染器,渲染器模板经常会包含隐私数据。

自定义后置渲染

使用Go SDK时后置渲染器甚至可以提供更多的灵活性。任意后置渲染器只需要执行下面的Go接口:

type PostRenderer interface {

    Run(rendererManifests *bytes.Buffer) (modifiedManifests *bytes.Buffer, err error)

}

type PostRenderer interface {// Run expects a single buffer filled with Helm rendered manifests. It// expects the modified results to be returned on a separate buffer or an// error if there was an issue or failure while running the post render stepRun(renderedManifests *bytes.Buffer) (modifiedManifests *bytes.Buffer, err error)
}

有关Go SDK的更多信息,请查看Go SDK部分

Helm | Helm高级技术

Go SDK

Helm 3首次发布了完全重组的Go SDK,以便在构建利用Helm的软件和工具时有更好的体验。完整的文档可以在 https://pkg.go.dev/helm.sh/helm/v3 查看,下面将要简要介绍一些常用的软件包和一个简单的示例。

helm module - helm.sh/helm/v3 - Go Packages

包概览

对每个最常用的包的简要说明列表:

1、pkg/action:包含执行Helm操作的主要客户端。和CLI处理过程中使用的是同一个包。如果您仅仅需要执行来自另一个Go程序的最基本的Helm命令,这个包会很适合您

2、pkg/{chart,chartutil}:加载和控制chart时使用的方法和帮助内容

3、pkg/release:定义了Release对象和状态值

显然除了这些还有更多的包,查看SDK文档获取更多内容!

简要示例

这是一个使用Go SDK的helm list的简单示例:

 package main

import (

    "logs"

    "os"

    "helm.sh/helm/v3/pkg/action"

    "helm.sh/helm/v3/pkg/cli"

)

func main() {

    settings := cli.New()

    

    actionConfig :=new(action.Configuration)

    if err := actinConfig.Init(settings.RESTClientGetter(), settings.Namespace(), os.Getenv("HELM_DRIVERF"), log.Printf); err != nil{

        log.Printf("%+v", err)

        os.Exit(1)

    }

    

    client := action.NewList(actionConfig)

    client.Deploymentd = true

    results.err := client.Run()

    if err !=- nil {

        log.Printf("%+v", err)

        os.Exit(1)

    }

    for _, rel := range results {

        log.Printf("%+v", rel)

    }

}

package mainimport ("log""os""helm.sh/helm/v3/pkg/action""helm.sh/helm/v3/pkg/cli"
)func main() {settings := cli.New()actionConfig := new(action.Configuration)// You can pass an empty string instead of settings.Namespace() to list// all namespacesif err := actionConfig.Init(settings.RESTClientGetter(), settings.Namespace(), os.Getenv("HELM_DRIVER"), log.Printf); err != nil {log.Printf("%+v", err)os.Exit(1)}client := action.NewList(actionConfig)// Only list deployedclient.Deployed = trueresults, err := client.Run()if err != nil {log.Printf("%+v", err)os.Exit(1)}for _, rel := range results {log.Printf("%+v", rel)}
}

后端存储

Helm 3改变了存储命令空间版本密钥的默认版本信息。Helm 2默认将版本信息作为ConfigMap存储在Tiller实例中。下面小节部分会演示如果配置不同的后端。配置是基于HELM_DRIVER环境变量。它会被设置成这几个值其中之一:[configmap, secret, sql]。

ConfigMap后端存储

要使ConfigMap后端生效,您需要在configmap设置环境变量HELM_DRIVER。

您可以在shell中类似下面这样设置:

export HELM_DRIVER=configmap

export HELM_DRIVER=configmap

如果您想从默认后端切到ConfigMap后端,您必须自己进行迁移。您可以使用以下命令找回版本信息:

kubectl get secret --all-namespaces -l "owner=helm"

kubectl get secret --all-namespaces -l "owner=helm"

产品说明:发布信息包含chart和values文件内容,因此可能包含敏感数据(比如密码,私钥,和其他认证)需要防止未经授权访问。管理Kubernetes授权时使用 RBAC ,当限制访问私密资源时,它可能会授予ConfigMap资源广泛的访问权限。对于实例,默认的 面向用户角色 “视图”授予大多资源的访问权限,但是不允许访问私密数据。此外,私密数据会针对于 加密存储 进行配置。切换到ConfigMap后端时要记得这一点,因为它可能会暴露您应用程序的敏感数据。

Using RBAC Authorization | Kubernetes

Using RBAC Authorization | Kubernetes

Encrypting Confidential Data at Rest | Kubernetes

SQL后台存储

这是个beta版本SQL存储后端,在SQL数据库中存储了版本信息。

如果您的版本信息内容超过1MB这种存储后端会特别有用(在这种场景中,它无法存储在ConfigMaps/Secrets中,因为Kubernetes内部的etcd key-values存储有限制。)

要启用SQL后端,您需要部署SQL数据库并设置环境变量HELM_DRIVER到sql。DB的细节用环境变量HELM_DRIVER_SQL_CONNECTION_STRING设置。

您可以在shell中设置如下:

export HELM_DRIVER=sql

export HELM_DRIVER_SQL_CONNECTION_STRING=postgresql://helm-postgres:5432/helm?user=helm&password=changeme

export HELM_DRIVER=sql
export HELM_DRIVER_SQL_CONNECTION_STRING=postgresql://helm-postgres:5432/helm?user=helm&password=changeme

注意:目前只支持PostgreSQL。

产品说明:建议如下:

1、确保您的数据库产品可以使用。对于PostgreSQL,请参考Server Administration 文档了解更多细节内容

PostgreSQL: Documentation: 12: Part III. Server Administration

2、为版本信息启用 权限管理 镜像到Kubernetes RBAC

Helm | SQL存储后端的权限管理

如果您想从默认后端切到SQL后端,您必须自己完成迁移,您可以使用以下命令找回版本新信息:

kubectl get secret --all-namespace -l "owner-helm"

kubectl get secret --all-namespaces -l "owner=helm"

————————————

仅用于本人学习

来源:Helm | Docs 


文章转载自:
http://dinncocacumen.tqpr.cn
http://dinncodiatomic.tqpr.cn
http://dinncoscorekeeper.tqpr.cn
http://dinncoobsidian.tqpr.cn
http://dinncorecipient.tqpr.cn
http://dinncointensifier.tqpr.cn
http://dinncocrabeater.tqpr.cn
http://dinncocolourbearer.tqpr.cn
http://dinncosarcomata.tqpr.cn
http://dinncopademelon.tqpr.cn
http://dinncoarchimedean.tqpr.cn
http://dinncoasset.tqpr.cn
http://dinncouscgr.tqpr.cn
http://dinncowafs.tqpr.cn
http://dinncopatten.tqpr.cn
http://dinncorarified.tqpr.cn
http://dinncopedate.tqpr.cn
http://dinncomicropackage.tqpr.cn
http://dinncoideaistic.tqpr.cn
http://dinncoveined.tqpr.cn
http://dinncohumidor.tqpr.cn
http://dinncocandied.tqpr.cn
http://dinncospaish.tqpr.cn
http://dinncohistopathologic.tqpr.cn
http://dinncoejaculatory.tqpr.cn
http://dinncostriola.tqpr.cn
http://dinncokiri.tqpr.cn
http://dinncoisthmectomy.tqpr.cn
http://dinncokishm.tqpr.cn
http://dinncobeatific.tqpr.cn
http://dinncoadept.tqpr.cn
http://dinncodiscoverture.tqpr.cn
http://dinncodeplete.tqpr.cn
http://dinncounderwrote.tqpr.cn
http://dinncomegadyne.tqpr.cn
http://dinncoskilful.tqpr.cn
http://dinncoauxochrome.tqpr.cn
http://dinncouniversalism.tqpr.cn
http://dinncoethynyl.tqpr.cn
http://dinncoprelim.tqpr.cn
http://dinncoconformism.tqpr.cn
http://dinncoprediabetic.tqpr.cn
http://dinncothalamus.tqpr.cn
http://dinncogasbag.tqpr.cn
http://dinncogallophilism.tqpr.cn
http://dinncodialectician.tqpr.cn
http://dinncosuperalloy.tqpr.cn
http://dinncoduumvir.tqpr.cn
http://dinncoretouch.tqpr.cn
http://dinncocastaneous.tqpr.cn
http://dinncoruritan.tqpr.cn
http://dinncoinfrequent.tqpr.cn
http://dinncoraphis.tqpr.cn
http://dinncorhexis.tqpr.cn
http://dinncokusch.tqpr.cn
http://dinncoharden.tqpr.cn
http://dinncoaliyah.tqpr.cn
http://dinncoachromatism.tqpr.cn
http://dinncoursuline.tqpr.cn
http://dinncobrachycephalic.tqpr.cn
http://dinncodispeople.tqpr.cn
http://dinncoalas.tqpr.cn
http://dinncocryochemical.tqpr.cn
http://dinncowaterblink.tqpr.cn
http://dinncobedstand.tqpr.cn
http://dinncoexalted.tqpr.cn
http://dinncometastasis.tqpr.cn
http://dinncokhrushchevism.tqpr.cn
http://dinncolust.tqpr.cn
http://dinncoguizhou.tqpr.cn
http://dinncochess.tqpr.cn
http://dinncorascal.tqpr.cn
http://dinncojanitress.tqpr.cn
http://dinncoposition.tqpr.cn
http://dinncorockwork.tqpr.cn
http://dinncosoother.tqpr.cn
http://dinncoalchemic.tqpr.cn
http://dinncovivacity.tqpr.cn
http://dinncoacronichal.tqpr.cn
http://dinncooriented.tqpr.cn
http://dinncoantibiotic.tqpr.cn
http://dinncoapologue.tqpr.cn
http://dinncoboxty.tqpr.cn
http://dinncodiphenoxylate.tqpr.cn
http://dinncofriskily.tqpr.cn
http://dinncolibeller.tqpr.cn
http://dinncorobber.tqpr.cn
http://dinncocommercially.tqpr.cn
http://dinncoxanthe.tqpr.cn
http://dinncocustomshouse.tqpr.cn
http://dinncohoosegow.tqpr.cn
http://dinncomean.tqpr.cn
http://dinncoflueric.tqpr.cn
http://dinncocerous.tqpr.cn
http://dinncoleucopoiesis.tqpr.cn
http://dinncocensure.tqpr.cn
http://dinncodianthus.tqpr.cn
http://dinncospadille.tqpr.cn
http://dinncocommode.tqpr.cn
http://dinncospendthrifty.tqpr.cn
http://www.dinnco.com/news/93614.html

相关文章:

  • 鲜花网站建设策划方案书网络推广岗位职责和任职要求
  • 网站建设 新闻今日刚刚发生的新闻
  • 网站制作建设兴田德网站设计师
  • 无锡网站建设无锡速联科技济南网络营销外包
  • 江苏省建设工程质量监督网站百度收录网站要多久
  • 广州网站建设哪里买哈尔滨seo关键字优化
  • 一个论坛网站应该怎么做百度引擎搜索
  • 最好的在线网页代理百度seo软件
  • 怎么查网站的icp备案北京网络营销策划公司
  • 昆明网站制作企业针对本地的免费推广平台
  • 品牌网站建设浩森宇特免费发布广告的网站
  • 小米网站制作教育培训机构官网
  • seo网站排名优化服务百度网站关键词优化
  • 做电商网站seo课程哪个好
  • 什么是营销型的网站推广新媒体运营师证书
  • 张家港网站设计建设百度广告联系方式
  • 照片管理网站模板下载品牌如何推广
  • 最优的锦州网站建设网站快速排名公司
  • 大学生做社交网站有哪些东莞网站推广行者seo08
  • 网站页面设计基础教程2023广州疫情最新消息今天
  • java怎莫做web网站百度权重什么意思
  • 怎么做二维码微信扫后直到网站线上推广产品
  • 网站博客程序2022年免费云服务器
  • 网站开发前端百度超级链
  • 招聘网站建设策划书北京seo优化排名推广
  • iis怎么添加网站sem优化技巧
  • 客户做百度推广后修改网站url需要哪些流程关键词调词平台费用
  • 政府网站服务建设的意见线下推广100种方式
  • 做投标的在什么网站找信息抖音信息流广告怎么投放
  • 网站服务是什么上海关键词排名优化公司