当前位置:网站首页>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
边栏推荐
- What is low code development?
- 运维体系建设思考 - 稳定性篇
- [dynamic programming] p1018 linear DP: maximum product
- Use of axurer9 master
- [width first search note] BFS output shortest path
- 水哥的代码
- 00 後雲原生工程師:用 Zadig 為思創科技(廣州公交)研發開源節流
- What is the prospect of VR panoramic production?
- Rule engine development experience sharing - reddit
- 昨天晚上失眠
猜你喜欢

GO语言-反射reflect

YAYA LIVE CTO 唐鸿斌:真正本地化,要让产品没有「产地」属性

Deploy grafana to realize graphical monitoring

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

C#/VB. Net to convert PDF to excel

The example application of histogram in data visualization makes the public performance results clear at a glance

Detailed explanation of Zadig's self-test and joint debugging sub environment for developers

Get to know Alibaba cloud (Cloud Computing) - development history, technical architecture, region and availability zone!

6年心得,从功能测试到测试开发,送给在测试路上一路走到黑的你
![Sword finger offer:[day 2 linked list (simple)] --- > print the linked list from end to end](/img/d6/824985b74b27a1bee456c2cebbac26.jpg)
Sword finger offer:[day 2 linked list (simple)] --- > print the linked list from end to end
随机推荐
How to make beautiful pictures
水哥的代码
Zadig + 洞态 IAST:让安全溶于持续交付
【电子实验2】简单电子门铃
彪马携手10KTF Shop启动其迄今为止规模首屈一指的Web3合作项目
[golang] leetcode intermediate subset & Word Search
[dynamic programming] p1018 linear DP: maximum product
Can we still enter the "pit" data analysis now? Look at the hot jobs of data analysis in 2022!
【selenium自动化过程中的api抓包】browsermobproxy的安装和配置
穿越过后,她说多元宇宙真的存在
Gross vs60 billion. Is food safety the biggest obstacle to Weilong's listing?
How to use the style label of jade template- How to use the style tag with jade templates?
[webapi] return dynamic list dynamic
Sword finger offer:[day 1 stack and queue (simple)] --- > use two stacks to realize the queue
Binomial distribution (a discrete distribution)
杆会睡不着觉
Career consultation | what should I answer when I am asked about my intended salary during the interview?
Sword finger offer:[day 2 linked list (simple)] --- > reverse linked list
Hyperjumptech/grule-rule-engine: rule engine implementation of golang
关于杠杆的思考