Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
333 views
in Technique[技术] by (71.8m points)

github - Helm chart usage

i'm working on a kubernetes project where we have a each micro service with it's own helm chart, currently the helm chart of each microservice is with it in the code source repository, and now i want to create a qa environnement where the same code can be used but i'm having a problem customizing the helm chart for each environnement, my question is what is the best approach to handle a helm chart for a microservice?and should the helm chart be located in the repository of the source code?

thanks in advance

question from:https://stackoverflow.com/questions/65941218/helm-chart-usage

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

It's ok to have the chart in each microservice's repository.

Now, to deploy your system (no matter the environment), you need to helm install all those charts. How can you do this? You have two options, either you individually install each one, or the best approach, you create a meta chart.

What's this meta chart? Just another dummy chart, with dependencies to all of your microservices. So that you end up with something like:

apiVersion: v3
name: myservice
version: 1.0.0

dependencies:
- name: microserviceA
  version: ">=1.0.0"
  repository: "path_to_microserviceA_repo"
- name: microserviceB
  version: ">=1.0.0"
  repository: "path_to_microserviceA_repo"

Then, ideally you would have different values files with configuration for each environment you're going to deploy: QA, staging, production, personal for local development, etc


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...