当前位置:网站首页>Steady! How thousands of micro services can quickly access Zadig (helm chart)
Steady! How thousands of micro services can quickly access Zadig (helm chart)
2022-06-28 22:22:00 【InfoQ】
summary
- Batch synchronize configuration from code base: take Helm Chart The configuration is organized in the code base , Synchronize configuration from the code base , Realize the batch creation of services .
- Use Helm Chart Template creation service: abstract Helm Chart The configuration template , stay values Variables are supported in the file , You can quickly create a service by specifying a few variables , And a set of templates can be reused in multiple environments .
- Use Helm Chart Template batch creation service: abstract Helm Chart The configuration template , Specify... When creating the service values File overwrite template , You can create services in batch , And a set of templates can be reused in multiple environments .
Batch synchronize configuration from code base
voting-demo- Source code :zadig/voting-app
- service : Include 5 Micro services (
db/redis/result/vote/worker)
- Helm Chart To configure : Located under the source code
chartCatalog , The directory structure is shown below .values.yamlIncluding the image information of all services ,templatesThe directory contains the configuration of all services , And reference{{ .Values.services. service name .image }}As container image information
zadig/examples/voting-app/chart
├── Chart.yaml
├── templates
│ ├── db.yaml
│ ├── redis.yaml
│ ├── result.yaml
│ ├── vote.yaml
│ └── worker.yaml
└── values.yamlSynchronize from the code base
Synchronize from the code base load examples/voting-app/chart

Adding services to the environment
Join the environment 

Use Helm Chart Template creation service
multi-service-demoservice1service2service3k8s-yamlgeneral-chartzadig/examples/multi-service-demo/
├── general-chart # Helm Chart Service template
│ ├── Chart.yaml
│ ├── templates
│ │ ├── _helpers.tpl
│ │ ├── deployment.yaml
│ │ └── service.yaml
│ └── values.yaml
├── k8s-yaml # All services are complete K8s YAML To configure
│ ├── service1
│ │ ├── deployment.yaml
│ │ └── service.yaml
│ ├── service2
│ │ ├── deployment.yaml
│ │ └── service.yaml
│ ├── service3
│ │ ├── deployment.yaml
│ │ └── service.yamlvalues.yamlportT-ServicefullnameOverride: $T-Service$
replicaCount: 1
port: {{.port}}
imagePullSecretsName: "default-registry-secret"
image:
repository: "ccr.ccs.tencentyun.com/koderover-public/$T-Service$"
tag: "latest"
resources:
requests:
cpu: 10m
mem: 10Mi
limits:
cpu: 20m
mem: 20Miestablish Helm Chart Templates
Template library Helm Chart
+multi-service-demo-template load examples/multi-service-demo/general-chart

Create a new service using a template
Use the template to create a new Import 

service2service3service2service3Add services to the environment
Add service 


Use Helm Chart Template batch creation service
multi-service-demoservice1service2service3full-chartsbase-chartvalueszadig/examples/multi-service-demo/
├── base-chart # Helm Chart Service template
│ ├── Chart.yaml
│ ├── templates
│ │ ├── _helpers.tpl
│ │ ├── deployment.yaml
│ │ └── service.yaml
│ └── values.yaml
├── full-charts # All services are complete 、 independent Helm Chart To configure
│ ├── service1
│ │ ├── Chart.yaml
│ │ ├── templates
│ │ └── values.yaml
│ ├── service2
│ │ ├── Chart.yaml
│ │ ├── templates
│ │ └── values.yaml
│ └── service3
│ ├── Chart.yaml
│ ├── templates
│ └── values.yaml
└── values # Corresponding to each service values
├── service1.yaml
├── service2.yaml
└── service3.yaml
establish Helm Chart Templates
multi-service-demo-base-templateexamples/multi-service-demo/base-chart
Create a service in batch by using a template
Use the template to create a new Batch creation Import examples/multi-service-demo/values


Add services to the environment
Add service 


- Use Zadig workflow
- Zadig Environmental Science - K8s Helm Chart project
- Zadig version management - K8s Helm Chart project
Conclusion
边栏推荐
- Icon fill color and background color change together
- 数据库基础笔记
- How to use the style label of jade template- How to use the style tag with jade templates?
- 给朋友的忠告
- GO语言-反射reflect
- 面试官:Redis中字符串的内部实现方式是什么?
- Competition rules for the "network security" event of the secondary vocational group in the skills competition of Guangxi Vocational Colleges in 2022
- 常用工具类与commons 类库
- code review
- 题解 洛谷P1762 偶数/6.21校内考试T2
猜你喜欢

Un voyage profond d'IA dans Huawei Cloud

In one sentence, I will tell you the meaning of select 1, 2 and 3 in SQL injection, and explain the meaning of each part of SQL injection in detail

Linux安装mysql5.7(CentOS7.6) 教程

6月底了,让我康康有多少准备跳槽的

00 後雲原生工程師:用 Zadig 為思創科技(廣州公交)研發開源節流

Zadig + SonarQube,为开发过程安全保驾

What is the prospect of VR panoramic production?

IC Nansha|AMD高级副总裁、大中华区总裁潘晓明:制程、架构、平台优化突破计算边界

After reading the list of global patent and chip buyers, I understand that high innovation can lead to high profits

Laravel文档阅读笔记-Adding a Markdown editor to Laravel
随机推荐
Architecture design of e-commerce secsha system
Set when quartz scheduled task trigger starts
[dynamic programming] p1018 linear DP: maximum product
Database basic notes
Axure custom components
flutter通过 GlobalKey 获取界面任意元素坐标尺寸
How to advance data analysis from 1 to 10?
数据可视化中柱状图的实例应用,让乘风破浪公演结果一目了然
题解 洛谷P1762 偶数/6.21校内考试T2
职业问诊 | 在数据分析面试中,这样做自我介绍才靠谱
Use of dynamic panels
Visual studio 2022 17.1 is now available!
There is no picture problem when using tcpdf to generate pdf
2022-06-28:以下golang代码输出什么?A:true;B:false;C:panic;D:编译失败。 package main import “fmt“ func main() {
终于有人把云原生架构讲明白了
如何制作精美的图片
Yiming Anke submitted a statement to the Hong Kong Stock Exchange: the loss doubled in 2021, and the past financing amount was exaggerated
ROS 2 Humble Hawksbill 之 f1tenth gym
水哥的代码
PAT 1021. Traversal of the deep root (25 points) graph, DFS, calculating the number of connected components