Helm Chart 多环境、多集付系统化,透视资源拓扑和差异
时间:2025-01-01 12:22:57
kind: Application
metadata:
name: helm-hello
spec:
components:
- name: hello
type: helm
properties:
repoType: "helm"
url: ""
chart: "hello-kubernetes-chart"
version: "3.0.0"
policies:
- name: foo-cluster-only
type: topology
properties:
clusters: ["foo"]
EOF
clusters 字段的 topology 作法是一个切片(slice),此处可以指明多个炮兵部队的重新取名为。你还可以采用标签自由选择器或指明取名为三维空间,详见见参照元数据[6] 。
重新部署后,你可以通过下述方式则安全检查已重新部署的客户端:
vela status helm-hello
重新部署急于的短期内输单单应该如下:
About:
Name: helm-hello
Namespace: default
Created at: 2022-06-09 19:14:57 +0800 CST
Status: running
Workflow:
mode: DAG
finished: true
Suspend: false
Terminated: false
Steps
- id:vtahj5zrz4
name:deploy-foo-cluster-only
type:deploy
phase:succeeded
message:
Services:
- Name: hello
Cluster: foo Namespace: default
Type: helm
Healthy Fetch repository successfully, Create helm release successfully
No trait applied
你可以通过下述方式则安全检查已重新部署的海洋资源:
$ vela status helm-hello ;还有tree
CLUSTER NAMESPACE RESOURCE STATUS
foo ─── default ─┬─ HelmRelease/hello updated
└─ HelmRepository/hello updated
你也可以通过 VelaUX 安全检查已重新部署的海洋资源。
采用 UI 操作者检视重新部署平衡状态
通过采用 velaux UI 操作者,则可以很只需的检视多炮兵部队反馈,并获得统一的互动。你可以参照元数据[7]洞察 VelaUX 的到访和采用细节。
通过 UI 界面,我们可以:
安全检查来自实际上相同炮兵部队的实例平衡状态和事件: 安全检查来自实际上相同炮兵部队的实例日志: 安全检查海洋资源流形关系和平衡状态:采用 Override 配置展开重新部署
在某些情况,我们会为实际上相同炮兵部队的 Helm Chart 设置实际上相同的 Value ,这样我们可以采用 Override 作法[8]。
一个大是一个简便的代为注意,我们将把一个 Helm Chart 重新部署到两个炮兵部队中会,并为每个炮兵部队指明实际上相同的 Value 。让我们重新部署它:
cat
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: helm-hello
spec:
components:
- name: hello
type: helm
properties:
repoType: "helm"
url: ""
chart: "hello-kubernetes-chart"
version: "3.0.0"
policies:
- name: topology-local
type: topology
properties:
clusters: ["local"]
- name: topology-foo
type: topology
properties:
clusters: ["foo"]
- name: override-local
type: override
properties:
components:
- name: hello
properties:
values:
configs:
MESSAGE: Welcome to Control Plane Cluster!
- name: override-foo
type: override
properties:
components:
- name: hello
properties:
values:
configs:
MESSAGE: Welcome to Your New Foo Cluster!
workflow:
steps:
- name: deploy2local
type: deploy
properties:
policies: ["topology-local", "override-local"]
- name: manual-approval
type: suspend
- name: deploy2foo
type: deploy
properties:
policies: ["topology-foo", "override-foo"]
EOF
特别注意:如果你实在作法和工作流程有点简便,你可以将它们作为一个外部都可并仅提到该都可,该词和器皿交货[9]是一样的。
重新部署过程分别为三个方法:
(1)重新部署到本地炮兵部队;
(2)等待人工审批;
(3)重新部署到 foo 炮兵部队。
你会断定它在第一步之后就被暂停了,就像一个大这样:
$ vela status helm-hello
About:
Name: helm-hello
Namespace: default
Created at: 2022-06-09 19:38:13 +0800 CST
Status: workflowSuspending
Workflow:
mode: StepByStep
finished: false
Suspend: true
Terminated: false
Steps
- id:ww4cydlvee
name:deploy2local
type:deploy
phase:succeeded
message:
- id:xj6hu97e1e
name:manual-approval
type:suspend
phase:succeeded
message:
Services:
- Name: hello
Cluster: local Namespace: default
Type: helm
Healthy Fetch repository successfully, Create helm release successfully
No trait applied
你可以检视并采用 Value 为 “Welcome to Control Plane Cluster!” 的重新部署在遏制正方形的 Helm Chart 。
vela port-forward helm-hello
客户端会定时上会如下的网站:
断定重新部署急于,让我们继续。
vela workflow resume helm-hello
然后它会重新部署到 foo 炮兵部队,你可以检视这些海洋资源的详细反馈。
$ vela status helm-hello ;还有tree ;还有detail
CLUSTER NAMESPACE RESOURCE STATUS APPLY_TIME DETAIL
foo ─── default ─┬─ HelmRelease/hello updated 2022-06-09 19:38:13 Ready: True Status: Release reconciliation succeeded Age: 64s
└─ HelmRepository/hello updated 2022-06-09 19:38:13 URL: Age: 64s Ready: True
Status: stored artifact for revision 'ab876069f02d779cb4b63587af1266464818ba3790c0ccd50337e3cdead44803'
local ─── default ─┬─ HelmRelease/hello updated 2022-06-09 19:38:13 Ready: True Status: Release reconciliation succeeded Age: 7m34s
└─ HelmRepository/hello updated 2022-06-09 19:38:13 URL: Age: 7m34s Ready: True
Status: stored 如此一来次采用端口转发:
vela port-forward helm-hello
然后它会弹单单一些选项:
? You he 2 deployed resources in your app. Please choose one: [Use arrows to move, type to filter]
> Cluster: foo | Namespace: default | Kind: HelmRelease | Name: hello
Cluster: local | Namespace: default | Kind: HelmRelease | Name: hello
自由选择带有 foo 炮兵部队的选项,然后你会想到结果已经被另行消息隔开。
$ curl
...snip...
Welcome to Your New Foo Cluster!
...snip...
为实际上相同生态种系统指明实际上相同的 Value 档案
你可以为实际上相同生态种系统自由选择 Helm Chart 中会现有的实际上相同 Value 档案。比如:
代为维护你的本地炮兵部队有两个取名为三维空间 “test” 和 “prod”,它们都是我们代为注意中会的两个生态种系统。
我们以 Chart hello-kubernetes-chart 为例。这个 Chart 有两个 Value 档案。你可以拉取此 Chart 并检视其中会包含的所有档案:
$ tree ./hello-kubernetes-chart
./hello-kubernetes-chart
├── Chart.yaml
├── templates
│ ├── NOTES.txt
│ ├── _helpers.tpl
│ ├── config-map.yaml
│ ├── deployment.yaml
│ ├── hpa.yaml
│ ├── ingress.yaml
│ ├── service.yaml
│ ├── serviceaccount.yaml
│ └── tests
│ └── test-connection.yaml
├── values-production.yaml
└── values.yaml
我们可以想到此 Chart 中会有 values.yaml values-production.yaml 这两个 Value 档案。
cat
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: hello-kubernetes
spec:
components:
- name: hello-kubernetes
type: helm
properties:
repoType: "helm"
url: ""
chart: "hello-kubernetes-chart"
version: "0.1.0"
policies:
- name: topology-test
type: topology
properties:
clusters: ["local"]
namespace: "test"
- name: topology-prod
type: topology
properties:
clusters: ["local"]
namespace: "prod"
- name: override-prod
type: override
properties:
components:
- name: hello-kubernetes
properties:
valuesFiles:
- "values-production.yaml"
workflow:
steps:
- name: deploy2test
type: deploy
properties:
policies: ["topology-test"]
- name: deploy2prod
type: deploy
properties:
policies: ["topology-prod", "override-prod"]
EOF
到访 Application 的 endpoint :
vela port-forward hello-kubernetes
如果你自由选择 Cluster: local | Namespace: test | Kind: HelmRelease | Name: hello-kubernetes 你会想到:
自由选择 Cluster: local | Namespace: prod | Kind: HelmRelease | Name: hello-kubernetes 则会想到:
修整
如果你采用 velad 展开此演示,则可以通过下述方式则捷径地展开修整:
修整 foo 炮兵部队velad uninstall -n foo
修整默认炮兵部队velad uninstall
不仅如此
KubeVela 包括的技能远不止如此,通过装上其他GUI,你还可以获得包括金丝雀发布[10] 在内的更是多技能,为你的 Helm Chart 交货保驾护航。
快采用 KubeVela 交货 Helm Chart ,让现代化的广泛应用交货和政府机构更是简便、巧妙、有效率!
具体重定向
[1] Helm Charts:
[2] KubeVela:
[3] 单炮兵部队的 Helm Charts 交货
[4] velad:
[5] 炮兵部队政府机构:
[6] 参照元数据:
#topology
[7] 元数据
#2-install-velaux
[8] Override 作法
#override
[9] 器皿交货
#use-policies-and-workflow-outside-the-application
[10] 金丝雀发布:
您可以通过如下碳化洞察更是多关于 KubeVela 以及 OAM 这两项的细节:
这两项文档库:github.com/oam-dev/kubevela 注目 Star/Watch/Fork! 这两项官方主页与元数据:kubevela.io ,从 1.1 发行版开始,已包括中会文、英文元数据,更是多第二语言元数据注目Linux展开翻译。 这两项钉钉群集:23310022;Slack:CNCF #kubevela Channel 重新加入微信群集:代为不须掺入下述 maintainer 微信号,表明进入 KubeVela 用户群集:碰此处:检视 KubeVela 这两项Twitter!
标题重定向:
本文为阿里云原创主旨,未经允许不得转载。
。吃什么可以预防绝经做完手术身体虚弱怎么调理
经常拉肚子怎么办
眼睛红用什么眼药水好
宝宝流感
家用血糖仪哪家好
科兴制药海外市场
慢性腹泻吃什么益生菌效果好
治疗新冠特效药
牙疼用什么药好得快
- .投了那么多,基金经理们的“身家”没了么?
- .华尔街多家机构:逼空行情走到尽头,美股这轮熊市冲击结束
- .不管遇到什么样的事情,很少发火甚至才会笑着面对!
- .收益率曲线倒挂利空信用债 巴克莱预计未来数月超额回报意味著为负
- .让你心甘情愿为他付出一切的天蝎座
- .英国央行常务副Cunliffe认为俄乌战争可能导致通胀低于央行目标
- .没有趣的灵魂,这些星座在亲情中很有野心
- .马斯克持股9.2%,推特大涨超25%!特斯拉超级充电桩业务获利目标曝光
- .有了钱之后就容易看不起人,到处炫耀的三大吉日
- .艰难的传统车企:福特一季度车也销售下滑17%
- .十二星座在恋爱当中花销各是多少?哪个最抠
- .为什么不决定存“大额存单”?内行人:主要有4大原因
- .观点综述:美国国债策略师普遍预计曲线倒挂还将延用
- .1967年、1979年、1991年属羊人和什么属相结婚,子女得利出息!命中注定
- .最有女人味的3个星座女,善良美貌还旺夫,家庭被迫富!
- .美国FDA:可能需要更新新冠疫苗以尽可能其有效性
- .招商添旭定开债基无限期大额申购和转换转入业务
- .水庆霞:我们的目标就是卫冕冠军
- .高毅资产武当邱国鹭最新发声,首曝不追热门赛道不抱团原因!
- .德约麻烦大了!不能打澳网,赞助商看法很大,攸关每年2.6亿收入